Refactor CMake configuration: separate RPT core library into its own CMakeLists.txt and streamline SWIG integration

This commit is contained in:
2026-01-29 17:54:21 +08:00
parent 7405454480
commit cab98936dd
3 changed files with 30 additions and 14 deletions

24
rpt/CMakeLists.txt Normal file
View File

@ -0,0 +1,24 @@
# RPT Core Library
set(RPT_SOURCES
camera.cpp
interface.cpp
triangulator.cpp
)
add_library(rpt_core STATIC ${RPT_SOURCES})
target_include_directories(rpt_core PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_compile_options(rpt_core PRIVATE
-fPIC
-march=native
-Wall
)
# Release mode optimizations
target_compile_options(rpt_core PRIVATE
$<$<CONFIG:Release>:-O3;-flto=auto>
)