-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
55 lines (31 loc) · 1.46 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
project(MTTracker)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "-fpermissive -std=c++0x -Wno-literal-suffix")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -g")
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
set(SHARED_LIBS_DEFAULT ON)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMAKE_HELPERS)
find_package(Boost 1.57 COMPONENTS program_options thread system REQUIRED)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
find_package(OpenMP)
if (OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
find_package( OpenCV REQUIRED )
find_package( Threads REQUIRED )
find_package( Eigen2 REQUIRED )
file(GLOB srcs ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
set(srcs ${srcs})
add_library(tracking SHARED ${srcs})
file(GLOB Detectorsrcs ${CMAKE_CURRENT_SOURCE_DIR}/Det/*.cpp)
add_library(DetNodes ${Detectorsrcs})
add_executable(tracker mainMulti.cpp)
target_link_libraries(tracker tracking DetNodes ${REQUIRED_LIBRARIES} ${Boost_LIBRARIES} ${OpenCV_LIBS} -lpthread -lrt -fopenmp )
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Det)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)