-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
47 lines (38 loc) · 1.29 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
cmake_minimum_required(VERSION 3.1)
project(FastHumanDetection)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/modules")
find_package(Threads)
find_package(OpenMP)
add_subdirectory("third_party/glfw-3.1.2")
add_subdirectory("third_party/fann")
option(KINECT_ENABLED "Use KinectV2 SDK" OFF)
option(FHD_INSTALL "Generate install target" OFF)
option(FHD_BUILD_EXAMPLES "Build examples" OFF)
set (CMAKE_CXX_STANDARD 11)
set (ARTIFACT_DIR "${CMAKE_BINARY_DIR}/bin")
if (WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${ARTIFACT_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${ARTIFACT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${ARTIFACT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${ARTIFACT_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${ARTIFACT_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${ARTIFACT_DIR})
add_definitions(
-DNOMINMAX
-D_WIN32_WINNT=0x0501
-D_SCL_SECURE_NO_WARNINGS
-D_CRT_SECURE_NO_WARNINGS
)
find_package(KinectV2 REQUIRED)
else()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ARTIFACT_DIR})
add_definitions(-Wall -Wextra -march=native)
endif()
add_definitions(-DGLFW_INCLUDE_GLEXT)
INCLUDE_DIRECTORIES(SYSTEM
"third_party/glfw-3.1.2/include"
"third_party/eigen"
"third_party/fann/src/include"
src
)
add_subdirectory(src)