Skip to content

Commit

Permalink
cmake: don't buid SDL_image as a shared library for platforms that do…
Browse files Browse the repository at this point in the history
…n't support it
  • Loading branch information
madebr committed Jan 12, 2024
1 parent 1a35931 commit ee9dd03
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ include(CMakeDependentOption)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

set(BUILD_SHARED_LIBS_DEFAULT ON)
if(VITA OR PSP OR PS2 OR N3DS OR RISCOS)
set(BUILD_SHARED_LIBS_DEFAULT OFF)
endif()

option(CMAKE_POSITION_INDEPENDENT_CODE "Build static libraries with -fPIC" ON)
option(BUILD_SHARED_LIBS "Build the library as a shared library" ON)
option(BUILD_SHARED_LIBS "Build the library as a shared library" ${BUILD_SHARED_LIBS_DEFAULT})

cmake_dependent_option(SDL3IMAGE_INSTALL "Enable SDL3_image install target" ${SDL3IMAGE_ROOTPROJECT} "${sdl3image_install_enableable}" OFF)
cmake_dependent_option(SDL3IMAGE_INSTALL_CPACK "Create binary SDL3_image archive using CPack" ${SDL3IMAGE_ROOTPROJECT} "SDL3IMAGE_INSTALL" OFF)
Expand Down

0 comments on commit ee9dd03

Please sign in to comment.