forked from YuePanEdward/RoadMarkingExtraction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·58 lines (42 loc) · 1.59 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
cmake_minimum_required(VERSION 2.8)
project(roadmarking)
SET(CMAKE_CXX_FLAGS "-O3 -std=c++11 -w -fopenmp -pthread ")
SET(CMAKE_C_FLAGS "-O3 -std=c++11 -fopenmp -pthread ")
#SET(CMAKE_BUILD_TYPE "Debug")
#SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
####### Required libs #######
#eigen3, liblas, OpenCV (>=2.4), pcl (>=1.7)
#eigen
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
message("DEP: EIGEN [OK] ")
#PCL1.8
FIND_PACKAGE(PCL 1.7 REQUIRED)
INCLUDE_DIRECTORIES(${PCL_INCLUDE_DIRS})
LIST(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")
message("DEP: PCL [OK] ")
#OpenCV
FIND_PACKAGE(OpenCV REQUIRED)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
message("DEP: OPENCV [OK] ")
#libLAS
FIND_PACKAGE(libLAS REQUIRED)
IF(libLAS_FOUND)
INCLUDE_DIRECTORIES(${libLAS_INCLUDE_DIR})
MESSAGE("Found libLAS in: " ${libLAS_INCLUDE_DIR})
ENDIF(libLAS_FOUND)
message("DEP: libLAS [OK] ")
####### Optional libs #######
#CGAL,Qhull, GDAL
# head
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/include/dxflib)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/src SRC_LIST)
#message("SRC_LIST is " ${SRC_LIST})
SET(DEP_LIBS ${DEP_LIBS} ${OpenCV_LIBS} ${PCL_LIBRARIES} ${libLAS_LIBRARIES})
add_executable(roadmarking ${PROJECT_SOURCE_DIR}/test/roadmarking_main.cpp ${SRC_LIST})
target_link_libraries(roadmarking ${DEP_LIBS})