cmake: remove SDL_STATIC_PIC cmake option.
Use CMAKE_POSITION_INDEPENDENT_CODE instead
This commit is contained in:
@@ -367,7 +367,6 @@ cmake_dependent_option(SDL_SHARED "Build a shared version of the library" ${SDL_
|
||||
cmake_dependent_option(SDL_STATIC "Build a static version of the library" ${SDL_STATIC_DEFAULT} ${SDL_STATIC_AVAILABLE} OFF)
|
||||
option(SDL_TEST_LIBRARY "Build the SDL3_test library" ON)
|
||||
|
||||
dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" "${CMAKE_POSITION_INDEPENDENT_CODE}" "SDL_STATIC" OFF)
|
||||
dep_option(SDL_TESTS "Build the test directory" OFF SDL_TEST_LIBRARY OFF)
|
||||
dep_option(SDL_INSTALL_TESTS "Install test-cases" OFF "NOT SDL_DISABLE_INSTALL;NOT SDL_FRAMEWORK;NOT WINDOWS_STORE" OFF)
|
||||
dep_option(SDL_TESTS_LINK_SHARED "link tests to shared SDL library" "${SDL_SHARED}" "SDL_SHARED;SDL_STATIC" "${SDL_SHARED}")
|
||||
@@ -378,8 +377,6 @@ if(VITA)
|
||||
set_option(VIDEO_VITA_PVR "Build with PSVita PVR gles/gles2 support" OFF)
|
||||
endif()
|
||||
|
||||
set(HAVE_STATIC_PIC "${SDL_STATIC_PIC}")
|
||||
|
||||
if(NOT (SDL_SHARED OR SDL_STATIC))
|
||||
message(FATAL_ERROR "SDL_SHARED and SDL_STATIC cannot both be disabled")
|
||||
endif()
|
||||
@@ -3334,7 +3331,6 @@ endif()
|
||||
if(SDL_STATIC)
|
||||
set_target_properties(SDL3-static PROPERTIES
|
||||
OUTPUT_NAME "${sdl_static_libname}"
|
||||
POSITION_INDEPENDENT_CODE "${SDL_STATIC_PIC}"
|
||||
)
|
||||
target_compile_definitions(SDL3-static PRIVATE SDL_STATIC_LIB)
|
||||
target_link_libraries(SDL3-static PRIVATE ${SDL_CMAKE_DEPENDS})
|
||||
|
||||
Reference in New Issue
Block a user