Skip to content

Commit

Permalink
CMake: Disable warnings and only build static lib for SDL from extern…
Browse files Browse the repository at this point in the history
…als.
  • Loading branch information
AdmiralCurtiss committed Jul 12, 2022
1 parent e79c7d4 commit 4f7fcdb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -619,11 +619,22 @@ if(ENABLE_SDL)
message(STATUS "Using system SDL2")
else()
message(STATUS "Using static SDL2 from Externals")
set(SDL2_DISABLE_SDL2MAIN OFF)
set(SDL2_DISABLE_INSTALL OFF)
set(SDL2_DISABLE_UNINSTALL OFF)
set(SDL_SHARED OFF)
set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
set(SDL_STATIC ON)
set(SDL_STATIC_ENABLED_BY_DEFAULT ON)
set(SDL_TEST OFF)
set(SDL_TEST_ENABLED_BY_DEFAULT OFF)
add_subdirectory(Externals/SDL/SDL)
if (TARGET SDL2)
dolphin_disable_warnings_msvc(SDL2)
endif()
if (TARGET SDL2-static)
dolphin_disable_warnings_msvc(SDL2-static)
endif()
set(SDL2_FOUND TRUE)
endif()
add_definitions(-DHAVE_SDL2=1)
Expand Down

0 comments on commit 4f7fcdb

Please sign in to comment.