-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
executable file
·58 lines (47 loc) · 1.35 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
cmake_minimum_required(VERSION 2.8.1 FATAL_ERROR)
set (PROJECT_NAME HumanBodyScanner)
project( ${PROJECT_NAME} )
option(WITH_OPENCV "" ON)
option(WITH_PCL "" OFF)
macro(use_cxx11)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()
endmacro(use_cxx11)
use_cxx11()
file(GLOB PROJECT_FILES
"source/*.h"
"source/*.cpp"
"source/aggr/*.h"
"source/aggr/*.cpp"
"source/cost/*.h"
"source/cost/*.cpp"
"source/features/*.h"
"source/features/*.cpp"
"source/hashmap/*.h"
"source/hashmap/*.cpp"
"source/qx_upsampling/*.h"
"source/qx_upsampling/*.cpp"
)
if(WITH_OPENCV)
find_package(OpenCV REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} )
link_directories( ${OpenCV_LIB_DIR} )
endif(WITH_OPENCV)
if(WITH_PCL)
find_package(PCL 1.8 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
endif(WITH_PCL)
add_executable ( ${PROJECT_NAME} ${PROJECT_FILES})
if(WITH_OPENCV)
target_link_libraries ( ${PROJECT_NAME} ${OpenCV_LIBS} )
endif(WITH_OPENCV)
if(WITH_PCL)
target_link_libraries ( ${PROJECT_NAME} ${PCL_LIBRARIES} )
endif(WITH_PCL)