Skip to content

Commit

Permalink
cmake: Bump minimum required CMake to 3.0.0 and mark link libraries P…
Browse files Browse the repository at this point in the history
…RIVATE.

Fixes Bugzilla #2992.
  • Loading branch information
icculus committed Jun 27, 2020
1 parent 718e1fb commit 21482c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -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")
endif()

cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required(VERSION 3.0.0)
project(SDL2 C CXX)

# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
Expand Down Expand Up @@ -2152,7 +2152,7 @@ if(SDL_SHARED)
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
endif()
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>)
if(ANDROID)
target_include_directories(SDL2 PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures)
Expand Down

0 comments on commit 21482c1

Please sign in to comment.