-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (28 loc) · 984 Bytes
/
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
cmake_minimum_required(VERSION 2.6)
INCLUDE(FindPkgConfig)
PROJECT("camera_calibration")
SET(PROGNAME "cam_calib")
SET(PROGVERSION "0.2")
SET(PACKET "vision")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/bin")
SET(INCLUDEDIR "${PREFIX}/include")
SET(MANDIR "${PREFIX}/man")
SET(LIBDIR "${PREFIX}/lib")
SET(DATADIR "${PREFIX}/share/${PACKET}")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# Find needed list.
SET(REQUIRED_LIBS opencv)
# Deprecated
PKG_CHECK_MODULES(LIBS REQUIRED ${REQUIRED_LIBS})
# Set all sources for your application here.
SET(SOURCES src/CameraCalibOpenCV.cpp)
# This must be invoked *before* any target is created!
LINK_DIRECTORIES(${LIBS_LIBRARY_DIRS})
SET(CMAKE_FIND_ROOT_PATH src)
INCLUDE_DIRECTORIES(src ${LIBS_INCLUDE_DIRS})
SET(EXECUTABLE_OUTPUT_PATH bin)
ADD_EXECUTABLE(${PROGNAME} ${SOURCES})
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
# Add link libraries.
TARGET_LINK_LIBRARIES(${PROGNAME} ${LIBNAME} ${LIBS_LDFLAGS})