mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
OS X: Fix .app creation for non-system Qt
This commit is contained in:
parent
7eb10a08b8
commit
f0fef4f232
2 changed files with 8 additions and 5 deletions
|
@ -23,7 +23,7 @@ import sys
|
|||
from glob import glob
|
||||
|
||||
def QueryQMake(attrib):
|
||||
return subprocess.check_output(['qmake', '-query', attrib]).rstrip('\n')
|
||||
return subprocess.check_output([qmake_path, '-query', attrib]).rstrip('\n')
|
||||
|
||||
FRAMEWORK_SEARCH_PATH=[
|
||||
'/Library/Frameworks',
|
||||
|
@ -71,14 +71,15 @@ class CouldNotFindScriptPluginError(Error):
|
|||
class CouldNotFindFrameworkError(Error):
|
||||
pass
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print 'Usage: %s <bundle.app>' % sys.argv[0]
|
||||
if len(sys.argv) < 3:
|
||||
print 'Usage: %s <bundle.app> <path-to-qmake>' % sys.argv[0]
|
||||
exit()
|
||||
|
||||
def is_exe(fpath):
|
||||
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
|
||||
|
||||
bundle_dir = sys.argv[1]
|
||||
qmake_path = sys.argv[2]
|
||||
|
||||
bundle_name = os.path.basename(bundle_dir).split('.')[0]
|
||||
|
||||
|
|
|
@ -383,7 +383,8 @@ if(NOT BUILD_LIBRARIES_ONLY)
|
|||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
|
||||
)
|
||||
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}" )
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/" )
|
||||
|
||||
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${QT_LIBRARIES} )
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} )
|
||||
|
@ -442,8 +443,9 @@ endif()
|
|||
# currently it needs to be done because the code right above needs to be executed no matter
|
||||
# if building a bundle or not and the install_qt4_executable needs to be called afterwards
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE AND NOT BUILD_LIBRARIES_ONLY)
|
||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||
install(CODE "
|
||||
message(STATUS \"Deploying (Qt) dependencies and fixing library pathes...\")
|
||||
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE})
|
||||
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE} ${QT_QMAKE_EXECUTABLE})
|
||||
" COMPONENT RUNTIME)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue