Files
ViewDesignEngine/CMakeLists.txt
T
茂之钳 5bfcbcb8e9
CI / Build & Test (push) Failing after 39s
CI / Release Build (push) Failing after 33s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
feat(v1.0.1): tangent_pull + error codes + version + license management
Remaining P3 item:
- tangent_pull: maintain G1 tangency when pulling faces

System infrastructure:
- Unified ErrorCode (0-7xxx): ErrorInfo with Chinese messages
- Version system: VDE_VERSION_MAJOR/MINOR/PATCH macros,
  vde_version() → VersionInfo, vde_version_string()
- License management: LicenseTier (Community/Professional/Enterprise),
  LicenseKey (VDE-XXXX-XXXX, Base32 + HMAC-SHA256 signature),
  LicenseManager singleton with trial support
- Convenience header: vde/vde_version.h

Tests: 43 total (26 license + 17 version)
2026-07-27 21:54:46 +08:00

61 lines
1.8 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(ViewDesignEngine VERSION 1.0.0 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# ── 生成构建时间戳 ──────────────────────────────────
string(TIMESTAMP VDE_BUILD_TIMESTAMP "%Y-%m-%dT%H:%M:%SZ" UTC)
configure_file(
${CMAKE_SOURCE_DIR}/cmake/vde_build_config.h.in
${CMAKE_BINARY_DIR}/generated/vde_build_config.h
@ONLY
)
option(BUILD_TESTS "Build tests" ON)
option(BUILD_BENCHMARKS "Build benchmarks" OFF)
option(BUILD_EXAMPLES "Build examples" ON)
option(ENABLE_SANITIZERS "Enable ASan" OFF)
option(VDE_USE_GMP "GMP exact arithmetic" OFF)
option(VDE_BUILD_PYTHON "Python bindings" OFF)
option(VDE_USE_OPENMP "Enable OpenMP parallelization" ON)
add_library(vde_compile_options INTERFACE)
include(cmake/CompilerSettings.cmake)
target_compile_features(vde_compile_options INTERFACE cxx_std_20)
find_package(Eigen3 3.3 QUIET)
if(NOT Eigen3_FOUND)
include(FetchContent)
FetchContent_Declare(Eigen3
URL https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz)
FetchContent_MakeAvailable(Eigen3)
endif()
add_subdirectory(src)
if(BUILD_BENCHMARKS)
add_subdirectory(bench)
endif()
if(BUILD_TESTS)
enable_testing()
find_package(GTest QUIET)
if(NOT GTest_FOUND)
include(FetchContent)
FetchContent_Declare(googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz)
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
endif()
add_subdirectory(tests)
endif()
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if(VDE_BUILD_PYTHON)
add_subdirectory(python)
endif()