bootstrap

Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-11-25 01:32:43 +03:00
commit 3cac890ce9
57 files changed
+4043

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
include(FetchContent)
function(vbs_add_void_dependency)
# Function scope keeps dependency policy out of the embedding project's variables/cache.
set(VOID_ENABLE_TESTING OFF)
set(VOID_ENABLE_BENCHMARKS OFF)
set(BUILD_SHARED_LIBS OFF)
set(VOID_ENABLED_MODULES Configuration)
if(VBS_BUILD_TESTS)
list(APPEND VOID_ENABLED_MODULES Testing)
endif()
if(VBS_VOID_SOURCE_DIR)
get_filename_component(_vbs_void_source "${VBS_VOID_SOURCE_DIR}" ABSOLUTE
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
if(NOT IS_DIRECTORY "${_vbs_void_source}" OR
NOT EXISTS "${_vbs_void_source}/CMakeLists.txt")
message(FATAL_ERROR "VBS_VOID_SOURCE_DIR must contain a VoidLibrary CMakeLists.txt")
endif()
message(STATUS "VBS development source override: ${_vbs_void_source}; "
"the pinned VoidLibrary revision ${VBS_VOID_REVISION} is bypassed")
FetchContent_Declare(voidlibrary SOURCE_DIR "${_vbs_void_source}")
else()
FetchContent_Declare(voidlibrary
GIT_REPOSITORY https://git.faumaray.com/Void/VoidLibrary.git
GIT_TAG "${VBS_VOID_REVISION}"
GIT_SHALLOW FALSE)
endif()
FetchContent_MakeAvailable(voidlibrary)
set(VBS_VOID_TESTING_SCRIPT "${voidlibrary_SOURCE_DIR}/cmake/VoidTesting.cmake" PARENT_SCOPE)
endfunction()
+9
View File
@@ -0,0 +1,9 @@
#pragma once
#include <string_view>
namespace vbs::bootstrap {
inline constexpr std::string_view version = "@PROJECT_VERSION@";
inline constexpr std::string_view os = "@CMAKE_SYSTEM_NAME@";
inline constexpr std::string_view architecture = "@CMAKE_SYSTEM_PROCESSOR@";
} // namespace vbs::bootstrap