mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Qt6: more CMakeLists.txt cleanup
We used yet another version dependent variable. This one is even weirder as it is an undocumented one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									aad4282fc3
								
							
						
					
					
						commit
						eb1849d7ba
					
				
					 1 changed files with 17 additions and 12 deletions
				
			
		|  | @ -537,33 +537,38 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | |||
| 	install(FILES ${QTTRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations) | ||||
| 	install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt DESTINATION ${RESOURCEDIR}) | ||||
| 	install(CODE "execute_process(COMMAND mkdir -p ${RESOURCEDIR}/qml)") | ||||
| 	if(QT_VERSION VERSION_LESS 6.0.0) | ||||
| 		set(QT_INSTALL_PREFIX ${_qt5Core_install_prefix}) | ||||
| 	else() | ||||
| 		set(QT_INSTALL_PREFIX ${QT6_INSTALL_PREFIX}) | ||||
| 	endif() | ||||
| 	install(CODE "execute_process(COMMAND mkdir -p ${PLUGINDIR}/geoservices)") | ||||
| 	install(CODE "execute_process(COMMAND cp ${_qt5Core_install_prefix}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)") | ||||
| 	install(CODE "execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/../install-root/${_qt5Core_install_prefix}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)") | ||||
| 	install(CODE "execute_process(COMMAND cp ${QT_INSTALL_PREFIX}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)") | ||||
| 	install(CODE "execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/../install-root/${QT_INSTALL_PREFIX}/plugins/geoservices/libqtgeoservices_googlemaps.dylib ${PLUGINDIR}/geoservices ERROR_QUIET)") | ||||
| 	# this will fail is macdeployqt isn't in the PATH - that seemed to happen in the past, but not recently | ||||
| 	install(CODE "execute_process(COMMAND macdeployqt ${APP_BUNDLE_DIR} -no-strip ${MACDEPLOY_ARGS})") | ||||
| 	# the next hack is here to delete the sqlite plugin that get's installed even though it isn't needed | ||||
| 	install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/PlugIns/sqldrivers)") | ||||
| 	# and another hack to get the QML Components in the right place | ||||
| 	install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml/{QtQuick.2,QtLocation,QtPositioning})") | ||||
| 	install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQuick.2 ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 	install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtLocation ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 	install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 	install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtQuick.2 ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 	install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtLocation ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 	install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 	if(NOT QT_VERSION VERSION_LESS 5.11.0) | ||||
| 		# and with Qt 5.11 we need another library that isn't copied by macdeployqt | ||||
| 		install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtPositioningQuick.framework)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/lib/QtPositioningQuick.framework ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/lib/QtPositioningQuick.framework ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks)") | ||||
| 	endif() | ||||
| 	if(NOT QT_VERSION VERSION_LESS 5.14.0) | ||||
| 		# and with Qt 5.14 we need another library that isn't always copied by macdeployqt | ||||
| 		install(CODE "execute_process(COMMAND rm -rf ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/QtQmlWorkerScript.framework)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/lib/QtQmlWorkerScript.framework ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/lib/QtQmlWorkerScript.framework ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks)") | ||||
| 	endif() | ||||
| 	if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQuick ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtGraphicalEffects ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQml ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtQuick ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtGraphicalEffects ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtQml ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 		install(CODE "execute_process(COMMAND cp -a ${QT_INSTALL_PREFIX}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") | ||||
| 	endif() | ||||
| elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") | ||||
| 	if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") | ||||
|  | @ -600,7 +605,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") | |||
| 	if(NOT QT_VERSION VERSION_LESS 5.11.0) | ||||
| 		# hack to work around the fact that we don't process the dependencies of plugins | ||||
| 		# as of Qt 5.11 this additional DLL is needed and it's only referenced in the qml DLLs | ||||
| 		install(FILES ${_qt5Core_install_prefix}/bin/QtPositioningQuick.dll DESTINATION ${WINDOWSSTAGING}) | ||||
| 		install(FILES ${QT_INSTALL_PREFIX}/bin/QtPositioningQuick.dll DESTINATION ${WINDOWSSTAGING}) | ||||
| 	endif() | ||||
| 
 | ||||
| 	if(NOT DEFINED MAKENSIS) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue