mirror of https://github.com/encounter/SDL.git
cmake: Bump minimum required CMake to 3.0.0 and mark link libraries PRIVATE.
Fixes Bugzilla #2992.
This commit is contained in:
parent
718e1fb8b1
commit
21482c1582
|
@ -2,7 +2,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||||
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
|
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 3.0.0)
|
||||||
project(SDL2 C CXX)
|
project(SDL2 C CXX)
|
||||||
|
|
||||||
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
|
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
|
||||||
|
@ -2152,7 +2152,7 @@ if(SDL_SHARED)
|
||||||
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
||||||
endif()
|
endif()
|
||||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||||
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
|
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
target_include_directories(SDL2 PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures)
|
target_include_directories(SDL2 PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures)
|
||||||
|
|
Loading…
Reference in New Issue