forked from BartekkPL/logo-recognizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (47 loc) · 1.81 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
cmake_minimum_required (VERSION 3.8.2)
project (logo-recognizer)
# enable C and C++14 language
enable_language (C CXX)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-sign-compare -g")
message(STATUS "Start of CMake execution for Logo Recognizer")
# location of additional cmake modules
set(CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake
)
# detect operating system
message(STATUS "We are on a ${CMAKE_SYSTEM_NAME} system")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_definitions(-DSYSTEM_LINUX)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_definitions(-DSYSTEM_WINDOWS)
endif()
# detect host processor
message(STATUS "The host processor is ${CMAKE_HOST_SYSTEM_PROCESSOR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
#-------------------------------------------------------------------------------
# EXECUTABLE SOURCES SETTING
#-------------------------------------------------------------------------------
set (RECOGNIZER_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
set (RECOGNIZER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
file(GLOB RECOGNIZER_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc"
)
add_executable (logo-recognizer ${RECOGNIZER_SOURCES})
target_include_directories (logo-recognizer PUBLIC
${RECOGNIZER_INCLUDE_DIR}
)
# target to update git submodules
add_custom_target(
update_submodules
COMMAND git submodule init
COMMAND git submodule update
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
#-------------------------------------------------------------------------------
# EXTERNAL LIBRARIES
#-------------------------------------------------------------------------------
find_package (OpenCV REQUIRED)
target_link_libraries (logo-recognizer ${OpenCV_LIBS})
target_link_libraries (logo-recognizer stdc++fs)