-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
50 lines (38 loc) · 1.33 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
cmake_minimum_required(VERSION 3.0.0)
project(ImageProcessing VERSION 0.1.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_TYPE Release)
file(GLOB_RECURSE SRC "./src/**.cpp")
file(GLOB_RECURSE HDR "./include/**.hpp" "./include/**.h")
file(GLOB_RECURSE SDR "./shaderLib/**.glsl" "./shaders/**.frag" "./shaders/**.vert" "./defaultVS/**.vert")
file(GLOB_RECURSE mains ./examples/*/*/main.cpp)
file(STRINGS "./libconfig/includeDirs.txt" USER_INCLUDE_DIR)
file(STRINGS "./libconfig/libraryDirs.txt" USER_LIB_DIR)
file(STRINGS "./libconfig/dllCopy.txt" USER_DLL)
message(${USER_LIB_DIR})
link_directories(
${USER_LIB_DIR}
)
foreach(file IN LISTS mains)
string(REGEX REPLACE "(.*)\\/([^\\/]+)\\/([^\\/]+)\\/([^\\/]+\\.cpp)$" "example_\\2_\\3" build_item ${file})
message(${build_item})
add_executable(${build_item} ${file} ${SRC} ${HDR})
target_include_directories(
${build_item}
${USER_INCLUDE_DIR}
PRIVATE
"./include/"
"./include/vk"
)
target_link_libraries(
${build_item}
PRIVATE
optimized opencv_world460
debug opencv_world460d
general vulkan-1
)
endforeach()
file(COPY ${USER_DLL} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)