-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (47 loc) · 1.21 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
cmake_minimum_required(VERSION 3.25.2)
set(CMAKE_CXX_STANDARD 11)
project(cpp_application)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(EXAMPLES
h3
kafka
rabbitMQ
utils
error
algorithms
)
set(h3_DEPENDENCIES
app_h3::app_h3
h3::h3
)
set(kafka_DEPENDENCIES
app_kafka::app_kafka
app_utils::app_utils
)
set(rabbitMQ_DEPENDENCIES
app_rabbitmq::app_rabbitmq
app_utils::app_utils
)
set(utils_DEPENDENCIES
app_utils::app_utils
)
set(error_DEPENDENCIES
app_utils::app_utils
)
set(algorithms_DEPENDENCIES
app_algorithms::app_algorithms
)
find_package(app_utils CONFIG REQUIRED)
find_package(app_kafka CONFIG REQUIRED)
find_package(app_rabbitmq CONFIG REQUIRED)
find_package(app_h3 CONFIG REQUIRED)
find_package(h3 CONFIG REQUIRED)
find_package(app_algorithms CONFIG REQUIRED)
foreach(name ${EXAMPLES})
add_executable(${name} "./src/${name}.cpp")
foreach(dep ${${name}_DEPENDENCIES})
target_link_libraries(${name} ${dep})
endforeach()
endforeach()