forked from mkazhdan/PoissonRecon
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathCMakeLists.txt
45 lines (37 loc) · 1.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required( VERSION 3.10 )
project( QPOISSON_RECON_LIB )
add_library( ${PROJECT_NAME} STATIC )
# To remove very annoying "NO ARGUMENTS THAT DEPEND ON A TEMPLATE PARAMETER" errors with G++!
if( UNIX OR MINGW )
target_compile_options( ${PROJECT_NAME} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-fpermissive -w> )
elseif( MSVC )
target_compile_options( ${PROJECT_NAME} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/bigobj> )
endif()
target_sources( ${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/Src_CC_wrap/PoissonReconLib.h
${CMAKE_CURRENT_SOURCE_DIR}/Src_CC_wrap/PointData.h
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Src_CC_wrap/PoissonReconLib.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Src_CC_wrap/PointData.cpp
)
target_include_directories( ${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/Src_CC_wrap
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Src
)
target_compile_definitions( ${PROJECT_NAME}
PRIVATE
_CRT_SECURE_NO_DEPRECATE
_CRT_SECURE_NO_WARNINGS
NOMINMAX
)
option( POISSON_RECON_WITH_OPEN_MP "Compile PoissonRecon plugin with OpenMP support" OFF )
if( POISSON_RECON_WITH_OPEN_MP )
find_package( OpenMP )
if( OpenMP_CXX_FOUND )
target_link_libraries( ${PROJECT_NAME} PUBLIC OpenMP::OpenMP_CXX )
target_compile_definitions( ${PROJECT_NAME} PRIVATE WITH_OPENMP )
endif()
endif ()