Skip to content

Commit

Permalink
feat(sdl): add sdl option in cmake and fetch dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Milerius committed Oct 30, 2019
1 parent 2976758 commit fde759c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ endif ()

option(ANTARA_BUILD_DOCS "Enable to build the documentation" OFF)
option(USE_SFML_ANTARA_WRAPPER "Use SFML antara wrapper" OFF)
option(USE_SDL_ANTARA_WRAPPER "Use SDL antara wrapper" OFF)
option(USE_LUA_ANTARA_WRAPPER "Use LUA antara wrapper" OFF)
option(USE_BOX2D_ANTARA_WRAPPER "Use Box2D antara wrapper" OFF)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
Expand Down
11 changes: 11 additions & 0 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,22 @@ if (USE_SFML_ANTARA_WRAPPER)
)
endif ()

if (USE_SDL_ANTARA_WRAPPER)
FetchContent_Declare(
sdl
URL https://github.com/SDL-mirror/SDL/archive/release-2.0.10.zip
)
endif()

FetchContent_MakeAvailable(doctest entt doom_st expected range-v3 refl-cpp doom_meta nlohmann_json joboccara-pipes)
if (USE_SFML_ANTARA_WRAPPER)
FetchContent_MakeAvailable(SFML)
endif ()

if (USE_SDL_ANTARA_WRAPPER)
FetchContent_MakeAvailable(sdl)
endif()

add_library(nlohmann_json INTERFACE)
target_include_directories(nlohmann_json INTERFACE ${nlohmann_json_SOURCE_DIR})
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json)
Expand Down

0 comments on commit fde759c

Please sign in to comment.