Skip to content

Commit

Permalink
CMake: Improve MacOS Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Jan 15, 2025
1 parent 7c64ca3 commit 4819ebb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@ install(
)

set(deploy_tool_options_arg "")
if(APPLE)
set(deploy_tool_options_arg -qmldir=${CMAKE_SOURCE_DIR}/src -hardened-runtime -timestamp -appstore-compliant)
if(MACOS)
set(deploy_tool_options_arg -qmldir=${CMAKE_SOURCE_DIR}/src -hardened-runtime -timestamp -appstore-compliant) # -dmg
endif()

qt_generate_deploy_qml_app_script(
Expand Down
7 changes: 6 additions & 1 deletion cmake/CreateMacDMG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ file(REMOVE ${REMOVE_LIB_FILES})
file(REMOVE_RECURSE ${BUNDLE_FRAMEWORK_PATH}/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/include)
file(REMOVE_RECURSE ${BUNDLE_FRAMEWORK_PATH}/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/pkgconfig)

# execute_process(COMMAND otool -L ${SYSTEM_FRAMEWORK_PATH}/GStreamer.framework/GStreamer)

# Fix up library paths to point into bundle
execute_process(COMMAND ln -sf ${BUNDLE_FRAMEWORK_PATH} ${BUNDLE_FRAMEWORK_PATH}/GStreamer.framework/Versions/1.0/libexec/Frameworks)
execute_process(COMMAND ln -sf ${BUNDLE_FRAMEWORK_PATH} ${BUNDLE_FRAMEWORK_PATH}/GStreamer.framework/Versions/1.0/libexec)
execute_process(COMMAND install_name_tool -id @executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/GStreamer staging/${TARGET_NAME}.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/GStreamer)
execute_process(COMMAND install_name_tool -change ${SYSTEM_FRAMEWORK_PATH}/GStreamer.framework/Versions/1.0/lib/GStreamer @executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/GStreamer staging/${TARGET_NAME}.app/Contents/MacOS/${TARGET_NAME})

execute_process(COMMAND otool -L staging/${TARGET_NAME}.app/Contents/MacOS/${TARGET_NAME})

# include(BundleUtilities)
# include(CMakePrintHelpers)

Expand Down

0 comments on commit 4819ebb

Please sign in to comment.