macOS: Fix vfs suffix plugin paths #7090

This commit is contained in:
Markus Goetz 2019-03-15 13:56:11 +01:00 committed by Kevin Ottens
parent d496aa5933
commit 32c60c2f5d
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2
2 changed files with 23 additions and 3 deletions

View file

@ -105,7 +105,13 @@ if(WIN32)
set(DATADIR "share") set(DATADIR "share")
endif(WIN32) endif(WIN32)
set(SHAREDIR ${DATADIR}) set(SHAREDIR ${DATADIR})
set(PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/${APPLICATION_SHORTNAME}/plugins" CACHE STRING "Extra path to look for Qt plugins like for VFS. May be relative to binary.")
if (NOT APPLE)
set(PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/${APPLICATION_SHORTNAME}/plugins" CACHE STRING "Extra path to look for Qt plugins like for VFS. May be relative to binary.")
else()
# Inside the .app bundle
set(PLUGINDIR "../PlugIns" CACHE STRING "Extra path to look for Qt plugins like for VFS. May be relative to binary.")
endif()
##### #####
## handle BUILD_OWNCLOUD_OSX_BUNDLE ## handle BUILD_OWNCLOUD_OSX_BUNDLE

View file

@ -13,8 +13,22 @@ set_target_properties("${synclib_NAME}_vfs_suffix" PROPERTIES
AUTOMOC TRUE AUTOMOC TRUE
) )
if(APPLE)
# for being loadable when client run from build dir
set(vfs_buildoutputdir "${BIN_OUTPUT_DIRECTORY}/${OWNCLOUD_OSX_BUNDLE}/Contents/PlugIns/")
set_target_properties("${synclib_NAME}_vfs_suffix"
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${vfs_buildoutputdir}
RUNTIME_OUTPUT_DIRECTORY ${vfs_buildoutputdir}
)
# For being lodable when client run from install dir (after make macdeployqt)
set(vfs_installdir "${LIB_INSTALL_DIR}/../PlugIns")
else()
set(vfs_installdir "${PLUGINDIR}")
endif()
INSTALL(TARGETS "${synclib_NAME}_vfs_suffix" INSTALL(TARGETS "${synclib_NAME}_vfs_suffix"
LIBRARY DESTINATION "${PLUGINDIR}" LIBRARY DESTINATION "${vfs_installdir}"
RUNTIME DESTINATION "${PLUGINDIR}" RUNTIME DESTINATION "${vfs_installdir}"
) )