Change dependency management

This commit is contained in:
2020-11-22 11:12:13 +01:00
parent 02232b17ef
commit aec792fc65
16 changed files with 91 additions and 43 deletions

9
3rdParty/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,9 @@
add_subdirectory(zlib)
add_subdirectory(glm)
if (NOT ANDROID AND NOT IOS)
add_subdirectory(glfw)
endif()
add_subdirectory(spdlog)
add_subdirectory(assimp)
add_subdirectory(magic-enum)
add_subdirectory(yaml-cpp)

12
3rdParty/assimp/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,12 @@
include(FetchContent)
FetchContent_Declare(
assimp
GIT_REPOSITORY https://github.com/assimp/assimp.git
GIT_TAG v5.0.1
GIT_SHALLOW TRUE
)
set(ASSIMP_BUILD_TESTS OFF)
set(ASSIMP_BUILD_SAMPLES OFF)
set(ASSIMP_INSTALL OFF)
FetchContent_MakeAvailable(assimp)

9
3rdParty/glfw/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,9 @@
include(FetchContent)
FetchContent_Declare(
glfw
GIT_REPOSITORY https://github.com/glfw/glfw.git
GIT_TAG 3.3.2
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(glfw)

10
3rdParty/glm/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,10 @@
include(FetchContent)
FetchContent_Declare(
glm
GIT_REPOSITORY https://github.com/g-truc/glm.git
GIT_TAG 0.9.9.8
GIT_SHALLOW TRUE
)
set(GLM_TEST_ENABLE OFF)
FetchContent_MakeAvailable(glm)

9
3rdParty/magic-enum/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,9 @@
include(FetchContent)
FetchContent_Declare(
magic_enum
GIT_REPOSITORY https://github.com/Neargye/magic_enum.git
GIT_TAG v0.7.0
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(magic_enum)

10
3rdParty/spdlog/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,10 @@
include(FetchContent)
FetchContent_Declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v1.8.1
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(spdlog)
#add_definitions(-SPDLOG_FMT_EXTERNAL)

11
3rdParty/yaml-cpp/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,11 @@
include(FetchContent)
FetchContent_Declare(
yaml-cpp
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
GIT_TAG yaml-cpp-0.6.3
GIT_SHALLOW TRUE
)
set(YAML_CPP_BUILD_TOOLS OFF)
set(YAML_CPP_BUILD_TESTS OFF)
FetchContent_MakeAvailable(yaml-cpp)

13
3rdParty/zlib/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,13 @@
set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
include(FetchContent)
FetchContent_Declare(
zlib
GIT_REPOSITORY https://github.com/madler/zlib.git
GIT_TAG v1.2.11
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(zlib)
add_library(ZLIB::ZLIB ALIAS zlibstatic)
target_include_directories(zlibstatic INTERFACE ${zlib_BINARY_DIR} ${zlib_SOURCE_DIR})