Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
2204d16d
Commit
2204d16d
authored
3 years ago
by
Ammar Nejati
Browse files
Options
Downloads
Patches
Plain Diff
App/CMakeLists.txt: Configure the zsh script to adjust the MacOS bundle
parent
3e8d6cc6
No related branches found
No related tags found
1 merge request
!795
Repair the MacOS bundle (.dmg package)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
App/CMakeLists.txt
+38
-6
38 additions, 6 deletions
App/CMakeLists.txt
with
38 additions
and
6 deletions
App/CMakeLists.txt
+
38
−
6
View file @
2204d16d
...
@@ -68,9 +68,9 @@ if(APPLE)
...
@@ -68,9 +68,9 @@ if(APPLE)
PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${
BUILD_VAR_DIR
}
/Info.plist
)
PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${
BUILD_VAR_DIR
}
/Info.plist
)
if
(
BA_APPLE_BUNDLE
)
if
(
BA_APPLE_BUNDLE
)
# this makes sense only if we build a bundle
set
(
link_flags
set
(
link_flags
"
-Wl,-rpath,@loader_path/../Frameworks/ \
"-Wl,-rpath,@loader_path/../lib
-Wl,-rpath,@loader_path/../Frameworks/ \
-Wl,-rpath,@loader_path/../lib/BornAgain-
${
BornAgain_VERSION_MAJOR
}
.
${
BornAgain_VERSION_MINOR
}
/"
)
-Wl,-rpath,@loader_path/../lib/BornAgain-
${
BornAgain_VERSION_MAJOR
}
.
${
BornAgain_VERSION_MINOR
}
/"
)
else
()
else
()
set
(
link_flags
"-Wl,-rpath,\
set
(
link_flags
"-Wl,-rpath,\
@loader_path/../../../lib/BornAgain-
${
BornAgain_VERSION_MAJOR
}
.
${
BornAgain_VERSION_MINOR
}
/"
)
@loader_path/../../../lib/BornAgain-
${
BornAgain_VERSION_MAJOR
}
.
${
BornAgain_VERSION_MINOR
}
/"
)
...
@@ -103,7 +103,39 @@ if(BA_APPLE_BUNDLE)
...
@@ -103,7 +103,39 @@ if(BA_APPLE_BUNDLE)
DESTINATION
${
destination_bundle
}
/Contents/Resources/
)
DESTINATION
${
destination_bundle
}
/Contents/Resources/
)
install
(
FILES
${
CMAKE_SOURCE_DIR
}
/cmake/configurables/qt.conf
install
(
FILES
${
CMAKE_SOURCE_DIR
}
/cmake/configurables/qt.conf
DESTINATION
${
destination_bundle
}
/Contents/Resources/
)
DESTINATION
${
destination_bundle
}
/Contents/Resources/
)
configure_file
(
${
CMAKE_SOURCE_DIR
}
/cmake/configurables/FixAppleBundle.cmake.in
${
BUILD_VAR_DIR
}
/FixAppleBundle.cmake @ONLY
)
# adjust MacOS bundle
install
(
SCRIPT
${
BUILD_VAR_DIR
}
/FixAppleBundle.cmake COMPONENT Runtime
)
set
(
MACPK_ROOT_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/
${
destination_prefix
}
"
)
set
(
MACPK_MAIN_EXE
"
${
executable_name
}
"
)
set
(
MACPK_QTDIR
"
${
Qt_DIR
}
"
)
# NOTE: Only cerf and formfactor libraries should be passed;
# other libraries will be found automatically.
set
(
MACPK_EXTRA_LIBS
${
Cerf_LIBRARIES
}
${
FormFactor_LIBRARIES
}
)
# list of required Qt plugins (paths relative to Qt root dir)
set
(
MACPK_QT_PLUGINS
plugins/platforms/libqcocoa.dylib
plugins/iconengines/libqsvgicon.dylib
plugins/imageformats/libqjpeg.dylib
plugins/imageformats/libqsvg.dylib
plugins/styles/libqmacstyle.dylib
)
# Qt plugins directory in within the MacOS bundle
set
(
MACPK_QT_PLUGINS_DIR PlugIns
)
# conform to settings in `qt.conf`
# convert CMake list to space-separated lists
string
(
REPLACE
";"
" "
MACPK_EXTRA_LIBS
"
${
MACPK_EXTRA_LIBS
}
"
)
string
(
REPLACE
";"
" "
MACPK_QT_PLUGINS
"
${
MACPK_QT_PLUGINS
}
"
)
configure_file
(
${
CMAKE_SOURCE_DIR
}
/cmake/configurables/FixAppleBundle.cmake.in
${
BUILD_VAR_DIR
}
/FixAppleBundle.cmake @ONLY
)
configure_file
(
"
${
CMAKE_SOURCE_DIR
}
/devtools/deploy/shutils.zsh"
"
${
BUILD_VAR_DIR
}
/shutils.zsh"
@ONLY
)
configure_file
(
"
${
CMAKE_SOURCE_DIR
}
/devtools/deploy/adjust_mac_bundle.zsh"
"
${
BUILD_VAR_DIR
}
/adjust_mac_bundle.zsh"
@ONLY
)
set
(
CPACK_PRE_BUILD_SCRIPTS
"
${
BUILD_VAR_DIR
}
/FixAppleBundle.cmake"
)
install
(
SCRIPT
${
BUILD_VAR_DIR
}
/FixAppleBundle.cmake
)
endif
()
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment