-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
31 lines (25 loc) · 891 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
cmake_minimum_required(VERSION 3.6.3)
project(webcamvb)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
file(GLOB_RECURSE SOURCE_FILES src/**.cc src/**.cpp src/**.h src/**.hpp build/**.cc build/**.cpp build/**.h build/**.hpp)
set(dir_list "")
foreach(sourcefile ${SOURCE_FILES})
get_filename_component(dir ${sourcefile} PATH)
while(NOT "${dir}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
if(IS_DIRECTORY ${dir})
if (NOT dir IN_LIST dir_list)
# message(STATUS ${dir})
set(dir_list ${dir_list} ${dir})
endif()
endif()
get_filename_component(dir ${dir} PATH)
endwhile()
endforeach()
list(REMOVE_DUPLICATES dir_list)
foreach(dir ${dir_list})
message(STATUS ${dir})
include_directories(${dir})
endforeach()
add_executable(webcamvb ${SOURCE_FILES})