aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-09 15:23:14 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-09 15:24:25 -0800
commitc8be04edad5e5f8cc91bae22d599ffdda1042376 (patch)
tree447cc148612877db01be1ca57347ce579d75520c
parente714263e8ad50b810f49ff8a381898459a433c8b (diff)
downloadsubsurface-c8be04edad5e5f8cc91bae22d599ffdda1042376.tar.gz
Mac build: move the QtXml hack into Cmake
This way build.sh can build a Subsurface.app that the user can use via open subsurface/build/Subsurface.app after running build.sh. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--CMakeLists.txt11
-rwxr-xr-xpackaging/macosx/make-package.sh10
2 files changed, 11 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f09cf08b9..4a566204d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -550,6 +550,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
install(CODE "execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/qml)")
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQuick ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/qml)")
endif()
+ if(NOT NO_MARBLE)
+ # more hackery - this time for QtXml which is needed by libssrfmarblewidget
+ install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/lib/QtXml.framework ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks)")
+ install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtXml.framework/Versions/5/Headers)")
+ install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtXml.framework/Headers)")
+ install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtXml.framework/QtXml.prl)")
+ install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtXml.framework/Versions/5/*_debug)")
+ install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtXml.framework//*_debug)")
+ install(CODE "execute_process(COMMAND install_name_tool -id @executable_path/../Frameworks/QtXml ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtXml.framework/QtXml)")
+ install(CODE "execute_process(COMMAND install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/QtCore ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtXml.framework/QtXml)")
+ endif()
install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")")
endif()
diff --git a/packaging/macosx/make-package.sh b/packaging/macosx/make-package.sh
index 990d510ed..ad5de26a3 100755
--- a/packaging/macosx/make-package.sh
+++ b/packaging/macosx/make-package.sh
@@ -20,16 +20,6 @@ rm -rf ./Subsurface.app
LIBRARY_PATH=${DIR}/install-root/lib make -j8
LIBRARY_PATH=${DIR}/install-root/lib make install
-# HACK TIME... QtXml is missing. screw this
-cp -a $HOME/Qt/5.5/clang_64/lib/QtXml.framework Subsurface.app/Contents/Frameworks
-rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/Versions/5/Headers
-rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/Headers
-rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/QtXml.prl
-rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/Versions/5/*_debug
-rm -rf Subsurface.app/Contents/Frameworks/QtXml.framework/*_debug*
-install_name_tool -id @executable_path/../Frameworks/QtXml Subsurface.app/Contents/Frameworks/QtXml.framework/QtXml
-install_name_tool -change @rpath/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/QtCore Subsurface.app/Contents/Frameworks/QtXml.framework/QtXml
-
# now adjust a few references that macdeployqt appears to miss
EXECUTABLE=Subsurface.app/Contents/MacOS/Subsurface
for i in libssh libssrfmarblewidget libgit2; do