Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:

strategy:
matrix:
os: [macos-11, macos-latest]
# macos-latest-large is the latest intel based runner
os: [macos-13, macos-latest-large]
openssl_version: [[email protected]]

steps:
Expand Down Expand Up @@ -48,17 +49,17 @@ jobs:
mkdir -p build-aws-sdk-cpp || true
mkdir -p install || true
cd build-aws-sdk-cpp
cmake -G Xcode -DTARGET_ARCH="APPLE" -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="kms" -DENABLE_UNITY_BUILD=ON ../aws-sdk-cpp
cmake -G Xcode -DTARGET_ARCH="APPLE" -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="kms" -DENABLE_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_PREFIX_PATH=${{github.workspace}}/install ../aws-sdk-cpp
xcodebuild -target ALL_BUILD
xcodebuild -target install

- name: Build C-ESDK
env:
OPENSSL_VERSION: ${{ matrix.openssl_version }}
# TODO-RS: Figure out how to safely add AWS credentials and add -DAWS_ENC_SDK_END_TO_END_TESTS=ON and -DAWS_ENC_SDK_KNOWN_GOOD_TESTS=ON
# TODO-RS: Figure out how to safely add AWS credentials and add -DAWS_ENC_SDK_END_TO_END_TESTS=ON and -DAWS_ENC_SDK_KNOWN_GOOD_TESTS=ON
run: |
mkdir build-aws-encryption-sdk-c || true
cd build-aws-encryption-sdk-c
cmake -G Xcode -DBUILD_SHARED_LIBS=ON -DOPENSSL_ROOT_DIR="/usr/local/opt/${OPENSSL_VERSION}" ../
cmake -G Xcode -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_PREFIX_PATH=${{github.workspace}}/install -DOPENSSL_ROOT_DIR="/usr/local/opt/${OPENSSL_VERSION}" ../
xcodebuild -target ALL_BUILD
xcodebuild -scheme RUN_TESTS
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@
cmake_minimum_required (VERSION 3.9)
project (aws-encryption-sdk LANGUAGES C)

if (UNIX AND NOT APPLE)
include(GNUInstallDirs)
elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
endif()

include(GNUInstallDirs)
include(CTest)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# This was required for older versions of aws-c-common and fixed in the latest versions.
# Remove this hack, after updating our CodeBuild tests to use the latest version of aws-c-common.
# Make sure we can pick up Cmake modules installed by dependencies
# both when they are in the CMAKE_INSTALL_PREFIX directory
# and in the CMAKE_PREFIX_PATH list.
Expand Down
15 changes: 7 additions & 8 deletions cmake/InstallLogic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,16 @@ function(aws_install_target)
endforeach(HEADER_SRCPATH)

install(TARGETS ${AWS_INSTALL_TARGET} EXPORT ${AWS_INSTALL_TARGET}-targets
ARCHIVE DESTINATION "${LIBRARY_DIRECTORY}"
LIBRARY DESTINATION "${LIBRARY_DIRECTORY}"
RUNTIME DESTINATION "${RUNTIME_DIRECTORY}")
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")

configure_file("${PROJECT_SOURCE_DIR}/cmake/${AWS_INSTALL_TARGET}-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${AWS_INSTALL_TARGET}-config.cmake" @ONLY)

install(EXPORT "${AWS_INSTALL_TARGET}-targets" DESTINATION "${LIBRARY_DIRECTORY}/${AWS_INSTALL_TARGET}/cmake/"
install(EXPORT "${AWS_INSTALL_TARGET}-targets" DESTINATION "${CMAKE_INSTALL_LIBDIR}/${AWS_INSTALL_TARGET}/cmake/"
NAMESPACE AWS::
)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${AWS_INSTALL_TARGET}-config.cmake"
DESTINATION "${LIBRARY_DIRECTORY}/${AWS_INSTALL_TARGET}/cmake/")
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${AWS_INSTALL_TARGET}/cmake/")
endfunction(aws_install_target)
Loading