-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
28 lines (22 loc) · 689 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
cmake_minimum_required(VERSION 3.0)
project(shadows)
find_package(OpenCV)
file(GLOB shadows_lib_src
"src/*.cpp"
"src/utils/*.cpp"
)
include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${OpenCV_INCLUDE_DIRS})
add_library(shadows_lib ${shadows_lib_src})
target_link_libraries(shadows_lib ${OpenCV_LIBS})
set(CMAKE_CXX_FLAGS "-O2 -fno-stack-protector -Werror=vla")
# Build demo application and copy samples if required by option
if(BUILD_EXAMPLES)
set(sample_src
main.cpp
)
add_executable(shadows_Demo ${sample_src})
target_link_libraries(shadows_Demo shadows_lib)
# Copy samples to build directory
file(COPY samples/ DESTINATION samples/)
endif(BUILD_EXAMPLES)