install_AWSNativeSDK_ios.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. src_path=temp/src
  7. bld_path=temp/build
  8. inst_path=temp/install
  9. out_include_path=$TARGET_INSTALL_ROOT/include
  10. mkdir -p $out_include_path
  11. out_lib_path=$TARGET_INSTALL_ROOT/lib
  12. mkdir -p $out_lib_path/Debug
  13. mkdir -p $out_lib_path/Release
  14. copy_static_libs() {
  15. local bld_type=$1
  16. echo "Copying static .a to $out_lib_path/$bld_type"
  17. cp -f "$inst_path/${bld_type}_Static/lib/"*".a" $out_lib_path/$bld_type/ || (echo "Copying static .a to $out_lib_path/$bld_type failed" ; exit 1)
  18. echo "Copying Curl static .a to $out_lib_path/$bld_type"
  19. cp -f "temp/curl_install/lib/"*".a" $out_lib_path/$bld_type/ || (echo "Copying Curl static .a to $out_lib_path/$bld_type failed" ; exit 1)
  20. }
  21. # Debug
  22. echo "CMake Install Debug Static to $inst_path"
  23. cmake --install $bld_path/Debug_Static --prefix $inst_path/Debug_Static --config Debug || (echo "CMake Install Debug Static to $inst_path failed" ; exit 1)
  24. copy_static_libs Debug || exit 1
  25. # Release
  26. echo "CMake Install Release Static to $inst_path"
  27. cmake --install $bld_path/Release_Static --prefix $inst_path/Release_Static --config Release || (echo "CMake Install Release Static to $inst_path failed" ; exit 1)
  28. copy_static_libs Release || exit 1
  29. echo "Copying include headers to $out_include_path"
  30. cp -f -R "$inst_path/Release_Static/include/"* $out_include_path/ || (echo "Copying include headers to $out_include_path failed" ; exit 1)
  31. echo "Copying LICENSE.txt to $TARGET_INSTALL_ROOT"
  32. cp -f $src_path/LICENSE.txt $TARGET_INSTALL_ROOT/ || (echo "Copying LICENSE.txt to $TARGET_INSTALL_ROOT failed" ; exit 1)
  33. echo "Custom Install for AWSNativeSDK finished successfully"
  34. exit 0