-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
40 lines (28 loc) · 1.06 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
cmake_minimum_required( VERSION 2.8 )
project(ProjectStereoCalib)
# Check C++11 or C++0x support
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
#if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions(-DCOMPILEDWITHC11)
message(STATUS "Using flag -std=c++11.")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread -ggdb -O0 -march=native ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -ggdb -O0 -march=native ")
set(OpenCV_DIR "/usr/local/include/opencv3.2.0/share/OpenCV")
find_package( OpenCV REQUIRED )
message( ${OpenCV_VERSION} )
message( ${OpenCV_INSTALL_PATH} )
include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/include
${OpenCV_INCLUDE_DIRS}
)
message( ${OpenCV_INCLUDE_DIRS} )
add_executable( ${PROJECT_NAME} src/calibCoreAlgorithm.cpp src/main_calibrate.cpp )
target_link_libraries( ${PROJECT_NAME}
${OpenCV_LIBS}
jsoncpp
)
message("PROJECT_LIB_DIR : ${PROJECT_LIB_DIR}")