From 8816e12d3eae5879f149a4c564031cff2bcffa7f Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Sun, 4 Aug 2024 15:08:26 -0700 Subject: [PATCH] fix framework embedding --- CMakeLists.txt | 2 ++ Sources/SDLSwift/CMakeLists.txt | 2 -- Sources/SwiftFrontend/CMakeLists.txt | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 968f747..fe9e8e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,4 +6,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") include(InitializeSwift) include(AddSwift) +find_library(SDL3 SDL3 REQUIRED PATHS "${CMAKE_SOURCE_DIR}/Frameworks" NO_DEFAULT_PATH) + add_subdirectory(Sources) diff --git a/Sources/SDLSwift/CMakeLists.txt b/Sources/SDLSwift/CMakeLists.txt index 6805bf4..80cfa1a 100644 --- a/Sources/SDLSwift/CMakeLists.txt +++ b/Sources/SDLSwift/CMakeLists.txt @@ -1,5 +1,3 @@ -find_library(SDL3 SDL3 REQUIRED PATHS "${CMAKE_SOURCE_DIR}/Frameworks" NO_DEFAULT_PATH) - add_library(SDLSwift INTERFACE) set_property(TARGET SDLSwift PROPERTY Swift_MODULE_NAME "SDL3") diff --git a/Sources/SwiftFrontend/CMakeLists.txt b/Sources/SwiftFrontend/CMakeLists.txt index 046c9b3..22c43f3 100644 --- a/Sources/SwiftFrontend/CMakeLists.txt +++ b/Sources/SwiftFrontend/CMakeLists.txt @@ -3,6 +3,8 @@ target_link_libraries(SwiftFrontend PRIVATE CppBackend SDLSwift) set_target_properties(SwiftFrontend PROPERTIES XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME NO XCODE_EMBED_FRAMEWORKS "${SDL3}" + XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY YES + XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY YES MACOSX_BUNDLE_BUNDLE_NAME "cxxswift" MACOSX_BUNDLE_GUI_IDENTIFIER "gay.pizza.cxxswift" BUILD_RPATH "@loader_path/../Frameworks"