@@ -54,6 +54,7 @@ set(USE_CALLBACK_API ON)
54
54
set (USE_SET_DNS_SERVERS ON )
55
55
set (USE_IPV6 ON )
56
56
set (USE_SUBSCRIBE_EVENT_ENGINE ON )
57
+ set (USE_LOG_CALLBACK ON )
57
58
set (USE_NTF_RUNTIME_SELECTION ON )
58
59
59
60
if (WIN32 OR WIN64 OR MSVC )
@@ -63,7 +64,7 @@ endif()
63
64
FetchContent_Declare(
64
65
pubnub
65
66
GIT_REPOSITORY https://github.com/pubnub/c-core.git
66
- GIT_TAG feat/runtime-api-enforcement
67
+ GIT_TAG v5.0.0
67
68
GIT_SHALLOW TRUE
68
69
GIT_PROGRESS ON
69
70
SYSTEM
@@ -88,9 +89,11 @@ endif()
88
89
if (${ENABLE_C_ABI} )
89
90
target_compile_options (pubnub PUBLIC -DPUBNUB_SDK_VERSION_SUFFIX=\"/CA-Unity/0.4.3\")
90
91
else ()
91
- target_compile_options (pubnub PUBLIC -DPUBNUB_SDK_VERSION_SUFFIX=\"/CA-Unreal/0.3.0 \")
92
+ target_compile_options (pubnub PUBLIC -DPUBNUB_SDK_VERSION_SUFFIX=\"/CA-Unreal/0.3.3 \")
92
93
endif ()
93
- target_compile_options (pubnub PUBLIC -DPUBNUB_NTF_RUNTIME_SELECTION -DPUBNUB_USE_SUBSCRIBE_EVENT_ENGINE=1 -DPUBNUB_USE_SUBSCRIBE_V2=1 -DPUBNUB_CALLBACK_API=1 -DPUBNUB_SET_DNS_SERVERS=1 -DPUBNUB_USE_IPV6=1)
94
+
95
+ set (CCORE_COMPILE_OPTIONS -DPUBNUB_NTF_RUNTIME_SELECTION -DPUBNUB_USE_SUBSCRIBE_EVENT_ENGINE=1 -DPUBNUB_USE_SUBSCRIBE_V2=1 -DPUBNUB_CALLBACK_API=1 -DPUBNUB_SET_DNS_SERVERS=1 -DPUBNUB_USE_IPV6=1 -DPUBNUB_USE_LOG_CALLBACK=1)
96
+ target_compile_options (pubnub PUBLIC ${CCORE_COMPILE_OPTIONS} )
94
97
95
98
FetchContent_Declare(
96
99
json
@@ -133,7 +136,8 @@ set(INFRA_SOURCES
133
136
${CMAKE_CURRENT_SOURCE_DIR} /src/infra/timer.cpp
134
137
${CMAKE_CURRENT_SOURCE_DIR} /src/infra/pubnub.cpp
135
138
${CMAKE_CURRENT_SOURCE_DIR} /src/infra/interval_task.cpp
136
- ${CMAKE_CURRENT_SOURCE_DIR} /src/infra/rate_limiter.cpp)
139
+ ${CMAKE_CURRENT_SOURCE_DIR} /src/infra/rate_limiter.cpp
140
+ ${CMAKE_CURRENT_SOURCE_DIR} /src/infra/logger.cpp)
137
141
138
142
set (DOMAIN_SOURCES
139
143
${CMAKE_CURRENT_SOURCE_DIR} /src/domain/chat_entity.cpp
@@ -181,8 +185,7 @@ set(SOURCES
181
185
${CMAKE_CURRENT_SOURCE_DIR} /src/presentation/access_manager.cpp
182
186
${CMAKE_CURRENT_SOURCE_DIR} /src/presentation/callback_handle.cpp
183
187
${CMAKE_CURRENT_SOURCE_DIR} /src/chat_helpers.cpp
184
- ${CMAKE_CURRENT_SOURCE_DIR} /src/string .cpp
185
- )
188
+ ${CMAKE_CURRENT_SOURCE_DIR} /src/string .cpp)
186
189
187
190
if (${ENABLE_C_ABI} )
188
191
add_compile_definitions (PN_CHAT_C_ABI)
@@ -212,19 +215,19 @@ set(SOURCES
212
215
213
216
add_library (pubnub-chat SHARED ${SOURCES} )
214
217
215
- target_compile_options (pubnub-chat PRIVATE -DPUBNUB_NTF_RUNTIME_SELECTION -DPUBNUB_USE_SUBSCRIBE_EVENT_ENGINE=1 -DPUBNUB_USE_SUBSCRIBE_V2=1 -DPUBNUB_CALLBACK_API=1 -DPUBNUB_SET_DNS_SERVERS=1 -DPUBNUB_USE_IPV6=1 )
218
+ target_compile_options (pubnub-chat PRIVATE ${CCORE_COMPILE_OPTIONS} )
216
219
217
220
target_link_libraries (pubnub-chat PRIVATE -lpthread pubnub)
218
221
219
222
# TODO: kept for debugging purposes - should be deleted before release
220
223
add_executable (pubnub-chat-example example/main.cpp)
221
- target_compile_options (pubnub-chat-example PRIVATE -DPUBNUB_NTF_RUNTIME_SELECTION -DPUBNUB_USE_SUBSCRIBE_EVENT_ENGINE=1 -DPUBNUB_USE_SUBSCRIBE_V2=1 -DPUBNUB_CALLBACK_API=1 -DPUBNUB_SET_DNS_SERVERS=1 -DPUBNUB_USE_IPV6=1 )
224
+ target_compile_options (pubnub-chat-example PRIVATE ${CCORE_COMPILE_OPTIONS} )
222
225
target_link_libraries (pubnub-chat-example PUBLIC -lpthread pubnub-chat)
223
226
224
227
if (${COMPILE_EXAMPLES} )
225
228
function (example name )
226
229
add_executable (pubnub_${name} example/${name} .cpp)
227
- target_compile_options (pubnub_${name} PRIVATE -DPUBNUB_NTF_RUNTIME_SELECTION -DPUBNUB_USE_SUBSCRIBE_EVENT_ENGINE=1 -DPUBNUB_USE_SUBSCRIBE_V2=1 -DPUBNUB_CALLBACK_API=1 -DPUBNUB_SET_DNS_SERVERS=1 -DPUBNUB_USE_IPV6=1 )
230
+ target_compile_options (pubnub_${name} PRIVATE ${CCORE_COMPILE_OPTIONS} )
228
231
target_link_libraries (pubnub_${name} PRIVATE pubnub-chat)
229
232
endfunction ()
230
233
0 commit comments