-
Notifications
You must be signed in to change notification settings - Fork 109
/
CMakeLists.txt
59 lines (42 loc) · 1.42 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required(VERSION 3.5)
project( 3dfier )
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})
set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
set( CMAKE_CXX_FLAGS "-O2" )
set( CMAKE_BUILD_TYPE "Release" )
if ( COMMAND cmake_policy )
cmake_policy( SET CMP0003 NEW )
endif()
# Boost
find_package( Boost REQUIRED locale chrono system filesystem program_options )
# GDAL
find_package( GDAL REQUIRED )
# LASLIB
find_package( LASlib REQUIRED )
# YamlCpp
find_package( yaml-cpp REQUIRED )
# CGAL
find_package( CGAL REQUIRED QUIET COMPONENTS )
# include helper file
include( ${CGAL_USE_FILE} )
if(MSVC)
add_definitions(-DNOMINMAX)
add_definitions("/EHsc")
endif()
include_directories( ${CMAKE_SOURCE_DIR}/thirdparty )
include_directories( ${CGAL_INCLUDE_DIR} ${CGAL_3RD_PARTY_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIR} ${GDAL_INCLUDE_DIR})
# # build ptinpoly as static lib
# add_library(ptinpoly STATIC thirdparty/ptinpoly.c)
# set_target_properties(
# ptinpoly
# PROPERTIES C_STANDARD 11
# )
# Creating entries for target: 3dfier
FILE(GLOB SRC_FILES src/*.cpp)
add_executable(3dfier ${SRC_FILES})
set_target_properties(
3dfier
PROPERTIES CXX_STANDARD 11
)
target_link_libraries( 3dfier ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${GDAL_LIBRARY} yaml-cpp Boost::program_options Boost::filesystem Boost::locale Boost::chrono LASlib)
install(TARGETS 3dfier DESTINATION bin)