mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-06 22:30:20 +00:00
Port FindSDL2.cmake to actually find SDL2 rather than SDL, and include it in CMakeLists.txt
(following instructions at http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries)
This commit is contained in:
parent
7511794153
commit
4ef6786886
2 changed files with 61 additions and 52 deletions
|
@ -164,7 +164,13 @@ endif(NOT OGGVORBIS_FOUND)
|
|||
OPTION(AQUARIA_INTERNAL_SDL "Always use included SDL library" ${WIN32_TRUE})
|
||||
if(NOT AQUARIA_INTERNAL_SDL)
|
||||
if(AQUARIA_USE_SDL2)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
find_package(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
set(SDL_FOUND TRUE)
|
||||
set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIR})
|
||||
set(SDL_LIBRARY ${SDL2_LIBRARY})
|
||||
endif(SDL2_FOUND)
|
||||
else(AQUARIA_USE_SDL2)
|
||||
find_package(SDL)
|
||||
endif(AQUARIA_USE_SDL2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue