-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathCMakeLists.txt
64 lines (52 loc) · 2.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
59
60
61
62
63
64
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0060 NEW)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -O3 -g")
project(deep_sort)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
if(COMPILER_SUPPORTS_CXX14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
find_package(OpenCV REQUIRED)
message(STATUS "OpenCV library status:")
message(STATUS " version: ${OpenCV_VERSION}")
message(STATUS " libraries: ${OpenCV_LIBS}")
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
find_package(OpenMP REQUIRED)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
find_package(Eigen3 REQUIRED)
find_package(Boost COMPONENTS system)
find_package(TensorflowCC COMPONENTS Shared)
find_package(CUDA)
include_directories(${EIGEN3_INCLUDE_DIR})
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${PROJECT_BINARY_DIR}/../src/matching/include/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src/matching/include/)
include_directories(${PROJECT_BINARY_DIR}/../src/thirdPart/include/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src/thirdPart/include/)
include_directories(${PROJECT_BINARY_DIR}/../src/features/include/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src/features/include/)
include_directories(${PROJECT_BINARY_DIR}/../src/app/include/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src/app/include/)
add_definitions(-Wuninitialized)
add_definitions(-Wreturn-type)
add_definitions(-Wsign-compare)
add_definitions(-Wuninitialized)
add_definitions(-Wunused-function)
add_definitions(-Wunused-label)
add_definitions(-Wunused-value)
add_definitions(-Wunused-variable)
set(EXECUTABLE_OUTPUT_PATH ../bin)
set(LIBRARY_OUTPUT_PATH ../lib)
file(GLOB_RECURSE SRC_FILES "src/app/src/*.cpp" "src/features/*.cpp" "src/matching/src/*.cpp" "src/thirdPart/src/*.cpp")
#Library
add_library(deepsort SHARED ${SRC_FILES})
target_link_libraries(deepsort ${OpenCV_LIBS} ${Boost_LIBRARIES} TensorflowCC::Shared ${CUDA_LIBRARIES})
add_executable(deep_sort ${SRC_FILES})
target_link_libraries(deep_sort deepsort)