mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
parent
ec796fc89c
commit
63456a88d8
1 changed files with 12 additions and 31 deletions
|
@ -150,39 +150,20 @@ endif()
|
|||
|
||||
if (SYSTEM_SDL2)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SDL sdl>=${SYSTEM_SDL_MIN_VER})
|
||||
if (SDL_FOUND)
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS ${SDL_INCLUDE_DIRS})
|
||||
list(APPEND DEPENDENCIES_COMPILE_OPTIONS ${SDL_CFLAGS_OTHER})
|
||||
list(APPEND DEPENDENCIES_LIBRARIES ${SDL_LIBRARIES})
|
||||
list(APPEND DEPENDENCIES_LIBRARY_DIRS ${SDL_LIBRARY_DIRS})
|
||||
list(APPEND DEPENDENCIES_LINK_OPTIONS ${SDL_LDFLAGS_OTHER})
|
||||
list(APPEND DEPENDENCIES_LEGACY_LDFLAGS ${SDL_LDFLAGS})
|
||||
pkg_check_modules(SDL2 sdl2>=${SYSTEM_SDL_MIN_VER})
|
||||
if (SDL2_FOUND)
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS ${SDL2_INCLUDE_DIRS})
|
||||
list(APPEND DEPENDENCIES_COMPILE_OPTIONS ${SDL2_CFLAGS_OTHER})
|
||||
list(APPEND DEPENDENCIES_LIBRARIES ${SDL2_LIBRARIES})
|
||||
list(APPEND DEPENDENCIES_LIBRARY_DIRS ${SDL2_LIBRARY_DIRS})
|
||||
list(APPEND DEPENDENCIES_LINK_OPTIONS ${SDL2_LDFLAGS_OTHER})
|
||||
list(APPEND DEPENDENCIES_LEGACY_LDFLAGS ${SDL2_LDFLAGS})
|
||||
endif()
|
||||
endif()
|
||||
if (NOT SDL_FOUND)
|
||||
find_package(SDL ${SYSTEM_SDL_MIN_VER})
|
||||
if (SDL_FOUND)
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS ${SDL_INCLUDE_DIR})
|
||||
list(APPEND DEPENDENCIES_LIBRARIES ${SDL_LIBRARY})
|
||||
else()
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SDL2 sdl2>=${SYSTEM_SDL_MIN_VER})
|
||||
if (SDL2_FOUND)
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS ${SDL2_INCLUDE_DIRS})
|
||||
list(APPEND DEPENDENCIES_COMPILE_OPTIONS ${SDL2_CFLAGS_OTHER})
|
||||
list(APPEND DEPENDENCIES_LIBRARIES ${SDL2_LIBRARIES})
|
||||
list(APPEND DEPENDENCIES_LIBRARY_DIRS ${SDL2_LIBRARY_DIRS})
|
||||
list(APPEND DEPENDENCIES_LINK_OPTIONS ${SDL2_LDFLAGS_OTHER})
|
||||
list(APPEND DEPENDENCIES_LEGACY_LDFLAGS ${SDL2_LDFLAGS})
|
||||
endif()
|
||||
endif()
|
||||
if (NOT SDL2_FOUND)
|
||||
find_package(SDL2 ${SYSTEM_SDL_MIN_VER} REQUIRED)
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
|
||||
list(APPEND DEPENDENCIES_LIBRARIES ${SDL2_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
if (NOT SDL2_FOUND)
|
||||
find_package(SDL2 ${SYSTEM_SDL_MIN_VER} REQUIRED)
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
|
||||
list(APPEND DEPENDENCIES_LIBRARIES ${SDL2_LIBRARY})
|
||||
endif()
|
||||
message(STATUS "Using system-installed SDL2")
|
||||
else()
|
||||
|
|
Loading…
Reference in a new issue