commit
ca04975d54
62 files changed
+3381
No files matched your search
@@ -0,0 +1,31 @@
|
||||
include(FetchContent)
|
||||
|
||||
function(vls_add_void_dependency)
|
||||
# Function scope prevents embedding policy from leaking into the parent cache.
|
||||
set(VOID_ENABLE_TESTING OFF)
|
||||
set(VOID_ENABLE_BENCHMARKS OFF)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
set(VOID_ENABLED_MODULES Configuration Data Unicode)
|
||||
if(BUILD_TESTING)
|
||||
list(APPEND VOID_ENABLED_MODULES Testing System)
|
||||
endif()
|
||||
if(VLS_VOID_SOURCE_DIR)
|
||||
get_filename_component(_vls_void_source "${VLS_VOID_SOURCE_DIR}" ABSOLUTE
|
||||
BASE_DIR "${PROJECT_SOURCE_DIR}")
|
||||
if(NOT EXISTS "${_vls_void_source}/CMakeLists.txt")
|
||||
message(FATAL_ERROR "VLS_VOID_SOURCE_DIR must contain a VoidLibrary CMakeLists.txt")
|
||||
endif()
|
||||
message(STATUS "VLS development source override: ${_vls_void_source}; upstream ref "
|
||||
"${VLS_VOID_REF} is bypassed; local source is not verified by this build")
|
||||
FetchContent_Declare(voidlibrary SOURCE_DIR "${_vls_void_source}" EXCLUDE_FROM_ALL SYSTEM)
|
||||
else()
|
||||
message(STATUS "VLS VoidLibrary ref: ${VLS_VOID_REF} (tracks upstream; remote fetch)")
|
||||
FetchContent_Declare(voidlibrary
|
||||
GIT_REPOSITORY https://git.faumaray.com/Void/VoidLibrary.git
|
||||
GIT_TAG "${VLS_VOID_REF}"
|
||||
GIT_SHALLOW FALSE
|
||||
EXCLUDE_FROM_ALL SYSTEM)
|
||||
endif()
|
||||
FetchContent_MakeAvailable(voidlibrary)
|
||||
set(VLS_VOID_TESTING_SCRIPT "${voidlibrary_SOURCE_DIR}/cmake/VoidTesting.cmake" PARENT_SCOPE)
|
||||
endfunction()
|
||||
Reference in new issue
Block a user