You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using git submodule as a new approach to consume AWS common runtime libraries.
aws-crt-cpp (https://github.com/awslabs/aws-crt-cpp) is C++ wrapper around the aws-c-* libraries, which includes aws-c-event-stream, aws-c-auth, aws-c-http and so on.
Copy file name to clipboardExpand all lines: CMakeLists.txt
+43-96
Original file line number
Diff line number
Diff line change
@@ -18,19 +18,18 @@ endif()
18
18
if(POLICY CMP0057)
19
19
cmake_policy(SET CMP0057 NEW) # support IN_LIST
20
20
endif()
21
+
if (POLICY CMP0077)
22
+
cmake_policy(SET CMP0077 OLD) # Enable options to get their values from normal variables
23
+
endif()
21
24
22
-
23
-
# 3.0 or higher is strongly suggested; build settings (target_compile_options/etc...) sometimes do not get propagated properly under certain conditions prior to this version
25
+
# 3.12 or higher is strongly suggested; build settings (target_compile_options/etc...) sometimes do not get propagated properly under certain conditions prior to this version
24
26
# Making this a hard requirement is potentially disruptive to existing customers who aren't affected by the bad behavior though, so just warn for now
25
-
if(CMAKE_MAJOR_VERSIONLESS 3)
26
-
message(WARNING "Building with CMake 3.0 or higher is strongly suggested; current version is ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
27
+
if(CMAKE_VERSIONVERSION_LESS 3.12)
28
+
message(WARNING "Building with CMake 3.12 or higher is strongly suggested; current version is ${CMAKE_VERSION}")
# git is required for Android builds and building third-party dependencies
32
-
find_package(Git)
33
-
34
33
# Cmake invocation variables:
35
34
# CUSTOM_MEMORY_MANAGEMENT - if set to ON, generates the sdk project files with custom memory management enabled, otherwise disables it
36
35
# BUILD_ONLY - only build project identified by this variable, a semi-colon delimited list, if this is set we will build only the projects listed. Core will always be built as will its unit tests.
@@ -71,10 +70,7 @@ option(ENABLE_VIRTUAL_OPERATIONS "This option usually works with REGENERATE_CLIE
71
70
72
71
set(BUILD_ONLY ""CACHESTRING"A semi-colon delimited list of the projects to build")
73
72
set(CPP_STANDARD "11"CACHESTRING"Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.")
74
-
75
-
if(NOTCMAKE_BUILD_TYPE)
76
-
set(CMAKE_BUILD_TYPE Release)
77
-
endif()
73
+
set(CMAKE_BUILD_TYPE"Release"CACHESTRING"Release build by default.")
# Add Linker search paths to RPATH so as to fix the problem where some linkers can't find cross-compiled dependent libraries in customer paths when linking executables.
145
158
set(CMAKE_INSTALL_RPATH_USE_LINK_PATHtrue)
146
159
147
-
# build third-party targets
148
-
if (BUILD_DEPS)
149
-
# If building third party dependencies, we will move them to the same directory where SDK has been installed during installation.
150
-
# Therefore, we should set rpath to $ORIGIN to let SDK find these third party dependencies.
151
-
# Otherwise, customers are responsible for handling the linkage to these libraries.
set(AWS_DEPS_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}CACHESTRING"A string describes the path where 3rd-party dependencies will be or have been installed")
157
-
else()
158
-
set(AWS_DEPS_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/.deps/installCACHESTRING"A string describes the path where 3rd-party dependencies will be or have been installed")
# CMAKE_FIND_ROOT_PATH_MODE_PACKAGE is set to ONLY by default, which means find_package will only search packages under ${ANDROID_NDK} (which is defined by built-in cmake toolchain file.)
106
-
# In Android NDK before and including 15c, we are not able to change CMAKE_FIND_ROOT_PATH_MODE_PACKAGE, we'd add AWS_DEPS_INSTALL_DIR to the search paths.
0 commit comments