Make sure Qt knows where SDL2 libs are

This commit is contained in:
Jeffrey Pfau 2014-10-26 03:51:36 -07:00
parent f98d6486ef
commit 27c7041008
1 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,12 @@ enable_language(CXX)
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)