summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmake/opentrack-boilerplate.cmake2
-rw-r--r--cmake/opentrack-hier.cmake2
-rw-r--r--cmake/opentrack-platform.cmake7
-rwxr-xr-xmacosx/make-app-bundle.sh20
4 files changed, 18 insertions, 13 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 7e9231ed..958403cc 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -224,7 +224,7 @@ function(otr_module n_)
install(TARGETS "${n}"
RUNTIME DESTINATION ${opentrack-hier-bin}
BUNDLE DESTINATION ${opentrack-hier-bin}
- LIBRARY DESTINATION ${opentrack-hier-bin}/opentrack.app/Contents/MacOS/
+ LIBRARY DESTINATION ${opentrack-hier-bin}/Library
RESOURCE DESTINATION ${opentrack-hier-bin}/opentrack.app/Resource
PERMISSIONS ${opentrack-perms-exec})
else()
diff --git a/cmake/opentrack-hier.cmake b/cmake/opentrack-hier.cmake
index c94c6d57..8e9e3db8 100644
--- a/cmake/opentrack-hier.cmake
+++ b/cmake/opentrack-hier.cmake
@@ -18,7 +18,7 @@ if(APPLE)
set(opentrack-doc-src-pfx "./source-code")
set(opentrack-i18n-pfx "opentrack.app/Contents/Resources") # used during install
set(opentrack-i18n-path "../Resources/i18n") # used in application
- set(opentrack-install-rpath "./")
+ set(opentrack-install-rpath "../Frameworks")
set(opentrack-hier-str RUNTIME DESTINATION ${opentrack-hier-pfx} LIBRARY DESTINATION ${opentrack-hier-pfx})
elseif(WIN32)
set(opentrack-hier-pfx "modules")
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index 35de63a4..bb7fb1f8 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -43,11 +43,15 @@ set(CMAKE_CXX_STANDARD_DEFAULT 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS FALSE)
-IF (NOT APPLE)
+if (NOT APPLE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
set(CMAKE_SKIP_RPATH FALSE)
+else()
+ set(CMAKE_SKIP_BUILD_RPATH FALSE)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+ set(CMAKE_MACOSX_RPATH OFF)
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC OFF)
@@ -56,7 +60,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
-set(CMAKE_MACOSX_RPATH OFF)
if(NOT WIN32 AND NOT APPLE)
include(opentrack-pkg-config)
diff --git a/macosx/make-app-bundle.sh b/macosx/make-app-bundle.sh
index 5453c2cc..fc78f428 100755
--- a/macosx/make-app-bundle.sh
+++ b/macosx/make-app-bundle.sh
@@ -24,7 +24,7 @@ tmp="$(mktemp -d "/tmp/$APPNAME-tmp.XXXXXXX")"
test $? -eq 0 || exit 1
# Add framework and other libraries
-macdeployqt "$install/$APPNAME.app" -libpath="$install/$APPNAME.app/Contents/MacOS"
+macdeployqt "$install/$APPNAME.app" -libpath="$install/Library"
# Fixup dylib linker issues
sh "$dir/install-fail-tool" "$install/$APPNAME.app/Contents/Frameworks"
@@ -54,26 +54,28 @@ rm -rf "$tmp"
#Build DMG
#https://github.com/andreyvit/create-dmg
-rm -rf $install/../$version.dmg
+rm -rf $install/../*.dmg
create-dmg \
--volname "$APPNAME" \
--volicon "$install/$APPNAME.app/Contents/Resources/$APPNAME.icns" \
--window-pos 200 120 \
--window-size 800 450 \
- --icon-size 100 \
+ --icon-size 80 \
--background "$dir/dmgbackground.png" \
- --icon "$APPNAME.app" 200 190 \
+ --icon "$APPNAME.app" 200 180 \
+ --app-drop-link 420 180 \
--hide-extension "$APPNAME.app" \
- --app-drop-link 600 185 \
+ --add-folder "Document" "$install/doc" 20 40 \
+ --add-folder "source-code" "$install/source-code" 220 40 \
+ --add-folder "Xplane-Plugin" "$install/xplane" 420 40 \
"$version.dmg" \
"$install/$APPNAME.app"
# Check if we have a DMG otherwise fail
-FILE=$install/../$version.dmg
+FILE=$install/../$version.dmg
if [ -f $FILE ]; then
- ls -ial $install/../*.dmg
- exit 0
+ ls -ial $install/../*.dmg
else
- echo "Failed to create $FILE"
+ echo "Failed to create ${FILE}"
exit 2
fi