-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: move aws-sdk-cpp to root of repo
- Loading branch information
Showing
6 changed files
with
26 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[submodule "acquire-common"] | ||
path = acquire-common | ||
url = ../acquire-common.git | ||
[submodule "src/3rdParty/aws-sdk-cpp"] | ||
path = src/3rdParty/aws-sdk-cpp | ||
[submodule "aws-sdk-cpp"] | ||
path = aws-sdk-cpp | ||
url = https://github.com/aws/aws-sdk-cpp.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule aws-sdk-cpp
updated
from 000000 to 529117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,27 @@ | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../src/3rdParty/aws-sdk-cpp/lib/cmake/AWSSDK") | ||
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/../src/3rdParty/aws-sdk-cpp") | ||
message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") | ||
#message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") | ||
set(AWSSDK_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../src/3rdParty/aws-sdk-cpp") | ||
|
||
# Use the MSVC variable to determine if this is a Windows build. | ||
set(WINDOWS_BUILD ${MSVC}) | ||
|
||
if (WINDOWS_BUILD) # Set the location where CMake can find the installed libraries for the AWS SDK. | ||
string(REPLACE ";" "/aws-cpp-sdk-all;" SYSTEM_MODULE_PATH "${CMAKE_SYSTEM_PREFIX_PATH}/aws-cpp-sdk-all") | ||
list(APPEND CMAKE_PREFIX_PATH ${SYSTEM_MODULE_PATH}) | ||
endif () | ||
set(SERVICE_COMPONENTS s3) | ||
|
||
# Find the AWS SDK for C++ package. | ||
find_package(AWSSDK REQUIRED COMPONENTS ${SERVICE_COMPONENTS}) | ||
|
||
if (WINDOWS_BUILD) | ||
set(AWS_SDK_DIR "${CMAKE_CURRENT_LIST_DIR}/../aws-sdk-cpp") | ||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-build) | ||
set(MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
|
||
execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" "${AWS_SDK_DIR}" | ||
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-install | ||
-DBUILD_ONLY=${SERVICE_COMPONENTS} | ||
-DENABLE_TESTING=OFF | ||
-DMSVC_RUNTIME_LIBRARY=${MSVC_RUNTIME_LIBRARY} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-build | ||
) | ||
execute_process(COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-build --config ${CMAKE_BUILD_TYPE} --target install | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-build | ||
) | ||
|
||
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-install") | ||
find_package(AWSSDK REQUIRED COMPONENTS s3) | ||
if (MSVC) | ||
# Copy relevant AWS SDK for C++ libraries into the current binary directory for running and debugging. | ||
|
||
set(BIN_SUB_DIR "/Debug") # if you are building from the command line you may need to uncomment this | ||
# set(BIN_SUB_DIR "/Debug") # if you are building from the command line you may need to uncomment this | ||
# and set the proper subdirectory to the executables' location. | ||
|
||
AWSSDK_CPY_DYN_LIBS(SERVICE_COMPONENTS "" ${CMAKE_CURRENT_BINARY_DIR}${BIN_SUB_DIR}) | ||
endif () | ||
|
||
message(STATUS "Found AWS SDK for C++ version ${AWSSDK_VERSION}") | ||
message(STATUS "AWS link libraries ${AWSSDK_LINK_LIBRARIES}") | ||
|
||
#add_executable(${PROJECT_NAME} | ||
# hello_s3.cpp) | ||
# | ||
#target_link_libraries(${PROJECT_NAME} | ||
# ${AWSSDK_LINK_LIBRARIES}) | ||
AWSSDK_CPY_DYN_LIBS(SERVICE_COMPONENTS "" ${CMAKE_CURRENT_BINARY_DIR}/tests) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,2 @@ | ||
add_subdirectory(cblosc) | ||
add_subdirectory(json) | ||
|
||
|
||
# see: https://sdk.amazonaws.com/cpp/api/LATEST/root/html/md_docs_2_c_make___external___project.html | ||
ExternalProject_Add( | ||
aws-sdk-cpp | ||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/aws-sdk-cpp | ||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp | ||
LIST_SEPARATOR "|" # this is needed to separate targets specified in -DBUILD_ONLY below | ||
CMAKE_ARGS | ||
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/aws-sdk-cpp-install | ||
-DBUILD_ONLY=core|s3 | ||
-DENABLE_TESTING=OFF | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters