diff --git a/CMakeLists.txt b/CMakeLists.txt index ddbc2287..0e8d55f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ if(VITA OR PSP OR PS2 OR N3DS OR RISCOS) set(PLATFORM_SUPPORTS_SHARED OFF) endif() -option(CMAKE_POSITION_INDEPENDENT_CODE "Build static libraries with -fPIC" ON) +option(CMAKE_POSITION_INDEPENDENT_CODE "Build static libraries with -fPIC" ${PLATFORM_SUPPORTS_SHARED}) cmake_dependent_option(BUILD_SHARED_LIBS "Build the library as a shared library" ON PLATFORM_SUPPORTS_SHARED OFF) cmake_dependent_option(SDL3IMAGE_INSTALL "Enable SDL3_image install target" ${SDL3IMAGE_ROOTPROJECT} "${sdl3image_install_enableable}" OFF)