-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
36 lines (29 loc) · 941 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
project(PointCloudCrust)
set(CMAKE_CXX_STANDARD 17)
set(PointCloudCrust_SOURCES
include/PointCloudCrust/PointCloudCrust.h
include/PointCloudCrust/Vector.h
include/PointCloudCrust/types.h
include/PointCloudCrust/Points.h
src/PointCloudCrust.cpp
include/PointCloudCrust/platform.h)
include_directories(include)
if (PCC_BUILD_SHARED)
add_library(pcc SHARED ${PointCloudCrust_SOURCES})
elseif (PCC_BUILD_STATIC)
add_library(pcc STATIC ${PointCloudCrust_SOURCES})
endif()
if (PCC_BUILD_SHARED OR PCC_BUILD_STATIC AND NOT PCC_DEBUG)
if (MSVC)
target_compile_options(pcc PRIVATE /O2)
else()
target_compile_options(pcc PRIVATE -O3)
endif()
endif()
if (PCC_DOUBLE_PRECISION)
add_compile_definitions(POINTCLOUDCRUST_DOUBLE_PRECISION)
endif()
if (WIN32)
target_compile_definitions(pcc PRIVATE PCC_BUILD_LIB)
endif()