Switch from Git Submodules to CMake FetchContent

This commit is contained in:
2023-06-04 00:19:04 +02:00
parent 4894d737ba
commit d8fac5917e
7 changed files with 28 additions and 28 deletions

12
.gitmodules vendored
View File

@@ -1,12 +0,0 @@
[submodule "lib/spdlog"]
path = lib/spdlog
url = git@github.com:gabime/spdlog.git
[submodule "lib/entt"]
path = lib/entt
url = https://github.com/skypjack/entt.git
[submodule "lib/glfw"]
path = lib/glfw
url = https://github.com/glfw/glfw.git
[submodule "lib/fx-gltf"]
path = lib/fx-gltf
url = https://github.com/jessey-git/fx-gltf.git

View File

@@ -12,8 +12,34 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(FetchContent) include(FetchContent)
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz) # EnTT
FetchContent_MakeAvailable(json) FetchContent_Declare(
entt
URL https://github.com/skypjack/entt/archive/refs/tags/v3.11.1.tar.gz
)
FetchContent_MakeAvailable(entt)
# GLFW
FetchContent_Declare(
glfw
URL https://github.com/glfw/glfw/releases/download/3.3.8/glfw-3.3.8.zip
)
option(GLFW_BUILD_DOCS "" OFF)
option(GLFW_INSTALL "" OFF)
FetchContent_MakeAvailable(glfw)
# fx-gltf
FetchContent_Declare(
fx-gltf
URL https://github.com/jessey-git/fx-gltf/archive/refs/tags/v2.0.0.tar.gz
)
option(FX_GLTF_BUILD_TESTS "" OFF)
option(FX_GLTF_INSTALL "" OFF)
FetchContent_MakeAvailable(fx-gltf)
find_package(glm REQUIRED) find_package(glm REQUIRED)
find_package(spdlog REQUIRED) find_package(spdlog REQUIRED)

10
lib/CMakeLists.txt vendored
View File

@@ -1,12 +1,2 @@
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glad) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glad)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/entt)
option(GLFW_BUILD_DOCS "" OFF)
option(GLFW_INSTALL "" OFF)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glfw)
option(FX_GLTF_BUILD_TESTS "" OFF)
option(FX_GLTF_INSTALL "" OFF)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/fx-gltf)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stb) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stb)

1
lib/entt vendored

Submodule lib/entt deleted from de0e5862dd

1
lib/fx-gltf vendored

Submodule lib/fx-gltf deleted from 7766c237ea

1
lib/glfw vendored

Submodule lib/glfw deleted from dd8a678a66

View File

@@ -29,7 +29,6 @@ target_link_libraries(
pthread pthread
spdlog spdlog
fx-gltf::fx-gltf fx-gltf::fx-gltf
nlohmann_json::nlohmann_json
stb stb
) )