1 Star 0 Fork 8

zhanghong/ohos_sdl2

forked from OpenHarmony-SIG/ohos_sdl2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
sdl2-config.cmake.in 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
# sdl2 cmake project-config input for ./configure scripts
set(prefix "@prefix@")
set(exec_prefix "@exec_prefix@")
set(libdir "@libdir@")
set(SDL2_PREFIX "@prefix@")
set(SDL2_EXEC_PREFIX "@prefix@")
set(SDL2_LIBDIR "@libdir@")
set(SDL2_INCLUDE_DIRS "@includedir@/SDL2")
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
if(NOT TARGET SDL2::SDL2)
# Remove -lSDL2 as that is handled by CMake, note the space at the end so it does not replace e.g. -lSDL2main
# This may require "libdir" beeing set (from above)
string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS "@SDL_RLD_FLAGS@ @SDL_LIBS@ ")
string(STRIP "${SDL2_EXTRA_LINK_FLAGS}" SDL2_EXTRA_LINK_FLAGS)
string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS_STATIC "@SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ ")
string(STRIP "${SDL2_EXTRA_LINK_FLAGS_STATIC}" SDL2_EXTRA_LINK_FLAGS_STATIC)
add_library(SDL2::SDL2 SHARED IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "@includedir@/SDL2"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "@libdir@/libSDL2.so"
INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS}")
add_library(SDL2::SDL2-static STATIC IMPORTED)
set_target_properties(SDL2::SDL2-static PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "@includedir@/SDL2"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "@libdir@/libSDL2.a"
INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS_STATIC}")
add_library(SDL2::SDL2main STATIC IMPORTED)
set_target_properties(SDL2::SDL2main PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "@libdir@/libSDL2main.a")
endif()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hongzhang1/ohos_sdl2.git
git@gitee.com:hongzhang1/ohos_sdl2.git
hongzhang1
ohos_sdl2
ohos_sdl2
master

搜索帮助