File tree Expand file tree Collapse file tree 8 files changed +133
-108
lines changed Expand file tree Collapse file tree 8 files changed +133
-108
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ if (${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64")
12
12
set (FIND_LIBRARY_USE_LIB64_PATHS true )
13
13
endif ()
14
14
15
+ if (NOT CMAKE_CXX_STANDARD )
16
+ set (CMAKE_CXX_STANDARD 11 )
17
+ endif ()
18
+
15
19
if (BUILD_DEPS )
16
20
set (AWS_DEPS_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR} /deps )
17
21
if (DEFINED CMAKE_INSTALL_PREFIX )
88
92
endif ()
89
93
list (APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH} /${CMAKE_INSTALL_LIBDIR} /cmake" )
90
94
91
- if (NOT CMAKE_CXX_STANDARD )
92
- set (CMAKE_CXX_STANDARD 11 )
93
- endif ()
95
+ include (AwsCFlags )
96
+ include (AwsSharedLibSetup )
94
97
95
98
file (GLOB AWS_CRT_HEADERS
96
99
"include/aws/crt/*.h"
@@ -165,14 +168,15 @@ endif()
165
168
166
169
add_library (${CMAKE_PROJECT_NAME} ${AWS_CRT_CPP_SRC} )
167
170
168
- if (BUILD_SHARED_LIBS AND WIN32 )
169
- target_compile_definitions (${CMAKE_PROJECT_NAME} PUBLIC -DUSE_IMPORT_EXPORT )
171
+ if (BUILD_SHARED_LIBS )
172
+ target_compile_definitions (${CMAKE_PROJECT_NAME} PUBLIC -DAWS_CRT_CPP_USE_IMPORT_EXPORT )
170
173
target_compile_definitions (${CMAKE_PROJECT_NAME} PRIVATE -DAWS_CRT_CPP_EXPORTS )
171
174
endif ()
172
175
173
176
set_target_properties (${CMAKE_PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX )
177
+ set_target_properties (${CMAKE_PROJECT_NAME} PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD} )
174
178
175
- set ( CMAKE_C_FLAGS_DEBUGOPT " " )
179
+ aws_prepare_symbol_visibility_args ( ${CMAKE_PROJECT_NAME} "AWS_CRT_CPP " )
176
180
177
181
#set warnings
178
182
if (MSVC )
Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ if (UNIX AND NOT APPLE)
27
27
endif ()
28
28
29
29
set (AWS_C_IO_URL "https://github.com/awslabs/aws-c-io.git" )
30
- set (AWS_C_IO_SHA "v0.2.3 " )
30
+ set (AWS_C_IO_SHA "v0.2.4 " )
31
31
include (BuildAwsCIO )
32
32
33
33
set (AWS_C_MQTT_URL "https://github.com/awslabs/aws-c-mqtt.git" )
34
- set (AWS_C_MQTT_SHA "v0.2.2 " )
34
+ set (AWS_C_MQTT_SHA "v0.3.1 " )
35
35
include (BuildAwsCMqtt )
36
36
37
37
set (AWS_C_CAL_URL "https://github.com/awslabs/aws-c-cal.git" )
@@ -46,3 +46,4 @@ if (UNIX AND NOT APPLE)
46
46
else ()
47
47
add_dependencies (AwsCIO AwsCCommon )
48
48
endif ()
49
+
Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
#if defined(USE_WINDOWS_DLL_SEMANTICS ) || defined(WIN32 )
19
- # ifdef USE_IMPORT_EXPORT
19
+ # ifdef AWS_CRT_CPP_USE_IMPORT_EXPORT
20
20
# ifdef AWS_CRT_CPP_EXPORTS
21
21
# define AWS_CRT_CPP_API __declspec(dllexport)
22
22
# else
23
23
# define AWS_CRT_CPP_API __declspec(dllimport)
24
24
# endif /* AWS_CRT_CPP_API */
25
25
# else
26
26
# define AWS_CRT_CPP_API
27
- # endif // USE_IMPORT_EXPORT
27
+ # endif // AWS_CRT_CPP_USE_IMPORT_EXPORT
28
28
29
29
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
30
- # define AWS_CRT_CPP_API
31
- #endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
30
+ # if ((__GNUC__ >= 4 ) || defined(__clang__ )) && defined(AWS_CRT_CPP_USE_IMPORT_EXPORT ) && \
31
+ defined(AWS_CRT_CPP_EXPORTS )
32
+ # define AWS_CRT_CPP_API __attribute__((visibility("default")))
33
+ # else
34
+ # define AWS_CRT_CPP_API
35
+ # endif // __GNUC__ >= 4 || defined(__clang__)
36
+ #endif
Original file line number Diff line number Diff line change @@ -129,7 +129,11 @@ namespace Aws
129
129
* Initiates the connection, OnConnectionCompleted will
130
130
* be invoked in an event-loop thread.
131
131
*/
132
- bool Connect (const char *clientId, bool cleanSession, uint16_t keepAliveTime) noexcept ;
132
+ bool Connect (
133
+ const char *clientId,
134
+ bool cleanSession,
135
+ uint16_t keepAliveTimeSecs = 0 ,
136
+ uint32_t pingTimeoutMs = 0 ) noexcept ;
133
137
134
138
/* *
135
139
* Initiates disconnect, OnDisconnectHandler will be invoked in an event-loop thread.
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ file(GLOB MQTT_PUB_SUB_SRC
9
9
set (PUB_SUB_PROJECT_NAME aws-crt-cpp-mqtt-pub-sub )
10
10
add_executable (${PUB_SUB_PROJECT_NAME} ${MQTT_PUB_SUB_SRC} )
11
11
set_target_properties (${PUB_SUB_PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX )
12
+ set_target_properties (${PUB_SUB_PROJECT_NAME} PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD} )
12
13
13
14
set (CMAKE_C_FLAGS_DEBUGOPT "" )
14
15
You can’t perform that action at this time.
0 commit comments