From 439a18535f5f1ebe4ddddaebd3c5c3ede5f5a293 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Tue, 24 Nov 2020 14:46:24 +0000 Subject: [PATCH] photon.framework now supports static and dynamic builds --- CMakeLists.txt | 2 +- scripts/add-framework-crt.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fa7cc9..95b3ecc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ file(GLOB platform_headers set(photon_libc_sources ${photon_libc_sources} ${malloc_sources} ${platform_sources}) set(photon_libc_headers ${photon_libc_headers} ${platform_headers}) -add_framework(photon SHARED +add_framework(photon STATIC SHARED BUNDLE_ID net.doorstuck.photon SOURCES ${photon_libc_sources} ${photon_libc_headers} HEADERS ${CMAKE_CURRENT_BINARY_DIR}/sysroot/usr/include/*) diff --git a/scripts/add-framework-crt.sh b/scripts/add-framework-crt.sh index 74508f0..5afbbf8 100755 --- a/scripts/add-framework-crt.sh +++ b/scripts/add-framework-crt.sh @@ -6,4 +6,11 @@ binary_dir=$3 crt_files=$(find $binary_dir -name "crt*.o") -$bundle_prog framework add-binaries -f $framework_path $crt_files +$bundle_prog framework add-binaries \ + -f $framework_path \ + -m static \ + $crt_files + +$bundle_prog framework add-binaries \ + -f $framework_path \ + $crt_files