- Updated SDL dependency to SDL2

- fixed compilation issues with cmake and visual studio 2015
This commit is contained in:
xawotihs
2015-10-04 23:10:45 +02:00
parent 4272e2e2b2
commit 22d14b2a4f
25 changed files with 119 additions and 89 deletions

View File

@@ -27,10 +27,13 @@ macro(FindOrBuildSDL2)
if(ANDROID)
set(ENV{SDL2DIR} "$ENV{ANDROID_SDL2_ROOT};$ENV{ANDROID_SDL2_ROOT}/libs/${ANDROID_NDK_ABI_NAME}/")
elseif(WIN32)
set(ENV{SDL2DIR} $ENV{WIN_SDL2_ROOT})
# set(ENV{SDL2DIR} $ENV{WIN_SDL2_ROOT})
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/SDL2)
set(SDL2_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/SDL2/include ${CMAKE_BINARY_DIR}/thirdparty/SDL2)
set(SDL2_LIBRARY SDL2)
else()
find_package(SDL2)
endif()
find_package(SDL2)
endmacro()
macro(FindOrBuildUNZIP)
@@ -84,10 +87,11 @@ macro(FindOrBuildBoost)
endif()
endmacro()
macro(FindOrBuildZLIB)
if(BUILD_ZLIB)
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/zlib ${CMAKE_BINARY_DIR}/thirdparty/zlib)
set(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/zlib)
add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/zlib)
set(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/zlib ${CMAKE_BINARY_DIR}/thirdparty/zlib)
set(ZLIB_LIBRARY zlib)
else()
if(WIN32)
@@ -103,12 +107,7 @@ macro(FindOrBuildGIF)
if(BUILD_GIF)
message(WARNING "ZLIB sources are currently not included within the wagic tree")
else()
if(WIN32)
set(ENV{GIF_DIR} ${CMAKE_SOURCE_DIR}/thirdparty/binary/win)
find_package(GIF)
else()
find_package(GIF)
endif()
find_package(GIF)
endif()
endmacro()