2023-03-25 23:14:43 +05:30
cmake_minimum_required ( VERSION 3.10 )
project ( reflex2q3 CXX )
set ( OBJ_SRC "src/planes.cpp" "src/brushdef.cpp" "src/oopless-parser.cpp" "src/EntityConverter.cpp" )
2023-03-26 02:00:49 +05:30
add_library ( objects OBJECT ${ OBJ_SRC } )
2023-03-26 07:53:15 +05:30
2023-03-26 02:00:49 +05:30
add_executable ( reflex2q3 src/main.cpp )
add_executable ( runtests test/catch.cpp )
target_link_libraries ( reflex2q3 objects )
target_link_libraries ( runtests objects )
2023-03-25 23:14:43 +05:30
set ( CMAKE_CXX_STANDARD 11 )
set ( CMAKE_CXX_STANDARD_REQUIRED True )
find_package ( PkgConfig )
2023-03-26 07:53:15 +05:30
pkg_check_modules ( EIGEN eigen3 )
if ( NOT EIGEN_FOUND ) #use local
message ( WARNING "Install eigen3 using your package manager. If using git eigen3 or a non-standard install location, ensure environment variable EIGEN3_INCLUDE_DIR is set." )
include_directories ( "$ENV{EIGEN3_INCLUDE_DIR}" )
find_package ( Eigen3 REQUIRED NO_MODULE )
endif ( NOT EIGEN_FOUND )
2023-03-25 23:14:43 +05:30
include_directories (
2023-03-26 07:53:15 +05:30
$ { E I G E N _ I N C L U D E _ D I R S } #set by pkg_check_modules
2023-03-25 23:14:43 +05:30
" l i b / C a t c h / s i n g l e _ i n c l u d e / c a t c h 2 "
" l i b / c x x o p t s / i n c l u d e "
" i n c l u d e "
" t e s t "
)