-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
30 lines (22 loc) · 1.21 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
project(LasTools)
SET(CMAKE_BUILD_TYPE "Release")
#SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -Wall -g -ggdb ")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
#set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
FIND_PACKAGE(GDAL REQUIRED)
include_directories(${GDAL_INCLUDE_DIR})
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/lib libWuLasLib_src)
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/LAStools/LASlib/src laslib_src)
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/LAStools/LASzip/src laszip_src)
include_directories(${CMAKE_CURRENT_LIST_DIR}/LAStools/LASlib/inc)
include_directories(${CMAKE_CURRENT_LIST_DIR}/LAStools/LASlib/src)
include_directories(${CMAKE_CURRENT_LIST_DIR}/LAStools/LASzip/src)
include_directories(${CMAKE_CURRENT_LIST_DIR}/lib)
add_library(WuLasLib SHARED ${laslib_src} ${laszip_src} ${libWuLasLib_src})
add_executable(LasFileExample ${CMAKE_CURRENT_LIST_DIR}/example/LasFileMethods.cpp)
add_executable(LasFileConvert ${CMAKE_CURRENT_LIST_DIR}/example/LasConvert.cpp)
target_link_libraries(LasFileExample WuLasLib)
target_link_libraries(LasFileConvert WuLasLib)
target_link_libraries(LasFileConvert ${GDAL_LIBRARY})