Skip to content

Commit dfb4bb4

Browse files
Merge pull request #39 from awslabs/FB-UnixPackagingPrep
Fb unix packaging prep
2 parents 8732f0a + d0d62c1 commit dfb4bb4

File tree

33 files changed

+1062
-535
lines changed

33 files changed

+1062
-535
lines changed

CMakeLists.txt

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
7070

7171
include(resolve_platform)
7272

73-
if(BUILD_SHARED_LIBS)
74-
SET(ARCHIVE_DIRECTORY "bin")
75-
SET(LIBTYPE SHARED)
76-
message(STATUS "Building AWS libraries as shared objects")
77-
else()
78-
SET(ARCHIVE_DIRECTORY "lib")
79-
SET(LIBTYPE STATIC)
80-
message(STATUS "Building AWS libraries as static objects")
81-
endif()
82-
8373
# use response files to prevent command-line-too-big errors for large libraries like iam
8474
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
8575
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1)
@@ -89,7 +79,8 @@ if(COMMAND apply_pre_project_platform_settings)
8979
apply_pre_project_platform_settings()
9080
endif()
9181

92-
project(aws-sdk-cpp-all)
82+
include(initialize_project_version)
83+
add_project("aws-cpp-sdk-all" "AWS SDK for C++")
9384

9485
# http client, encryption, zlib, uuid
9586
include(external_dependencies)
@@ -112,15 +103,8 @@ include(sdks)
112103

113104
include(utilities)
114105

115-
# In Windows, this dumps the CL and LINK command lines to the output - makes it much easier to
116-
# check that CMake is passing in the right defines, paths, etc...
117-
#
118-
# set( CMAKE_VERBOSE_MAKEFILE 1 )
119-
120106
get_filename_component(AWS_NATIVE_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
121107

122-
set(CORE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/aws-cpp-sdk-core/")
123-
124108
include(build_external)
125109

126110
if(ENABLE_BCRYPT_ENCRYPTION)
@@ -139,9 +123,5 @@ elseif(ENABLE_WINDOWS_CLIENT)
139123
endif()
140124
endif()
141125

142-
if(COMMAND apply_custom_platform_settings)
143-
apply_custom_platform_settings()
144-
endif()
145-
146126
add_sdks()
147127

android-build/cmakefiles/openssl-cmake/apps/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ set ( E_SRC openssl.c #
3939
add_executable ( openssl ${E_SRC} )
4040
target_link_libraries ( openssl z crypto ssl )
4141

42-
install( TARGETS openssl RUNTIME DESTINATION bin/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE} )
42+
install( TARGETS openssl RUNTIME DESTINATION ${BINARY_DIRECTORY}/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE} )
4343

android-build/cmakefiles/openssl-cmake/crypto/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,6 @@ endif()
218218

219219
install( FILES ${EXHEADERS} DESTINATION include/openssl )
220220

221-
install( TARGETS crypto RUNTIME DESTINATION bin/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE}
222-
LIBRARY DESTINATION lib/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE}
223-
ARCHIVE DESTINATION lib/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE} )
221+
install( TARGETS crypto RUNTIME DESTINATION ${BINARY_DIRECTORY}/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE}
222+
LIBRARY DESTINATION ${LIBRARY_DIRECTORY}/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE}
223+
ARCHIVE DESTINATION ${ARCHIVE_DIRECTORY}/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE} )

android-build/cmakefiles/openssl-cmake/ssl/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ target_link_libraries ( ssl crypto )
4242
install( FILES ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h kssl.h srtp.h
4343
DESTINATION include/openssl )
4444

45-
install( TARGETS ssl RUNTIME DESTINATION bin/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE}
46-
LIBRARY DESTINATION lib/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE}
47-
ARCHIVE DESTINATION lib/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE} )
45+
install( TARGETS ssl RUNTIME DESTINATION ${BINARY_DIRECTORY}/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE}
46+
LIBRARY DESTINATION ${LIBRARY_DIRECTORY}/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE}
47+
ARCHIVE DESTINATION ${ARCHIVE_DIRECTORY}/${SDK_INSTALL_BINARY_PREFIX}/${CMAKE_BUILD_TYPE} )
Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
project(aws-cpp-sdk-access-management)
1+
add_project(aws-cpp-sdk-access-management
2+
"C++ interface for Amazon Access Management"
3+
aws-cpp-sdk-cognito-identity
4+
aws-cpp-sdk-iam
5+
aws-cpp-sdk-core)
26

37
file(GLOB AWS_ACCESS_MANAGEMENT_HEADERS
48
"include/aws/access-management/*.h"
@@ -21,9 +25,6 @@ file(GLOB ACCESS_MANAGEMENT_SRC
2125

2226
set(ACCESS_MANAGEMENT_INCLUDES
2327
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
24-
"${AWS_NATIVE_SDK_ROOT}/aws-cpp-sdk-iam/include/"
25-
"${AWS_NATIVE_SDK_ROOT}/aws-cpp-sdk-cognito-identity/include/"
26-
"${CORE_DIR}/include/"
2728
)
2829

2930
include_directories(${ACCESS_MANAGEMENT_INCLUDES})
@@ -32,27 +33,16 @@ if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS)
3233
add_definitions("-DAWS_ACCESS_MANAGEMENT_EXPORTS")
3334
endif()
3435

35-
add_library(aws-cpp-sdk-access-management ${LIBTYPE} ${ACCESS_MANAGEMENT_SRC})
36+
add_library(${PROJECT_NAME} ${LIBTYPE} ${ACCESS_MANAGEMENT_SRC})
37+
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
3638

37-
target_include_directories(aws-cpp-sdk-access-management PUBLIC
39+
target_include_directories(${PROJECT_NAME} PUBLIC
3840
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
3941
$<INSTALL_INTERFACE:include>)
40-
target_link_libraries(aws-cpp-sdk-access-management aws-cpp-sdk-cognito-identity aws-cpp-sdk-iam)
41-
42-
if(SIMPLE_INSTALL)
43-
install (TARGETS aws-cpp-sdk-access-management
44-
ARCHIVE DESTINATION ${ARCHIVE_DIRECTORY}
45-
LIBRARY DESTINATION lib
46-
RUNTIME DESTINATION bin)
47-
else()
48-
if(PLATFORM_CUSTOM)
49-
install_custom_library(aws-cpp-sdk-access-management)
50-
else()
51-
install (TARGETS aws-cpp-sdk-access-management
52-
ARCHIVE DESTINATION ${ARCHIVE_DIRECTORY}/${SDK_INSTALL_BINARY_PREFIX}/${PLATFORM_INSTALL_QUALIFIER}/\${CMAKE_INSTALL_CONFIG_NAME}
53-
LIBRARY DESTINATION lib/${SDK_INSTALL_BINARY_PREFIX}/${PLATFORM_INSTALL_QUALIFIER}/\${CMAKE_INSTALL_CONFIG_NAME}
54-
RUNTIME DESTINATION bin/${SDK_INSTALL_BINARY_PREFIX}/${PLATFORM_INSTALL_QUALIFIER}/\${CMAKE_INSTALL_CONFIG_NAME})
55-
endif()
56-
endif()
42+
target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS})
43+
44+
setup_install()
45+
46+
install (FILES ${AWS_ACCESS_MANAGEMENT_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/access-management)
5747

58-
install (FILES ${AWS_ACCESS_MANAGEMENT_HEADERS} DESTINATION include/aws/access-management)
48+
do_packaging()
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
configurations {
2+
Toolset {
3+
key : "PlatformToolset";
4+
choices: { v140, v120 };
5+
};
6+
}
7+
8+
nuget {
9+
// The nuspec file metadata.
10+
nuspec {
11+
12+
// Unique package identifier
13+
id = AWSSDKCPP-AccessManagement;
14+
15+
// Version number. Follows NuGet standards. (currently SemVer 1.0)
16+
version : 1.0.1;
17+
18+
// Display name for package.
19+
title: AWS SDK for C++ (Access Management);
20+
21+
// List of package authors. Braces may be ommited if only one author.
22+
authors: Amazon Web Services;
23+
24+
// URL link to the license this package is released under.
25+
licenseUrl: "http://aws.amazon.com/apache2.0/";
26+
27+
// URL to the project website (if any).
28+
projectUrl: "http://github.com/aws/aws-sdk-cpp";
29+
30+
// URL to an image to be used for package icons.
31+
iconUrl: "http://media.amazonwebservices.com/aws_singlebox_01.png";
32+
33+
// If the license this package is being released
34+
// under has use restrictions, set this to "true".
35+
requireLicenseAcceptance:false;
36+
37+
summary: "v120 and v140 binary packages along with header files. No custom memory management. Standard Compiler flags used. For more info, see https://github.com/aws/aws-sdk-cpp/blob/master/README.md";
38+
39+
// Extended description of the package contents.
40+
description: "Access Management API for AWS SDK for C++. AWS SDK for C++ provides a modern C++ (version C++ 11 or later) interface for Amazon Web Services (AWS). It is meant to be performant and fully functioning with low- and high-level SDKs, while minimizing dependencies and providing platform portability (Windows, OSX, Linux, and mobile).";
41+
42+
// Copyright notice.
43+
copyright: Copyright 2016;
44+
45+
// Tags of arbitrary text for categorizing and filtering.
46+
tags: { AWS, Amazon, cloud, aws-sdk-cpp, native, aws-cpp-sdk-iam, access-management };
47+
};
48+
49+
dependencies {
50+
packages: {
51+
AWSSDKCPP-Core/1.0
52+
AWSSDKCPP-CognitoIdentity/1.0.20140630
53+
AWSSDKCPP-IAM/1.0.20100508
54+
}
55+
}
56+
57+
files {
58+
// All .h and .hpp files in <src_root>\include, but not in subdirectories.
59+
// Included for all conditions.
60+
nestedInclude: {
61+
#destination = ${d_include}\aws\access-management;
62+
"..\include\aws\access-management\**\*.h"
63+
};
64+
65+
// Include these specific files in the libpath and "copy to output" path only
66+
// under these pivot conditions.
67+
[x64,release,v140,dynamic] { // x64, dll (dynamic linking)
68+
lib+= { ..\bin\windows\intel64\vs2015\release\aws-cpp-sdk-access-management.lib };
69+
bin+= { ..\bin\windows\intel64\vs2015\release\aws-cpp-sdk-access-management.dll };
70+
71+
symbols+= { ..\bin\windows\intel64\vs2015\release\aws-cpp-sdk-access-management.pdb };
72+
}
73+
74+
[x64,release,v120,dynamic] { // x64, dll (dynamic linking)
75+
lib+= { ..\bin\windows\intel64\vs2013\release\aws-cpp-sdk-access-management.lib };
76+
bin+= { ..\bin\windows\intel64\vs2013\release\aws-cpp-sdk-access-management.dll };
77+
78+
symbols+= { ..\bin\windows\intel64\vs2013\release\aws-cpp-sdk-access-management.pdb };
79+
}
80+
81+
[x64,debug,v140,dynamic] { // x64, dll (dynamic linking)
82+
lib+= { ..\bin\windows\intel64\vs2015\debug\aws-cpp-sdk-access-management.lib };
83+
bin+= { ..\bin\windows\intel64\vs2015\debug\aws-cpp-sdk-access-management.dll };
84+
85+
symbols+= { ..\bin\windows\intel64\vs2015\debug\aws-cpp-sdk-access-management.pdb };
86+
}
87+
88+
[x64,debug,v120,dynamic] { // x64, dll (dynamic linking)
89+
lib+= { ..\bin\windows\intel64\vs2013\debug\aws-cpp-sdk-access-management.lib };
90+
bin+= { ..\bin\windows\intel64\vs2013\debug\aws-cpp-sdk-access-management.dll };
91+
92+
symbols+= { ..\bin\windows\intel64\vs2013\debug\aws-cpp-sdk-access-management.pdb };
93+
}
94+
95+
[x64,release,v140,static] { // x64, static linking
96+
lib+= { ..\lib\windows\intel64\vs2015\release\aws-cpp-sdk-access-management.lib };
97+
}
98+
99+
[x64,release,v120,static] { // x64, static linking
100+
lib+= { ..\lib\windows\intel64\vs2013\release\aws-cpp-sdk-access-management.lib };
101+
}
102+
103+
[x64,debug,v140,static] { // x64, static linking
104+
lib+= { ..\lib\windows\intel64\vs2015\debug\aws-cpp-sdk-access-management.lib };
105+
}
106+
107+
[x64,debug,v120,static] { // x64, static linking
108+
lib+= { ..\lib\windows\intel64\vs2013\debug\aws-cpp-sdk-access-management.lib };
109+
}
110+
111+
[x86,release,v140,dynamic] { // x86, dll (dynamic linking)
112+
lib+= { ..\bin\windows\ia32\vs2015\release\aws-cpp-sdk-access-management.lib };
113+
bin+= { ..\bin\windows\ia32\vs2015\release\aws-cpp-sdk-access-management.dll };
114+
115+
symbols+= { ..\bin\windows\ia32\vs2015\release\aws-cpp-sdk-access-management.pdb };
116+
117+
}
118+
119+
[x86,release,v120,dynamic] { // x86, dll (dynamic linking)
120+
lib+= { ..\bin\windows\ia32\vs2013\release\aws-cpp-sdk-access-management.lib };
121+
bin+= { ..\bin\windows\ia32\vs2013\release\aws-cpp-sdk-access-management.dll };
122+
123+
symbols+= { ..\bin\windows\ia32\vs2013\release\aws-cpp-sdk-access-management.pdb };
124+
}
125+
126+
[x86,debug,v140,dynamic] { // x86, dll (dynamic linking)
127+
lib+= { ..\bin\windows\ia32\vs2015\debug\aws-cpp-sdk-access-management.lib };
128+
bin+= { ..\bin\windows\ia32\vs2015\debug\aws-cpp-sdk-access-management.dll };
129+
130+
symbols+= { ..\bin\windows\ia32\vs2015\debug\aws-cpp-sdk-access-management.pdb };
131+
}
132+
133+
[x86,debug,v120,dynamic] { // x86, dll (dynamic linking)
134+
lib+= { ..\bin\windows\ia32\vs2013\debug\aws-cpp-sdk-access-management.lib };
135+
bin+= { ..\bin\windows\ia32\vs2013\debug\aws-cpp-sdk-access-management.dll };
136+
137+
symbols+= { ..\bin\windows\ia32\vs2013\debug\aws-cpp-sdk-access-management.pdb };
138+
}
139+
140+
[x86,release,v140,static] { // x86, static linking
141+
lib+= { ..\lib\windows\ia32\vs2015\release\aws-cpp-sdk-access-management.lib };
142+
}
143+
144+
[x86,release,v120,static] { // x86, static linking
145+
lib+= { ..\lib\windows\ia32\vs2013\release\aws-cpp-sdk-access-management.lib };
146+
}
147+
148+
[x86,debug,v140,static] { // x86, static linking
149+
lib+= { ..\lib\windows\ia32\vs2015\debug\aws-cpp-sdk-access-management.lib };
150+
}
151+
152+
[x86,debug,v120,static] { // x86, static linking
153+
lib+= { ..\lib\windows\ia32\vs2013\debug\aws-cpp-sdk-access-management.lib };
154+
}
155+
};
156+
157+
targets {
158+
// Additional declarations to insert into consuming projects after most of the
159+
// project settings. (These may NOT be modified in visual studio by a developer
160+
// consuming this package.)
161+
// This node is often used to set defines that are required that must be set by
162+
// the consuming project in order to correctly link to the libraries in this
163+
// package. Such defines may be set either globally or only set under specific
164+
// conditions.
165+
[dynamic]
166+
Defines += USE_IMPORT_EXPORT;
167+
}
168+
}
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
project(aws-cpp-sdk-sqs-cloudfront-tests)
1+
add_project(aws-cpp-sdk-cloudfront-tests
2+
"Tests for the AWS Cloudfront C++ SDK"
3+
aws-cpp-sdk-core
4+
aws-cpp-sdk-cloudfront
5+
testing-resources)
26

37
# Headers are included in the source so that they show up in Visual Studio.
48
# They are included elsewhere for consistency.
59

6-
file(GLOB AWS_CLOUDFRONT_SRC
7-
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
8-
)
10+
file(GLOB AWS_CLOUDFRONT_SRC
11+
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
12+
)
913

10-
file(GLOB AWS_CLOUDFRONT_INTEGRATION_TESTS_SRC
14+
file(GLOB AWS_CLOUDFRONT_INTEGRATION_TESTS_SRC
1115
${AWS_CLOUDFRONT_SRC}
12-
)
16+
)
1317

1418
set(AWS_CLOUDFRONT_INTEGRATION_TEST_APPLICATION_INCLUDES
15-
"${AWS_NATIVE_SDK_ROOT}/aws-cpp-sdk-core/include/"
16-
"${AWS_NATIVE_SDK_ROOT}/aws-cpp-sdk-cloudfront/include/"
17-
"${AWS_NATIVE_SDK_ROOT}/testing-resources/include/"
19+
"${AWS_NATIVE_SDK_ROOT}/aws-cpp-sdk-core/include/"
20+
"${AWS_NATIVE_SDK_ROOT}/aws-cpp-sdk-cloudfront/include/"
21+
"${AWS_NATIVE_SDK_ROOT}/testing-resources/include/"
1822
)
1923

2024
include_directories(${AWS_CLOUDFRONT_INTEGRATION_TEST_APPLICATION_INCLUDES})
@@ -26,10 +30,10 @@ endif()
2630
enable_testing()
2731

2832
if(PLATFORM_ANDROID AND BUILD_SHARED_LIBS)
29-
add_library(runCloudfrontIntegrationTests ${LIBTYPE} ${AWS_CLOUDFRONT_INTEGRATION_TESTS_SRC})
33+
add_library(${PROJECT_NAME} ${LIBTYPE} ${AWS_CLOUDFRONT_INTEGRATION_TESTS_SRC})
3034
else()
31-
add_executable(runCloudfrontIntegrationTests ${AWS_CLOUDFRONT_INTEGRATION_TESTS_SRC})
35+
add_executable(${PROJECT_NAME} ${AWS_CLOUDFRONT_INTEGRATION_TESTS_SRC})
3236
endif()
3337

34-
target_link_libraries(runCloudfrontIntegrationTests aws-cpp-sdk-cloudfront testing-resources)
35-
copyDlls(runCloudfrontIntegrationTests aws-cpp-sdk-core aws-cpp-sdk-cloudfront testing-resources)
38+
target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS})
39+
copyDlls(${PROJECT_NAME} ${PROJECT_LIBS})

0 commit comments

Comments
 (0)