Using FetchContent instead of submodules

This commit is contained in:
Pcornat 2026-01-22 21:13:05 +01:00
commit db3113b288
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD

View file

@ -58,6 +58,12 @@ if (${ENABLE_COVERAGE})
list(APPEND LINKER_FLAGS gcov)
endif ()
fetchcontent_declare(
assimp
GIT_REPOSITORY https://github.com/assimp/assimp.git
GIT_TAG v6.0.3
GIT_SHALLOW ON
)
set(BUILD_SHARED_LIBS ON)
set(ASSIMP_NO_EXPORT ON)
set(ASSIMP_INSTALL OFF)
@ -71,15 +77,21 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
else ()
set(ASSIMP_INJECT_DEBUG_POSTFIX OFF)
endif ()
add_subdirectory(external/assimp EXCLUDE_FROM_ALL)
fetchcontent_makeavailable(assimp)
fetchcontent_declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v1.17.0
GIT_SHALLOW ON
)
set(SPDLOG_ENABLE_PCH ON)
set(SPDLOG_BUILD_WARNINGS ON)
set(SPDLOG_PREVENT_CHILD_FD ON)
set(SPDLOG_NO_THREAD_ID ON)
set(SPDLOG_NO_TLS ON)
set(SPDLOG_NO_ATOMIC_LEVELS ON)
add_subdirectory(external/spdlog EXCLUDE_FROM_ALL)
fetchcontent_makeavailable(spdlog)
add_executable(LearnGtk4 main.cpp
hello_world.cpp