Added SFIZZ_GIT_SUBMODULE_CHECK flag

this flag it's necessary when updating a submodule, to avoid CMake to restore the previous state
when configuring before a test build.
This commit is contained in:
redtide 2024-01-04 09:35:50 +01:00
parent cd042c84e8
commit a2490ef63a
No known key found for this signature in database

View file

@ -16,17 +16,6 @@ set(PROJECT_REPOSITORY https://github.com/sfztools/sfizz)
# External configuration CMake scripts # External configuration CMake scripts
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Ensure presence of Git submodules (when not using the source tarball)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git" AND NOT CMAKE_VERSION VERSION_LESS "3.19.0")
include(GitSubmoduleCheck)
git_submodule_check(external/abseil-cpp)
git_submodule_check(external/filesystem)
git_submodule_check(external/simde)
git_submodule_check(external/st_audiofile/thirdparty/dr_libs)
git_submodule_check(external/st_audiofile/thirdparty/libaiff)
git_submodule_check(external/st_audiofile/thirdparty/wavpack)
endif()
include(BuildType) include(BuildType)
# Build Options # Build Options
@ -54,10 +43,23 @@ option_ex(SFIZZ_RELEASE_ASSERTS "Forced assertions in release builds" OFF)
option_ex(SFIZZ_PROFILE_BUILD "Profile the build time" OFF) option_ex(SFIZZ_PROFILE_BUILD "Profile the build time" OFF)
option_ex(SFIZZ_SNDFILE_STATIC "Link the sndfile library statically" OFF) option_ex(SFIZZ_SNDFILE_STATIC "Link the sndfile library statically" OFF)
option_ex(SFIZZ_ASAN "Use address sanitizer on all sfizz targets" OFF) option_ex(SFIZZ_ASAN "Use address sanitizer on all sfizz targets" OFF)
option_ex(SFIZZ_GIT_SUBMODULE_CHECK "Check Git submodules presence" ON)
# Continuous Controller count (0 to 511) # Continuous Controller count (0 to 511)
set(MIDI_CC_COUNT 512 CACHE STRING "Maximum number of managed Control Change messages") set(MIDI_CC_COUNT 512 CACHE STRING "Maximum number of managed Control Change messages")
# Ensure presence of Git submodules (when not using the source tarball)
if(SFIZZ_GIT_SUBMODULE_CHECK AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
AND NOT CMAKE_VERSION VERSION_LESS "3.19.0")
include(GitSubmoduleCheck)
git_submodule_check(external/abseil-cpp)
git_submodule_check(external/filesystem)
git_submodule_check(external/simde)
git_submodule_check(external/st_audiofile/thirdparty/dr_libs)
git_submodule_check(external/st_audiofile/thirdparty/libaiff)
git_submodule_check(external/st_audiofile/thirdparty/wavpack)
endif()
include(SfizzConfig) include(SfizzConfig)
include(SfizzDeps) include(SfizzDeps)
include(SfizzFaust) include(SfizzFaust)