-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
115 lines (97 loc) · 3.32 KB
/
CMakeLists.txt
File metadata and controls
115 lines (97 loc) · 3.32 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
cmake_minimum_required(VERSION 3.25.2)
project(cppBase VERSION 0.1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
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)
option(CPPBASE_BUILD_UTILS "Build the shared utility library" ON)
option(CPPBASE_BUILD_KAFKA "Build the Kafka integration library" ON)
option(CPPBASE_BUILD_RABBITMQ "Build the RabbitMQ integration library" ON)
option(CPPBASE_BUILD_DATABASE "Build the database integration library" ON)
option(CPPBASE_BUILD_BLOCKCHAIN "Build the blockchain demonstration library" ON)
option(CPPBASE_BUILD_ALGORITHMS "Build the algorithms helper library" ON)
option(CPPBASE_BUILD_H3 "Build the H3 geospatial library" ON)
option(CPPBASE_BUILD_HTTP "Build the HTTP helper library" ON)
option(CPPBASE_BUILD_CONFIG "Build the configuration management library" ON)
option(CPPBASE_BUILD_AUTH "Build the authentication helper library" ON)
option(CPPBASE_BUILD_MONITORING "Build the monitoring utilities" ON)
option(CPPBASE_BUILD_CACHE "Build the cache abstraction library" ON)
set(_cppbase_enabled_targets)
if(CPPBASE_BUILD_UTILS)
add_subdirectory(app_utils/src)
if(TARGET app_utils)
list(APPEND _cppbase_enabled_targets app_utils)
endif()
endif()
if(CPPBASE_BUILD_KAFKA)
add_subdirectory(app_kafka/src)
if(TARGET app_kafka)
list(APPEND _cppbase_enabled_targets app_kafka)
endif()
endif()
if(CPPBASE_BUILD_RABBITMQ)
add_subdirectory(app_rabbitMQ/src)
if(TARGET app_rabbitmq)
list(APPEND _cppbase_enabled_targets app_rabbitmq)
endif()
endif()
if(CPPBASE_BUILD_DATABASE)
add_subdirectory(app_database/src)
if(TARGET app_database)
list(APPEND _cppbase_enabled_targets app_database)
endif()
endif()
if(CPPBASE_BUILD_BLOCKCHAIN)
add_subdirectory(app_blokchain/src)
if(TARGET app_blockchain)
list(APPEND _cppbase_enabled_targets app_blockchain)
endif()
endif()
if(CPPBASE_BUILD_ALGORITHMS)
add_subdirectory(app_algorithms/src)
if(TARGET app_algorithms)
list(APPEND _cppbase_enabled_targets app_algorithms)
endif()
endif()
if(CPPBASE_BUILD_H3)
add_subdirectory(app_h3/src)
if(TARGET app_h3)
list(APPEND _cppbase_enabled_targets app_h3)
endif()
endif()
if(CPPBASE_BUILD_HTTP)
add_subdirectory(app_http/src)
if(TARGET app_http)
list(APPEND _cppbase_enabled_targets app_http)
endif()
endif()
if(CPPBASE_BUILD_CONFIG)
add_subdirectory(app_config/src)
if(TARGET app_config)
list(APPEND _cppbase_enabled_targets app_config)
endif()
endif()
if(CPPBASE_BUILD_AUTH)
add_subdirectory(app_auth/src)
if(TARGET app_auth)
list(APPEND _cppbase_enabled_targets app_auth)
endif()
endif()
if(CPPBASE_BUILD_MONITORING)
add_subdirectory(app_monitoring/src)
if(TARGET app_monitoring)
list(APPEND _cppbase_enabled_targets app_monitoring)
endif()
endif()
if(CPPBASE_BUILD_CACHE)
add_subdirectory(app_cache/src)
if(TARGET app_cache)
list(APPEND _cppbase_enabled_targets app_cache)
endif()
endif()
if(_cppbase_enabled_targets)
add_library(cppbase INTERFACE)
target_link_libraries(cppbase INTERFACE ${_cppbase_enabled_targets})
endif()