forked from tudelft3d/3dfier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
69 lines (50 loc) · 1.73 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
60
61
62
63
64
65
66
67
68
69
project( 3dfier )
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})
cmake_minimum_required(VERSION 2.6.2)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
cmake_policy(VERSION 2.8.4)
else()
cmake_policy(VERSION 2.6)
endif()
endif()
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})
link_directories(${YamlCpp_LIBRARY_DIRS})
# # 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_LIBRARIES} Boost::program_options Boost::filesystem Boost::locale Boost::chrono LASlib)
install(TARGETS 3dfier DESTINATION bin)