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() | endforeach() | ||||||
| 
 | 
 | ||||||
| # now for each platform the install instructions | # now for each platform the install instructions | ||||||
| 
 | if(SUBSURFACE_TARGET_PLATFORM MATCHES "Android") | ||||||
| if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | 	# Android template directory | ||||||
| 	if(SUBSURFACE_MOBILE) | 	include(${QT_ANDROID_CMAKE}) | ||||||
| 		set(APP_BUNDLE_DIR Subsurface-mobile.app) | 	set(ANDROID_PACKAGE_SOURCE_DIR, ${CMAKE_BINARY_DIR}/android-mobile) | ||||||
| 		set(MACDEPLOY_ARGS "-qmldir=${APP_BUNDLE_DIR}/Contents/Frameworks/qml") | 	add_qt_android_apk(subsurface-mobile.apk subsurface-mobile | ||||||
| 	else() | 		PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/android-mobile | ||||||
| 		set(APP_BUNDLE_DIR Subsurface.app) | 	) | ||||||
| 	endif() | elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "AndroidEmulator") | ||||||
| 	set(RESOURCEDIR ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources) | elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "iOS") | ||||||
| 	set(PLUGINDIR ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/PlugIns) | 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/maps DESTINATION ${RESOURCEDIR}/data) | ||||||
| 		install(DIRECTORY marbledata/bitmaps DESTINATION ${RESOURCEDIR}/data) | 		install(DIRECTORY marbledata/bitmaps DESTINATION ${RESOURCEDIR}/data) | ||||||
| 		install(DIRECTORY Documentation/images DESTINATION ${RESOURCEDIR}/share/Documentation) | 		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}) | 		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 | 		# 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}) | 		string(REPLACE moc macdeployqt MACDEPLOYQT ${QT_MOC_EXECUTABLE}) | ||||||
| 	install(CODE "execute_process(COMMAND ${MACDEPLOYQT} ${APP_BUNDLE_DIR} ${MACDEPLOY_ARGS})") | 		install(CODE "execute_process(COMMAND ${MACDEPLOYQT} Subsurface.app)") | ||||||
| 	# 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 "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")") | 		install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")") | ||||||
| 
 | 	elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") | ||||||
| endif() |  | ||||||
| 
 |  | ||||||
| if(CMAKE_SYSTEM_NAME STREQUAL "Windows") |  | ||||||
| 		# Windows bundling rules | 		# Windows bundling rules | ||||||
| 		# We don't have a helpful tool like macdeployqt for Windows, so we hardcode | 		# We don't have a helpful tool like macdeployqt for Windows, so we hardcode | ||||||
| 		# which libs we need. | 		# which libs we need. | ||||||
|  | @ -401,25 +386,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") | ||||||
| 			COMMAND ${MAKENSIS} ${WINDOWSSTAGING}/subsurface.nsi | 			COMMAND ${MAKENSIS} ${WINDOWSSTAGING}/subsurface.nsi | ||||||
| 			DEPENDS fake_install | 			DEPENDS fake_install | ||||||
| 		) | 		) | ||||||
| endif() | 	elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||||||
| 
 |  | ||||||
| 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") |  | ||||||
| 		install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data) | 		install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data) | ||||||
| 		install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data) | 		install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data) | ||||||
| 		install(FILES subsurface.debug DESTINATION bin) | 		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)" | 				CODE "file(INSTALL \${SSRFMARBLE_SHLIBS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)" | ||||||
| 			) | 			) | ||||||
| 		endif() | 		endif() | ||||||
|  | 	endif() | ||||||
| endif() | endif() | ||||||
| 
 | 
 | ||||||
| if (MAKE_TESTS) | if (MAKE_TESTS) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue