Make sure Qt knows where SDL2 libs are
Jeffrey Pfau jeffrey@endrift.com
Sun, 26 Oct 2014 03:51:36 -0700
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
src/platform/qt/CMakeLists.txt
→
src/platform/qt/CMakeLists.txt
@@ -4,7 +4,12 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11") if(BUILD_SDL) - find_package(SDL 1.2 REQUIRED) + if(NOT SDL_FOUND AND NOT SDL2_FOUND) + find_package(SDL 1.2 REQUIRED) + endif() + if(SDL2_FOUND) + link_directories(${SDL2_LIBDIR}) + endif() set(PLATFORM_LIBRARY "${PLATFORM_LIBRARY};${SDL_LIBRARY};${SDLMAIN_LIBRARY}") set(PLATFORM_SRC ${PLATFORM_SRC} ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-events.c) include_directories(${SDL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/src/platform/sdl)