forked from symao/libicp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
42 lines (32 loc) · 1.09 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
# project
cmake_minimum_required (VERSION 2.6)
project (libicp)
# directories
set (LIBICP_SRC_DIR src)
FIND_PATH(BOOST_DIR "boost")
# include directory
include_directories("${LIBICP_SRC_DIR}")
include_directories("${BOOST_DIR}")
#include directories for lasreaders
include_directories("/LAStools/LASlib/inc")
include_directories("/LAStools/LASzip/src")
include_directories("/LAStools/LASlib/lib")
# determine if OpenMP can/should be used
option(USE_OPENMP "Enable OpenMP?" ON) # set to OFF to disable
if(USE_OPENMP)
FIND_PACKAGE(OpenMP)
if(OPENMP_FOUND OR OpenMP_FOUND)
message(STATUS "OpenMP flags = ${OpenMP_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else(OPENMP_FOUND OR OpenMP_FOUND)
message(STATUS "OpenMP not supported")
endif(OPENMP_FOUND OR OpenMP_FOUND)
endif(USE_OPENMP)
# sources
FILE(GLOB LIBICP_SRC_FILES "src/*.cpp")
# make release version
set(CMAKE_BUILD_TYPE Release)
# build demo program
add_executable(icp ${LIBICP_SRC_FILES})
target_link_libraries(icp /LAStools/LASlib/lib/liblas.a)