@@ -48,22 +48,27 @@ else()
48
48
message (FATAL_ERROR "Unknown target platform. How did this happen?" )
49
49
endif ()
50
50
51
- if ("${CUSTOM_MEMORY_MANAGEMENT} " STREQUAL "1" )
52
- add_definitions (-DAWS_CUSTOM_MEMORY_MANAGEMENT)
53
- message (STATUS "Custom memory management enabled; stl objects now using custom allocators" )
54
- else ()
55
- message (STATUS "Custom memory management disabled" )
56
- endif ()
57
-
58
51
# shared libraries as intermediate (non-leaf) targets are not supported in android due to std::string issues
59
52
if ("${STATIC_LINKING} " STREQUAL "1" )
60
53
SET (BUILD_SHARED_LIBS 0)
54
+ SET (ARCHIVE_DIRECTORY "lib" )
61
55
message (STATUS "Dynamic linking disabled" )
62
56
else ()
63
57
SET (BUILD_SHARED_LIBS 1)
58
+ SET (ARCHIVE_DIRECTORY "bin" )
64
59
message (STATUS "Dynamic linking enabled" )
65
60
endif ()
66
61
62
+ # If building shared libraries, custom memory management enabled is the default, otherwise regular memory management is the default.
63
+ # We make custom memory management the default on shared library builds because it is safer and much more difficult to accidentally
64
+ # allocate in one DLLs heap while freeing in another (which will lead to runtime crashes)
65
+ if (("${CUSTOM_MEMORY_MANAGEMENT} " STREQUAL "1" ) OR (BUILD_SHARED_LIBS AND NOT ("${CUSTOM_MEMORY_MANAGEMENT} " STREQUAL "0" )))
66
+ add_definitions (-DAWS_CUSTOM_MEMORY_MANAGEMENT)
67
+ message (STATUS "Custom memory management enabled; stl objects now using custom allocators" )
68
+ else ()
69
+ message (STATUS "Custom memory management disabled" )
70
+ endif ()
71
+
67
72
# on Windows, set CURL_DIR to a valid curl install directory in order to use the curl client rather than the windows-specific one
68
73
set (USE_CURL_CLIENT 1)
69
74
if (PLATFORM_WINDOWS)
@@ -84,12 +89,35 @@ endif()
84
89
85
90
project (AWSNativeSDKAll)
86
91
92
+ # install setup
93
+ # This install section must come after the initial "project(..)" declaration since that's when the compiler settings are discovered; prior to that CMAKE_SIZEOF_VOID_P is empty
94
+ # install syntax (after building): cmake -DCMAKE_INSTALL_CONFIG_NAME=<Release/Debug> -DCMAKE_INSTALL_PREFIX=<install_root> -P cmake_install.cmake
95
+ # ToDo: consoles
96
+ if (PLATFORM_WINDOWS)
97
+ set (SDK_INSTALL_BINARY_PREFIX "windows" )
98
+ elseif (PLATFORM_LINUX)
99
+ set (SDK_INSTALL_BINARY_PREFIX "linux" )
100
+ elseif (PLATFORM_ANDROID)
101
+ set (SDK_INSTALL_BINARY_PREFIX "android" )
102
+ elseif (PLATFORM_MAC)
103
+ set (SDK_INSTALL_BINARY_PREFIX "mac" )
104
+ endif ()
105
+
106
+ # ToDo: Mac/ios/android/consoles
107
+ if (PLATFORM_WINDOWS OR PLATFORM_LINUX)
108
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
109
+ set (SDK_INSTALL_BINARY_PREFIX "${SDK_INSTALL_BINARY_PREFIX} /intel64" )
110
+ else ()
111
+ set (SDK_INSTALL_BINARY_PREFIX "${SDK_INSTALL_BINARY_PREFIX} /ia32" )
112
+ endif ()
113
+ endif ()
114
+
115
+ message (STATUS "Install binary prefix: ${SDK_INSTALL_BINARY_PREFIX} " )
116
+
87
117
if (BUILD_SHARED_LIBS )
88
118
SET (LIBTYPE SHARED)
89
119
if (PLATFORM_WINDOWS)
90
120
add_definitions ("-DUSE_IMPORT_EXPORT" )
91
- add_definitions ("-DJSON_DLL_BUILD" )
92
- add_definitions ("-DTINYXML2_EXPORT" )
93
121
SET (SUFFIX dll)
94
122
elseif (PLATFORM_LINUX OR PLATFORM_ANDROID)
95
123
SET (SUFFIX so)
@@ -298,12 +326,18 @@ if(PLATFORM_ANDROID)
298
326
299
327
endif ()
300
328
329
+ #release pdbs in windows
330
+ if (PLATFORM_WINDOWS)
331
+ set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi" )
332
+ set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF" )
333
+ endif ()
334
+
301
335
# default libraries to link in per-platform
302
336
if (PLATFORM_WINDOWS)
303
337
if (USE_CURL_CLIENT)
304
338
set (PLATFORM_DEP_LIBS libcurl)
305
339
else ()
306
- set (PLATFORM_DEP_LIBS Wininet)
340
+ set (PLATFORM_DEP_LIBS Wininet winhttp )
307
341
endif ()
308
342
set (PLATFORM_DEP_LIBS ${PLATFORM_DEP_LIBS} Bcrypt Crypt32 Userenv )
309
343
elseif (PLATFORM_LINUX OR PLATFORM_APPLE)
@@ -312,8 +346,9 @@ elseif(PLATFORM_ANDROID)
312
346
set (PLATFORM_DEP_LIBS curl ssl crypto ${ZLIB_LIBRARY_DIR} /${ZLIB_NAME} .a log atomic)
313
347
endif ()
314
348
315
- #Do Not increment version number for export builds
316
- set (GENERATE_VERSION_INFO 0)
349
+ if (NOT BRAZIL_BUILD)
350
+ set (GENERATE_VERSION_INFO 1)
351
+ endif ()
317
352
318
353
add_subdirectory (aws-cpp-sdk-core)
319
354
add_subdirectory (testing-resources)
@@ -331,7 +366,7 @@ add_subdirectory(aws-cpp-sdk-opsworks)
331
366
add_subdirectory (aws-cpp-sdk-cloudfront)
332
367
add_subdirectory (aws-cpp-sdk-kms)
333
368
add_subdirectory (aws-cpp-sdk-codedeploy)
334
- add_subdirectory (aws-cpp-sdk-redshift)
369
+ # add_subdirectory(aws-cpp-sdk-redshift)
335
370
add_subdirectory (aws-cpp-sdk-iam)
336
371
add_subdirectory (aws-cpp-sdk-ecs)
337
372
add_subdirectory (aws-cpp-sdk-datapipeline)
@@ -349,6 +384,9 @@ add_subdirectory(aws-cpp-sdk-sns)
349
384
add_subdirectory (aws-cpp-sdk-autoscaling)
350
385
add_subdirectory (aws-cpp-sdk-rds)
351
386
add_subdirectory (aws-cpp-sdk-logging)
387
+ add_subdirectory (aws-cpp-sdk-access-management)
388
+ add_subdirectory (aws-cpp-sdk-transfer)
389
+ add_subdirectory (aws-cpp-sdk-queues)
352
390
353
391
if (PLATFORM_ANDROID)
354
392
add_subdirectory (android-unified-tests)
@@ -361,6 +399,11 @@ else()
361
399
add_subdirectory (aws-cpp-sdk-s3-integration-tests)
362
400
add_subdirectory (aws-cpp-sdk-identity-management-tests)
363
401
add_subdirectory (aws-cpp-sdk-logging-tests)
402
+ add_subdirectory (aws-cpp-sdk-transfer-tests)
403
+
404
+ if (PLATFORM_WINDOWS)
405
+ add_subdirectory (aws-cpp-sdk-wininet-winhttp-test )
406
+ endif ()
364
407
endif ()
365
408
366
409
if (BUILD_EXAMPLES)
0 commit comments