forked from swatbotics/apriltag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (23 loc) · 873 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
project(apriltag C CXX)
cmake_minimum_required ( VERSION 2.8 )
if (POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif(POLICY CMP0042)
find_package (Threads REQUIRED)
set(EXTRA_FLAGS "-Wall -Wsign-compare -g ${CMAKE_THREAD_LIBS_INIT} -mcpu=apple-m1")
set(EXTRA_C_FLAGS "${EXTRA_FLAGS} -std=gnu99 -mcpu=apple-m1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS}")
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
if(APPLE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif(APPLE)
add_subdirectory(core)
include_directories(core core/common core/contrib)
include(FindPkgConfig)
pkg_search_module(OPENCV opencv>=2.3 opencv-2.3.1 opencv-3.0.0)
if(OPENCV_FOUND)
include_directories(${OPENCV_INCLUDE_DIRS})
add_subdirectory(opencv)
endif(OPENCV_FOUND)