-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
53 lines (42 loc) · 1.91 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
# - This Software for Robomaster 2018
#
# Copyright (c) 2018 Robomaster, Xidian University
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
cmake_minimum_required(VERSION 3.1)
# Define project name
project(autocar)
message(STATUS "This is Robomaster Vision program:")
set(CMAKE_BUILE_TYPE RELEASE)
# using C++11
set(CMAKE_CXX_FLAGS "${CAMKE_CXX_FLAGS} -std=c++11 -pthread")
# Find OpenCV
find_package(OpenCV REQUIRED)
message(STATUS "====================================================")
message(STATUS "OpenCV library status:")
message(STATUS " version: ${OpenCV_VERSION}")
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
set(CURRENT_PROJET_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CURRENT_PROJET_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CURRENT_PROJET_DIR}/build/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CURRENT_PROJET_DIR}/build/lib)
# Add headers location to include paths
include_directories(
${OpenCV_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/inlcude
)
message(STATUS "====================================================")
message(STATUS "my include path: ${CMAKE_CURRENT_SOURCE_DIR}/inlcude")
message(STATUS "my library path: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
message(STATUS "====================================================")
# find_package( OpenMP REQUIRED)
# if(OPENMP_FOUND)
# message("OPENMP FOUND")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
# endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/common)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/detect_factory)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/slover)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/driver)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/utility)