diff --git a/CMakeLists.txt b/CMakeLists.txt index 946fb265..fc8882e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -400,7 +400,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") configure_files (${BARRIER_BUNDLE_SOURCE_DIR} ${BARRIER_BUNDLE_DIR}) - add_custom_target(Barrier_dmg ALL + add_custom_target(Barrier_MacOS ALL bash build_dist.sh DEPENDS barrier barriers barrierc WORKING_DIRECTORY ${BARRIER_BUNDLE_DIR}) diff --git a/dist/macos/bundle/build_dist.sh.in b/dist/macos/bundle/build_dist.sh.in index 2bd73027..c96da790 100755 --- a/dist/macos/bundle/build_dist.sh.in +++ b/dist/macos/bundle/build_dist.sh.in @@ -10,6 +10,8 @@ B_MACOS="Barrier.app/Contents/MacOS" B_VERSION="@BARRIER_VERSION@" B_BINDIR="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@" B_BUILDTYPE="@CMAKE_BUILD_TYPE@" +B_BARRIERC="Barrier.app/Contents/MacOS/barrierc" +B_BARRIERS="Barrier.app/Contents/MacOS/barriers" # Colorized output function info() { tput bold; echo "$@" ; tput sgr0 ;} @@ -56,12 +58,16 @@ fi # Use macdeployqt to include libraries and create dmg if [ "$B_BUILDTYPE" == "Release" ]; then info "Building Release disk image (dmg)" - "$DEPLOYQT" Barrier.app -dmg || exit 1 + "$DEPLOYQT" Barrier.app -dmg \ + -executable="$B_BARRIERC" \ + -executable="$B_BARRIERS" || exit 1 mv "Barrier.dmg" "Barrier-$B_VERSION.dmg" || exit 1 success "Created Barrier-$B_VERSION.dmg" else warn "Disk image (dmg) only created for Release builds" info "Building debug bundle" - "$DEPLOYQT" Barrier.app -use-debug-libs -no-strip || exit 1 + "$DEPLOYQT" Barrier.app -no-strip \ + -executable="$B_BARRIERC" \ + -executable="$B_BARRIERS" || exit 1 success "Bundle created successfully" fi \ No newline at end of file