-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
63 lines (50 loc) · 1.32 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
# CMake entry point.
# Note that this CMakeLists.txt in fully independent from the one in the parent directory
# (since that's the goal of this tutorial !)
# For an introduction to CMake, see
# http://www.cmake.org/cmake/help/cmake_tutorial.html (at least steps 1 and 2)
cmake_minimum_required (VERSION 3.10)
set(name "CameraClibration")
project ( ${name} )
# cmake module
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
# c++ version
set (CMAKE_CXX_STANDARD 11)
add_definitions(-D"WIN32_LEAN_AND_MEAN")
add_definitions(-D"ASIO_STANDALONE")
if (UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -lpthread")
endif()
set (WIN_LIB_PATH "E:/libs")
#opencv
if ( WIN32 )
set(OpenCV_DIR ${WIN_LIB_PATH}/OpenCV/x64/vc14/lib)
set(OpenCV_CONFIG_PATH ${WIN_LIB_PATH}/OpenCV)
#set(WIN_HEADER_PATH "${PROJECT_SOURCE_DIR}/winheadfile")
#include_directories(${WIN_HEADER_PATH})
endif()
# OpenCV
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
set(MY_HEADER_FILES
SingleCameraCalibration.h
StereoCameraCalibration.h
INIReader.h
SKCommon.hpp
)
set(MY_SOURCE_FILES
main.cpp
SingleCameraCalibration.cpp
StereoCameraCalibration.cpp
)
include_directories(
${PROJECT_SOURCE_DIR}
)
add_executable(${name}
${MY_HEADER_FILES}
${MY_SOURCE_FILES}
main.cpp
)
target_link_libraries(${name}
${OpenCV_LIBS}
)