mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Finish things
i hope Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
This commit is contained in:
		
							parent
							
								
									6087c246c4
								
							
						
					
					
						commit
						3462da19fd
					
				
					 1 changed files with 92 additions and 124 deletions
				
			
		|  | @ -315,16 +315,20 @@ foreach(QTTRANSLATION ${QTTRANSLATIONS_BASE}) | |||
| endforeach() | ||||
| 
 | ||||
| # now for each platform the install instructions | ||||
| 
 | ||||
| if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||||
| 	if(SUBSURFACE_MOBILE) | ||||
| 		set(APP_BUNDLE_DIR Subsurface-mobile.app) | ||||
| 		set(MACDEPLOY_ARGS "-qmldir=${APP_BUNDLE_DIR}/Contents/Frameworks/qml") | ||||
| 	else() | ||||
| 		set(APP_BUNDLE_DIR Subsurface.app) | ||||
| 	endif() | ||||
| 	set(RESOURCEDIR ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources) | ||||
| 	set(PLUGINDIR ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/PlugIns) | ||||
| if(SUBSURFACE_TARGET_PLATFORM MATCHES "Android") | ||||
| 	# Android template directory | ||||
| 	include(${QT_ANDROID_CMAKE}) | ||||
| 	set(ANDROID_PACKAGE_SOURCE_DIR, ${CMAKE_BINARY_DIR}/android-mobile) | ||||
| 	add_qt_android_apk(subsurface-mobile.apk subsurface-mobile | ||||
| 		PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/android-mobile | ||||
| 	) | ||||
| elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "AndroidEmulator") | ||||
| elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "iOS") | ||||
| elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "iOSEmulator") | ||||
| elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "Desktop") | ||||
| 	if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||||
| 		set(RESOURCEDIR ${CMAKE_BINARY_DIR}/Subsurface.app/Contents/Resources) | ||||
| 		set(PLUGINDIR ${CMAKE_BINARY_DIR}/Subsurface.app/Contents/PlugIns) | ||||
| 		install(DIRECTORY marbledata/maps DESTINATION ${RESOURCEDIR}/data) | ||||
| 		install(DIRECTORY marbledata/bitmaps DESTINATION ${RESOURCEDIR}/data) | ||||
| 		install(DIRECTORY Documentation/images DESTINATION ${RESOURCEDIR}/share/Documentation) | ||||
|  | @ -338,28 +342,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | |||
| 		install(DIRECTORY ${Grantlee5_DIR}/../../grantlee DESTINATION ${PLUGINDIR}) | ||||
| 		# this is a hack - but I don't know how else to find the macdeployqt program if it's not in the PATH | ||||
| 		string(REPLACE moc macdeployqt MACDEPLOYQT ${QT_MOC_EXECUTABLE}) | ||||
| 	install(CODE "execute_process(COMMAND ${MACDEPLOYQT} ${APP_BUNDLE_DIR} ${MACDEPLOY_ARGS})") | ||||
| 	# and another hack to get the QML Components in the right place | ||||
| 	if(SUBSURFACE_MOBILE) | ||||
| 		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 "execute_process(COMMAND ${MACDEPLOYQT} Subsurface.app)") | ||||
| 		install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")") | ||||
| 
 | ||||
| endif() | ||||
| 
 | ||||
| if(CMAKE_SYSTEM_NAME STREQUAL "Windows") | ||||
| 	elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") | ||||
| 		# Windows bundling rules | ||||
| 		# We don't have a helpful tool like macdeployqt for Windows, so we hardcode | ||||
| 		# which libs we need. | ||||
|  | @ -401,25 +386,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") | |||
| 			COMMAND ${MAKENSIS} ${WINDOWSSTAGING}/subsurface.nsi | ||||
| 			DEPENDS fake_install | ||||
| 		) | ||||
| endif() | ||||
| 
 | ||||
| if(ANDROID) | ||||
| 	# Android template directory | ||||
| 	include(${QT_ANDROID_CMAKE}) | ||||
| 	if(SUBSURFACE_MOBILE) | ||||
| 		set(ANDROID_PACKAGE_SOURCE_DIR, ${CMAKE_BINARY_DIR}/android-mobile) | ||||
| 		add_qt_android_apk(subsurface-mobile.apk subsurface-mobile | ||||
| 			PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/android-mobile | ||||
| 		) | ||||
| 	else() | ||||
| 		set(ANDROID_PACKAGE_SOURCE_DIR, ${CMAKE_BINARY_DIR}/android) | ||||
| 		add_qt_android_apk(subsurface.apk ${SUBSURFACE_TARGET} | ||||
| 			PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/android | ||||
| 		) | ||||
| 	endif() | ||||
| endif() | ||||
| 
 | ||||
| if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||||
| 	elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||||
| 		install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data) | ||||
| 		install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data) | ||||
| 		install(FILES subsurface.debug DESTINATION bin) | ||||
|  | @ -444,6 +411,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | |||
| 				CODE "file(INSTALL \${SSRFMARBLE_SHLIBS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)" | ||||
| 			) | ||||
| 		endif() | ||||
| 	endif() | ||||
| endif() | ||||
| 
 | ||||
| if (MAKE_TESTS) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue