Skip to content

Commit 23d7a90

Browse files
committed
fix: set correct rpath for embedded frameworks.
1 parent 1ceb5b7 commit 23d7a90

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,14 @@ else()
109109
target_link_libraries(element_app PRIVATE ${SPARKLE_FRAMEWORK})
110110
target_sources(element_app PRIVATE src/sparkle.mm)
111111
add_custom_command(TARGET element_app POST_BUILD
112-
COMMAND ${CMAKE_COMMAND} -E copy_directory
113-
"${SPARKLE_FRAMEWORK}"
114-
"$<TARGET_BUNDLE_CONTENT_DIR:element_app>/Frameworks/Sparkle.framework"
115-
COMMENT "Copying Sparkle.framework into app bundle"
116-
)
112+
COMMAND ${CMAKE_COMMAND} -E copy_directory
113+
"${SPARKLE_FRAMEWORK}"
114+
"$<TARGET_BUNDLE_CONTENT_DIR:element_app>/Frameworks/Sparkle.framework")
115+
# Set rpath to find Sparkle.framework in app bundle
116+
set_target_properties(element_app PROPERTIES
117+
BUILD_RPATH "@executable_path/../Frameworks"
118+
INSTALL_RPATH "@executable_path/../Frameworks"
119+
)
117120
endif()
118121
install(TARGETS element_app
119122
BUNDLE DESTINATION "Applications"

0 commit comments

Comments
 (0)