-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
64 lines (51 loc) · 1.81 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.7 FATAL_ERROR)
project(cameracalibration)
#------------------------------------------------------------------------------
# Required CPM Setup - no need to modify - See: https://github.com/iauns/cpm
#------------------------------------------------------------------------------
set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpm_packages" CACHE TYPE STRING)
find_package(Git)
if(NOT GIT_FOUND)
message(FATAL_ERROR "CPM requires Git.")
endif()
if (NOT EXISTS ${CPM_DIR}/CPM.cmake)
message(STATUS "Cloning repo (https://github.com/iauns/cpm)")
execute_process(
COMMAND "${GIT_EXECUTABLE}" clone https://github.com/iauns/cpm ${CPM_DIR}
RESULT_VARIABLE error_code
OUTPUT_QUIET ERROR_QUIET)
if(error_code)
message(FATAL_ERROR "CPM failed to get the hash for HEAD")
endif()
endif()
include(${CPM_DIR}/CPM.cmake)
#------------------------------------------------------------------------------
# CPM Modules
#------------------------------------------------------------------------------
if(NOT DEFINED CMAKECONFIG_PATH)
CPM_AddModule("cmakeconfig"
GIT_REPOSITORY "https://github.com/BioroboticsLab/cmakeconfig.git"
GIT_TAG "master")
else()
CPM_AddModule("cmakeconfig"
SOURCE_DIR "${CMAKECONFIG_PATH}")
endif()
include_biotracker_core("master")
CPM_Finish()
biorobotics_config()
find_package(OpenCV REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5OpenGL REQUIRED)
include_directories(
${PROJECT_SOURCE_DIR}
SYSTEM ${Qt5Widgets_INCLUDE_DIRS}
SYSTEM ${Qt5OpenGL_INCLUDE_DIRS}
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
add_definitions(${Qt5Widgets_DEFINITIONS})
add_definitions(-DQT_NO_KEYWORDS)
add_library(cameracalibration.tracker SHARED
CameraCalib.cpp
)
target_link_libraries(cameracalibration.tracker ${OpenCV_LIBS})