Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Fix mac installer (#87)
Browse files Browse the repository at this point in the history
* remove RTTI

* shared_libs

* aws sdk static build for mac

* update workflow for static build on mac

* adding tag
  • Loading branch information
rupal-bq authored and abbashus committed May 8, 2020
1 parent 7da7a6c commit 45f953b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
prefix_path=$(pwd)
mkdir cmake-build
cd cmake-build
cmake ../src -D CMAKE_INSTALL_PREFIX=$prefix_path/AWSSDK/
cmake ../src -DCMAKE_INSTALL_PREFIX=$prefix_path/AWSSDK/ -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="core" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_RTTI="OFF" -DENABLE_TESTING="OFF"
cd ..
- name: build-driver
run: |
Expand All @@ -43,7 +43,7 @@ jobs:
if: success()
run: |
cd cmake-build
cmake ../src -D CMAKE_INSTALL_PREFIX=$prefix_path/AWSSDK/ -D BUILD_WITH_TESTS=OFF
cmake ../src
make
cpack .
cd ..
Expand Down
16 changes: 2 additions & 14 deletions aws_sdk_cpp_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@
# permissions and limitations under the License.
#

git clone "https://github.com/aws/aws-sdk-cpp.git"

prefix_path=$(pwd)

mkdir sdk-build

cd sdk-build

cmake ../aws-sdk-cpp/ -D CMAKE_INSTALL_PREFIX=$prefix_path/AWSSDK/ -D CMAKE_BUILD_TYPE=Release -D BUILD_ONLY="core" -D CUSTOM_MEMORY_MANAGEMENT="OFF" -D ENABLE_RTTI="OFF" -D ENABLE_TESTING="OFF"

make

make install

cd src
git clone -b "1.7.329" "https://github.com/aws/aws-sdk-cpp.git"
cd ..
25 changes: 17 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,21 @@ else()
cmake_minimum_required(VERSION 3.13)
endif()

# Use shared libraries, which is the default for the AWS C++ SDK build.
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
# Set BUILD_WITH_TESTS to OFF before building installer package for size optimization.
option(BUILD_WITH_TESTS "Enable testing" ON)

project(global_make_list)

# This wasn't being picked up on mac, causes some symbol errors
if(APPLE)
set(CMAKE_CXX_STANDARD 14)
add_definitions(-DHAVE_STRLCAT)
# Do not use shared libraries for AWS SDK.
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
# Set BUILD_WITH_TESTS to OFF before building installer package for size optimization.
option(BUILD_WITH_TESTS "Enable testing" ON)
else()
# Use shared libraries for AWS SDK.
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
# Set BUILD_WITH_TESTS to OFF before building installer package for size optimization.
option(BUILD_WITH_TESTS "Enable testing" ON)
endif()

if(MSVC)
Expand Down Expand Up @@ -83,14 +87,16 @@ set(VLD_SRC ${LIBRARY_DIRECTORY}/VisualLeakDetector/include)
# Without this symbols will be exporting to Unix but not Windows
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Set path for AWS SDK
set(aws-cpp-sdk-base "${CMAKE_CURRENT_SOURCE_DIR}/aws-sdk-cpp")
set(aws-cpp-sdk-core_DIR "${PROJECT_ROOT}/AWSSDK/lib/cmake/aws-cpp-sdk-core")
set(aws-c-event-stream_DIR "${PROJECT_ROOT}/AWSSDK/lib/aws-c-event-stream/cmake")
set(aws-c-common_DIR "${PROJECT_ROOT}/AWSSDK/lib/aws-c-common/cmake")
set(aws-checksums_DIR "${PROJECT_ROOT}/AWSSDK/lib/aws-checksums/cmake")
find_package(AWSSDK REQUIRED core)

if (WIN32)
find_package(AWSSDK REQUIRED core)
endif()

# General compiler definitions
add_compile_definitions ( _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
Expand Down Expand Up @@ -135,6 +141,9 @@ if(BUILD_WITH_TESTS)
endif()

# Projects to build
if (APPLE)
add_subdirectory(${aws-cpp-sdk-base})
endif()
add_subdirectory(${ODFEODBC_SRC})
add_subdirectory(${ODFEENLIST_SRC})
add_subdirectory(${INSTALL_SRC})
Expand Down
5 changes: 0 additions & 5 deletions src/installer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ if(WIN32)
install(FILES "${PROJECT_ROOT}/AWSSDK/bin/aws-c-event-stream.dll" DESTINATION bin COMPONENT "Driver")
install(FILES "${PROJECT_ROOT}/AWSSDK/bin/aws-checksums.dll" DESTINATION bin COMPONENT "Driver")
install(FILES "${PROJECT_ROOT}/AWSSDK/bin/aws-cpp-sdk-core.dll" DESTINATION bin COMPONENT "Driver")
else()
install(FILES "${PROJECT_ROOT}/AWSSDK/lib/libaws-c-common.dylib" DESTINATION bin COMPONENT "Driver")
install(FILES "${PROJECT_ROOT}/AWSSDK/lib/libaws-c-event-stream.dylib" DESTINATION bin COMPONENT "Driver")
install(FILES "${PROJECT_ROOT}/AWSSDK/lib/libaws-checksums.dylib" DESTINATION bin COMPONENT "Driver")
install(FILES "${PROJECT_ROOT}/AWSSDK/lib/libaws-cpp-sdk-core.dylib" DESTINATION bin COMPONENT "Driver")
endif()

include(CPack)

0 comments on commit 45f953b

Please sign in to comment.