-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
55 lines (41 loc) · 1.36 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
# Copyright (c) 2015-2018, David Hirvonen
# All rights reserved.
cmake_minimum_required(VERSION 3.1)
### Hunter snapshot that will be used ###
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.19.238.tar.gz"
SHA1 "9e103596184adb7206430047375a07eb1fa6a9b4"
)
project(cvsteer VERSION 0.1.2)
set(CVSTEER_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
option(CVSTEER_BUILD_EXAMPLE "Build example" OFF)
option(CVSTEER_BUILD_TEST "Build test" OFF)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if(IOS OR ANDROID)
set(CVSTEER_IS_MOBILE TRUE)
else()
set(CVSTEER_IS_MOBILE FALSE)
endif()
option(CVSTEER_CHECK_CI_TAG "Check project vs git tag consistency" OFF)
if(CVSTEER_CHECK_CI_TAG)
hunter_add_package(check_ci_tag)
find_package(check_ci_tag CONFIG REQUIRED)
check_ci_tag()
endif()
## #################################################################
## Dependencies - OpenCV
## #################################################################
hunter_add_package(OpenCV)
find_package(OpenCV REQUIRED)
## #################################################################
## Project
## #################################################################
add_subdirectory(cvsteer)
if(CVSTEER_BUILD_EXAMPLE)
add_subdirectory(example)
endif()
if(CVSTEER_BUILD_TEST AND NOT CVSTEER_IS_MOBILE)
enable_testing()
add_subdirectory(test)
endif()