Refactor CMake configuration: separate RPT core library into its own CMakeLists.txt and streamline SWIG integration
This commit is contained in:
24
rpt/CMakeLists.txt
Normal file
24
rpt/CMakeLists.txt
Normal 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>
|
||||
)
|
||||
Reference in New Issue
Block a user