From 8991e216367081378db95ee336d8d0a31df09f4a Mon Sep 17 00:00:00 2001 From: Max Wash Date: Mon, 23 Nov 2020 19:58:07 +0000 Subject: [PATCH] CRT object files are now added using bundle --- CMakeLists.txt | 1 + scripts/add-framework-crt.sh | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a837c6f..4fa7cc9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,7 @@ bundle_add_dependencies(photon local-root crt) add_custom_command(TARGET photon POST_BUILD COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/add-framework-crt.sh + ${BUNDLE_PROGRAM} ${CMAKE_CURRENT_BINARY_DIR}/photon.framework ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/scripts/add-framework-crt.sh b/scripts/add-framework-crt.sh index 4981e28..74508f0 100755 --- a/scripts/add-framework-crt.sh +++ b/scripts/add-framework-crt.sh @@ -1,11 +1,9 @@ #!/bin/bash -framework_path=$1 -binary_dir=$2 +bundle_prog=$1 +framework_path=$2 +binary_dir=$3 crt_files=$(find $binary_dir -name "crt*.o") -for crt_file in $crt_files; do - out="$framework_path/bin/$(basename $crt_file .o).o" - cp -f $crt_file $out -done +$bundle_prog framework add-binaries -f $framework_path $crt_files