I am not using CMake myselft. Instead, our deploy step is just a simple script (this might help even if it is not the perfect solution):
#!/bin/bash echo Delete old application folder. rm -rf MyApp.app echo Copy new application folder. cp -r ../release/MyApp.app ./ install_name_tool -change /usr/local/lib/libomp.dylib @rpath/libomp.dylib MyApp.app/Contents/MacOS/MyApp # our app needs to change the path to this lib mkdir -p MyApp.app/Contents/Frameworks cp libomp.dylib MyApp.app/Contents/Frameworks/ # this is the extra lib we need echo Bundle Qt libs. /Users/Shared/Qt/5.13.2/clang_64/bin/macdeployqt MyApp.app echo Package examples. cp -r examples MyApp.app/Contents/Resources/ echo Create dmg. rm MyApp.dmg bin/create-dmg --volname "MyApp Installer" --background ../src/rc/mac_dmg_background.png --window-pos 200 120 --window-size 598 465 --icon-size 80 --icon MyApp.app 150 330 --hide-extension "MyApp.app" --app-drop-link 450 330 MyApp.dmg MyApp.app echo Done.In this example we have to link with the OpenMP dynamic library. This is copied into the app folder. install_name_tool lets you change the path to dynamic libraries. You need to know the original path inside the executable in order to change it. You can look these up using otool on the executable (or was it the app?).
In the end we are create a dmg image. This has a background image with an arrow pointing from the app icon to the applications folder (--app-drop-link) to suggest the user should just move the app over to the application folder for installation. The image looks something like this:
2a6fca51-7336-414b-9584-9655b9ab4221-grafik.png
(You also should have a file named mac_dmg_background@2x.png with double the resolution for Retina displays.)