-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
85 lines (71 loc) · 2.82 KB
/
Copy pathCMakeLists.txt
File metadata and controls
85 lines (71 loc) · 2.82 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
file(GLOB HEADER_LIST CONFIGURE_DEPENDS
"${LaunchDarklyCPPClient_SOURCE_DIR}/include/launchdarkly/client_side/*.hpp"
)
if (LD_BUILD_SHARED_LIBS)
message(STATUS "LaunchDarkly: building client-sdk as shared library")
add_library(${LIBNAME} SHARED)
else ()
message(STATUS "LaunchDarkly: building client-sdk as static library")
add_library(${LIBNAME} STATIC)
endif ()
target_sources(${LIBNAME} PRIVATE
${HEADER_LIST}
data_sources/streaming_data_source.cpp
data_sources/fdv2/fdv2_changeset_translation.cpp
data_sources/fdv2/fdv2_source_result.cpp
data_sources/data_source_event_handler.cpp
data_sources/polling_data_source.cpp
flag_manager/flag_store.cpp
flag_manager/flag_updater.cpp
flag_manager/flag_change_event.cpp
data_sources/data_source_status.cpp
client_impl.cpp
client.cpp
client_impl.hpp
data_sources/data_source_event_handler.hpp
data_sources/data_source_status_manager.hpp
data_sources/data_source_update_sink.hpp
data_sources/polling_data_source.hpp
data_sources/streaming_data_source.hpp
data_sources/fdv2/fdv2_changeset_translation.hpp
data_sources/fdv2/fdv2_source_result.hpp
data_sources/fdv2/ifdv2_initializer.hpp
data_sources/fdv2/ifdv2_initializer_factory.hpp
data_sources/fdv2/ifdv2_synchronizer.hpp
data_sources/fdv2/ifdv2_synchronizer_factory.hpp
flag_manager/flag_store.hpp
flag_manager/flag_updater.hpp
bindings/c/sdk.cpp
bindings/c/builder.cpp
bindings/c/config.cpp
data_sources/null_data_source.cpp
flag_manager/context_index.cpp
flag_manager/flag_manager.cpp
flag_manager/flag_persistence.cpp
)
target_link_libraries(${LIBNAME}
PUBLIC launchdarkly::common
PRIVATE Boost::headers Boost::json Boost::url launchdarkly::sse launchdarkly::internal foxy)
if (LD_CURL_NETWORKING)
target_link_libraries(${LIBNAME} PRIVATE launchdarkly::networking)
endif()
target_include_directories(${LIBNAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
$<INSTALL_INTERFACE:include>
)
# Minimum C++ standard needed for consuming the public API is C++17.
target_compile_features(${LIBNAME} PUBLIC cxx_std_17)
add_library(launchdarkly::client ALIAS ${LIBNAME})
if (LD_BUILD_SHARED_LIBS AND MSVC)
install(FILES $<TARGET_PDB_FILE:${LIBNAME}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
endif ()
# Using PUBLIC_HEADERS would flatten the include.
# This will preserve it, but dependencies must do the same.
install(DIRECTORY "${LaunchDarklyCPPClient_SOURCE_DIR}/include/launchdarkly"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
install(
TARGETS ${LIBNAME} OPTIONAL
EXPORT ${LD_TARGETS_EXPORT_NAME}
)