mirror of
https://github.com/slendidev/smath.git
synced 2026-03-17 02:26:50 +02:00
Add optional interop headers
Those headers are used for interoping with various popular C++ libraries. For now, those libraries are Eigen, GLM, HandmadeMath, Raylib, and SFML. Some other ones may be added in the future. Those are disabled by default, as most projects I would imagine would not use them. But in case you need any of them for special reasons like I did, they are there. Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
@@ -8,6 +8,7 @@ option(SMATH_BUILD_EXAMPLES "Build example programs" ON)
|
||||
option(SMATH_BUILD_TESTS "Build unit tests" ON)
|
||||
option(SMATH_BUILD_MODULES "Enable C++20 modules support" OFF)
|
||||
option(SMATH_ENABLE_LEGACY_HEADER "Install legacy include <smath.hpp> shim" OFF)
|
||||
option(SMATH_INSTALL_INTEROP_HEADERS "Install interop headers" OFF)
|
||||
|
||||
if(SMATH_BUILD_MODULES)
|
||||
message(STATUS "Building smath C++ module")
|
||||
@@ -27,7 +28,11 @@ include(CMakePackageConfigHelpers)
|
||||
install(TARGETS smath
|
||||
EXPORT smathTargets
|
||||
)
|
||||
install(DIRECTORY include/ DESTINATION include)
|
||||
install(FILES include/smath/smath.hpp DESTINATION include/smath)
|
||||
|
||||
if(SMATH_INSTALL_INTEROP_HEADERS)
|
||||
install(DIRECTORY include/smath/interop DESTINATION include/smath)
|
||||
endif()
|
||||
|
||||
if(SMATH_ENABLE_LEGACY_HEADER)
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||
|
||||
Reference in New Issue
Block a user