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
86
87
88
89
|
diff --git a/cmake/initialize_project_version.cmake b/cmake/initialize_project_version.cmake
index c9b42f603da..894c10f95b8 100644
--- a/cmake/initialize_project_version.cmake
+++ b/cmake/initialize_project_version.cmake
@@ -6,9 +6,8 @@ if(GIT_FOUND)
endif()
if(NOT VERSION_STRING)
- # extract it from the existing generated header file
- file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h" __SDK_VERSION_LINE LIMIT_COUNT 1 REGEX "AWS_SDK_VERSION_STRING.*[0-9]+\\.[0-9]+\\.[0-9]+" )
- string( REGEX MATCH "([0-9]+\\.[0-9]+\\.[0-9]+)" VERSION_STRING "${__SDK_VERSION_LINE}" )
+ # read it from the version file
+ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION_STRING)
endif()
set(PROJECT_VERSION "${VERSION_STRING}")
diff --git a/src/aws-cpp-sdk-core/CMakeLists.txt b/src/aws-cpp-sdk-core/CMakeLists.txt
index c6a0f1c262e..c9ea5e8d70b 100644
--- a/src/aws-cpp-sdk-core/CMakeLists.txt
+++ b/src/aws-cpp-sdk-core/CMakeLists.txt
@@ -20,7 +20,7 @@ if(VERSION_STRING)
set(AWSSDK_VERSION_PATCH ${AWSSDK_VERSION_PATCH})
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/include/aws/core/VersionConfig.h.in"
- "${CMAKE_CURRENT_SOURCE_DIR}/include/aws/core/VersionConfig.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/include/aws/core/VersionConfig.h"
NEWLINE_STYLE UNIX)
else()
message("Not able to compute versioning string, not updating.")
@@ -38,7 +38,7 @@ else()
endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/aws/core/SDKConfig.h.in"
- "${CMAKE_CURRENT_SOURCE_DIR}/include/aws/core/SDKConfig.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/include/aws/core/SDKConfig.h"
NEWLINE_STYLE UNIX)
file(GLOB AWS_HEADERS "include/aws/core/*.h")
@@ -94,6 +94,8 @@ file(GLOB SMITHY_IDENTITY_SIGNER_BUILTIN_HEADERS "include/smithy/identity/signer
file(GLOB SMITHY_INTERCEPTOR_HEADERS "include/smithy/interceptor/*.h")
file(GLOB SMITHY_INTERCEPTOR_IMPL_HEADERS "include/smithy/interceptor/impl/*.h")
+file(GLOB AWS_GENERATED_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/include/aws/core/*.h")
+
file(GLOB AWS_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp")
file(GLOB AWS_TINYXML2_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/source/external/tinyxml2/*.cpp")
file(GLOB CJSON_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/source/external/cjson/*.cpp")
@@ -387,7 +389,7 @@ file(GLOB AWS_NATIVE_SDK_SRC
# Visual studio project directory structure
if(MSVC)
- source_group("Header Files\\aws\\core" FILES ${AWS_HEADERS})
+ source_group("Header Files\\aws\\core" FILES ${AWS_HEADERS} ${AWS_GENERATED_HEADERS})
source_group("Header Files\\aws\\core\\auth" FILES ${AWS_AUTH_HEADERS})
source_group("Header Files\\aws\\core\\auth\\signer" FILES ${AWS_AUTH_SIGNER_HEADERS})
source_group("Header Files\\aws\\core\\auth\\signer-provider" FILES ${AWS_AUTH_SIGNER_PROVIDER_HEADERS})
@@ -597,6 +599,7 @@ endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>)
if (EXTERNAL_DEPS_INCLUDE_DIRS)
@@ -669,7 +672,7 @@ if(SIMPLE_INSTALL)
endif()
endif()
-install (FILES ${AWS_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/core)
+install (FILES ${AWS_HEADERS} ${AWS_GENERATED_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/core)
install (FILES ${AWS_AUTH_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/core/auth)
install (FILES ${AWS_AUTH_SIGNER_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/core/auth/signer)
install (FILES ${AWS_AUTH_SIGNER_PROVIDER_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/core/auth/signer-provider)
diff --git a/src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h b/src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h
deleted file mode 100644
index 06609b4b3fe..00000000000
--- a/src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0.
- */
-#pragma once
-
-#define AWS_SDK_VERSION_STRING "1.11.665"
-#define AWS_SDK_VERSION_MAJOR 1
-#define AWS_SDK_VERSION_MINOR 11
-#define AWS_SDK_VERSION_PATCH 665
|