-
Notifications
You must be signed in to change notification settings - Fork 18
/
CMakeLists.txt
46 lines (38 loc) · 1.34 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
SET(PROJECT_NAME "vivaTracker")
PROJECT("${PROJECT_NAME}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# add opencv package to the project
FIND_PACKAGE( OpenCV REQUIRED )
INCLUDE_DIRECTORIES( ${OpenCV_INCLUDE_DIRS} )
MESSAGE(STATUS "Project Name: ${PROJECT_NAME}")
MESSAGE(STATUS " OpenCV version: ${OpenCV_VERSION} ")
MESSAGE(STATUS " libraries: ${OpenCV_LIBS}")
MESSAGE(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
FILE(GLOB files
"*.h"
"*.cpp"
)
ADD_EXECUTABLE(${PROJECT_NAME} ${files})
# Include libraries and trackers to project
SUBDIRS(vivalib trackerlib)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/vivalib)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/trackerlib)
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${OpenCV_LIBS} trackerlib vivalib )
#Needed because Struck tracker
SET(EIGEN3_INCLUDE_DIRS "" CACHE FILEPATH "Path to eigen3 directory")
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIRS})
#Datasets and Trackers
INCLUDE("macros.txt")
CHECK_DATASETS()
CHECK_TRACKERS()
# Copy resources in source folder to build folders
FILE(GLOB hidden
".*"
)
FILE(GLOB resources
"*.*"
)
LIST(REMOVE_ITEM resources ${files} ${hidden} "${CMAKE_SOURCE_DIR}/CMakeLists.txt" "${CMAKE_SOURCE_DIR}/macros.txt" "${CMAKE_SOURCE_DIR}/precomp.h.in")
FILE(COPY ${resources} DESTINATION "Debug")
FILE(COPY ${resources} DESTINATION "Release")