2014-07-11 02:31:24 +04:00
|
|
|
project(gui)
|
2017-12-14 17:10:33 +03:00
|
|
|
find_package(Qt5 REQUIRED COMPONENTS Widgets)
|
2014-07-11 02:31:24 +04:00
|
|
|
set(CMAKE_AUTOMOC TRUE)
|
2017-12-14 17:10:33 +03:00
|
|
|
set(CMAKE_AUTOUIC TRUE)
|
|
|
|
set(CMAKE_AUTORCC TRUE)
|
2014-07-11 02:31:24 +04:00
|
|
|
add_subdirectory(updater)
|
|
|
|
|
|
|
|
#TODO Move resources files
|
2017-12-14 17:10:33 +03:00
|
|
|
set(MIRALL_RC_SRC ../../client.qrc)
|
2017-09-22 11:28:08 +03:00
|
|
|
if (EXISTS "${OEM_THEME_DIR}/theme.qrc")
|
2017-12-14 17:10:33 +03:00
|
|
|
list(APPEND MIRALL_RC_SRC ${OEM_THEME_DIR}/theme.qrc)
|
2014-07-11 02:31:24 +04:00
|
|
|
set(theme_dir ${OEM_THEME_DIR}/theme)
|
|
|
|
else()
|
2017-12-14 17:10:33 +03:00
|
|
|
list(APPEND MIRALL_RC_SRC ../../theme.qrc)
|
2014-07-11 02:31:24 +04:00
|
|
|
set(theme_dir ${CMAKE_SOURCE_DIR}/theme)
|
|
|
|
endif()
|
|
|
|
|
2017-12-14 17:10:33 +03:00
|
|
|
set(client_UI_SRCS
|
2014-07-11 02:31:24 +04:00
|
|
|
accountsettings.ui
|
|
|
|
folderwizardsourcepage.ui
|
|
|
|
folderwizardtargetpage.ui
|
|
|
|
generalsettings.ui
|
|
|
|
ignorelisteditor.ui
|
|
|
|
networksettings.ui
|
|
|
|
protocolwidget.ui
|
2017-07-04 15:08:41 +03:00
|
|
|
issueswidget.ui
|
2015-10-19 15:41:53 +03:00
|
|
|
activitywidget.ui
|
2015-09-30 13:02:05 +03:00
|
|
|
synclogdialog.ui
|
2014-07-11 02:31:24 +04:00
|
|
|
settingsdialog.ui
|
2014-09-03 18:12:21 +04:00
|
|
|
sharedialog.ui
|
2015-11-05 11:58:16 +03:00
|
|
|
sharelinkwidget.ui
|
|
|
|
shareusergroupwidget.ui
|
2017-04-04 16:05:08 +03:00
|
|
|
shareuserline.ui
|
2014-07-11 02:31:24 +04:00
|
|
|
sslerrordialog.ui
|
2014-11-18 18:44:14 +03:00
|
|
|
addcertificatedialog.ui
|
2015-07-16 15:21:51 +03:00
|
|
|
proxyauthdialog.ui
|
2016-03-04 19:41:57 +03:00
|
|
|
notificationwidget.ui
|
2014-07-11 02:31:24 +04:00
|
|
|
wizard/owncloudadvancedsetuppage.ui
|
2015-02-03 00:29:21 +03:00
|
|
|
wizard/owncloudconnectionmethoddialog.ui
|
2014-07-11 02:31:24 +04:00
|
|
|
wizard/owncloudhttpcredspage.ui
|
2017-06-07 17:19:34 +03:00
|
|
|
wizard/owncloudoauthcredspage.ui
|
2014-07-11 02:31:24 +04:00
|
|
|
wizard/owncloudsetupnocredspage.ui
|
|
|
|
wizard/owncloudwizardresultpage.ui
|
|
|
|
)
|
|
|
|
|
2014-11-10 00:30:05 +03:00
|
|
|
set(client_SRCS
|
2015-04-09 17:19:17 +03:00
|
|
|
accountmanager.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
accountsettings.cpp
|
|
|
|
application.cpp
|
|
|
|
folder.cpp
|
|
|
|
folderman.cpp
|
|
|
|
folderstatusmodel.cpp
|
2015-06-15 15:16:21 +03:00
|
|
|
folderstatusdelegate.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
folderwatcher.cpp
|
|
|
|
folderwizard.cpp
|
|
|
|
generalsettings.cpp
|
|
|
|
ignorelisteditor.cpp
|
2016-04-29 17:14:18 +03:00
|
|
|
lockwatcher.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
logbrowser.cpp
|
2017-10-04 14:49:42 +03:00
|
|
|
navigationpanehelper.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
networksettings.cpp
|
2015-09-07 14:50:01 +03:00
|
|
|
ocsjob.cpp
|
|
|
|
ocssharejob.cpp
|
2015-11-02 00:23:22 +03:00
|
|
|
ocsshareejob.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
openfilemanager.cpp
|
|
|
|
owncloudgui.cpp
|
|
|
|
owncloudsetupwizard.cpp
|
|
|
|
protocolwidget.cpp
|
2017-07-04 15:08:41 +03:00
|
|
|
issueswidget.cpp
|
2016-03-23 18:47:13 +03:00
|
|
|
activitydata.cpp
|
2016-03-11 13:37:45 +03:00
|
|
|
activitylistmodel.cpp
|
2015-10-19 15:41:53 +03:00
|
|
|
activitywidget.cpp
|
2015-11-03 19:54:37 +03:00
|
|
|
activityitemdelegate.cpp
|
2014-08-26 16:33:21 +04:00
|
|
|
selectivesyncdialog.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
settingsdialog.cpp
|
2014-09-03 18:12:21 +04:00
|
|
|
sharedialog.cpp
|
2015-11-05 11:58:16 +03:00
|
|
|
sharelinkwidget.cpp
|
2016-09-14 16:31:05 +03:00
|
|
|
sharemanager.cpp
|
2015-11-05 11:58:16 +03:00
|
|
|
shareusergroupwidget.cpp
|
2015-11-02 00:23:22 +03:00
|
|
|
sharee.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
socketapi.cpp
|
|
|
|
sslbutton.cpp
|
|
|
|
sslerrordialog.cpp
|
|
|
|
syncrunfilelog.cpp
|
|
|
|
systray.cpp
|
2015-09-07 14:50:01 +03:00
|
|
|
thumbnailjob.cpp
|
2014-12-17 16:09:57 +03:00
|
|
|
quotainfo.cpp
|
|
|
|
accountstate.cpp
|
2014-11-18 18:44:14 +03:00
|
|
|
addcertificatedialog.cpp
|
2015-06-15 16:53:45 +03:00
|
|
|
authenticationdialog.cpp
|
2015-07-16 15:21:51 +03:00
|
|
|
proxyauthhandler.cpp
|
|
|
|
proxyauthdialog.cpp
|
2015-09-30 13:02:05 +03:00
|
|
|
synclogdialog.cpp
|
2016-01-21 13:32:27 +03:00
|
|
|
tooltipupdater.cpp
|
2016-03-04 19:41:57 +03:00
|
|
|
notificationwidget.cpp
|
|
|
|
notificationconfirmjob.cpp
|
2016-03-10 19:09:36 +03:00
|
|
|
servernotificationhandler.cpp
|
2017-05-10 10:37:10 +03:00
|
|
|
guiutility.cpp
|
2017-07-11 16:50:56 +03:00
|
|
|
elidedlabel.cpp
|
2015-06-15 16:53:45 +03:00
|
|
|
creds/credentialsfactory.cpp
|
|
|
|
creds/httpcredentialsgui.cpp
|
2017-03-28 11:31:38 +03:00
|
|
|
creds/oauth.cpp
|
2016-03-22 12:20:20 +03:00
|
|
|
wizard/postfixlineedit.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
wizard/abstractcredswizardpage.cpp
|
|
|
|
wizard/owncloudadvancedsetuppage.cpp
|
2015-02-03 00:29:21 +03:00
|
|
|
wizard/owncloudconnectionmethoddialog.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
wizard/owncloudhttpcredspage.cpp
|
2017-03-28 11:31:38 +03:00
|
|
|
wizard/owncloudoauthcredspage.cpp
|
2014-07-11 02:31:24 +04:00
|
|
|
wizard/owncloudsetuppage.cpp
|
|
|
|
wizard/owncloudwizardcommon.cpp
|
|
|
|
wizard/owncloudwizard.cpp
|
|
|
|
wizard/owncloudwizardresultpage.cpp
|
|
|
|
)
|
|
|
|
|
2016-09-11 17:14:08 +03:00
|
|
|
IF(NOT NO_SHIBBOLETH)
|
|
|
|
list(APPEND client_SRCS
|
|
|
|
creds/shibbolethcredentials.cpp
|
|
|
|
creds/shibboleth/shibbolethwebview.cpp
|
|
|
|
creds/shibboleth/shibbolethuserjob.cpp
|
|
|
|
wizard/owncloudshibbolethcredspage.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2014-07-11 02:31:24 +04:00
|
|
|
|
|
|
|
set(updater_SRCS
|
|
|
|
updater/ocupdater.cpp
|
|
|
|
updater/updateinfo.cpp
|
|
|
|
updater/updater.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
IF( APPLE )
|
2014-11-10 00:30:05 +03:00
|
|
|
list(APPEND client_SRCS cocoainitializer_mac.mm)
|
|
|
|
list(APPEND client_SRCS settingsdialogmac.cpp)
|
2017-10-06 13:01:10 +03:00
|
|
|
list(REMOVE_ITEM client_SRCS settingsdialog.cpp)
|
2015-06-15 15:51:11 +03:00
|
|
|
list(APPEND client_SRCS socketapisocket_mac.mm)
|
2015-02-07 20:23:09 +03:00
|
|
|
list(APPEND client_SRCS systray.mm)
|
2014-07-11 02:31:24 +04:00
|
|
|
|
|
|
|
if(SPARKLE_FOUND)
|
|
|
|
# Define this, we need to check in updater.cpp
|
|
|
|
add_definitions( -DHAVE_SPARKLE )
|
|
|
|
list(APPEND updater_SRCS updater/sparkleupdater_mac.mm)
|
|
|
|
endif()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF( NOT WIN32 AND NOT APPLE )
|
2014-11-10 00:58:24 +03:00
|
|
|
set(client_SRCS ${client_SRCS} folderwatcher_linux.cpp)
|
2014-07-11 02:31:24 +04:00
|
|
|
ENDIF()
|
|
|
|
IF( WIN32 )
|
2014-11-10 00:58:24 +03:00
|
|
|
set(client_SRCS ${client_SRCS} folderwatcher_win.cpp)
|
2014-07-11 02:31:24 +04:00
|
|
|
ENDIF()
|
|
|
|
IF( APPLE )
|
2014-11-10 00:30:05 +03:00
|
|
|
list(APPEND client_SRCS folderwatcher_mac.cpp)
|
2014-07-11 02:31:24 +04:00
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
set(3rdparty_SRC
|
|
|
|
../3rdparty/QProgressIndicator/QProgressIndicator.cpp
|
|
|
|
../3rdparty/qtlockedfile/qtlockedfile.cpp
|
|
|
|
../3rdparty/qtsingleapplication/qtlocalpeer.cpp
|
|
|
|
../3rdparty/qtsingleapplication/qtsingleapplication.cpp
|
|
|
|
../3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
list(APPEND 3rdparty_SRC
|
|
|
|
../3rdparty/qtmacgoodies/src/macpreferenceswindow.mm
|
|
|
|
../3rdparty/qtmacgoodies/src/macstandardicon.mm
|
2014-09-12 13:25:52 +04:00
|
|
|
../3rdparty/qtmacgoodies/src/macwindow.mm
|
2014-07-11 02:31:24 +04:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT WIN32)
|
|
|
|
list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_unix.cpp)
|
|
|
|
else()
|
|
|
|
list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_win.cpp )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2017-12-14 17:10:33 +03:00
|
|
|
find_package(Qt5LinguistTools)
|
|
|
|
if(Qt5LinguistTools_FOUND)
|
|
|
|
qt5_add_translation(client_I18N ${TRANSLATIONS})
|
|
|
|
endif()
|
2014-07-11 02:31:24 +04:00
|
|
|
|
2015-04-01 14:45:04 +03:00
|
|
|
IF( WIN32 )
|
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/version.rc
|
|
|
|
@ONLY)
|
|
|
|
set(client_version ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
|
2016-10-29 23:06:03 +03:00
|
|
|
IF(NOT MSVC)
|
|
|
|
set(client_manifest ${CMAKE_CURRENT_SOURCE_DIR}/manifest-mingw.rc)
|
|
|
|
ENDIF()
|
2015-04-01 14:45:04 +03:00
|
|
|
ENDIF()
|
|
|
|
|
2014-07-11 02:31:24 +04:00
|
|
|
set( final_src
|
|
|
|
${MIRALL_RC_SRC}
|
2014-11-10 00:30:05 +03:00
|
|
|
${client_SRCS}
|
|
|
|
${client_UI_SRCS}
|
2015-04-01 14:45:04 +03:00
|
|
|
${client_version}
|
2016-10-29 23:06:03 +03:00
|
|
|
${client_manifest}
|
2014-11-10 01:10:18 +03:00
|
|
|
${guiMoc}
|
2014-11-10 00:30:05 +03:00
|
|
|
${client_I18N}
|
2014-07-11 02:31:24 +04:00
|
|
|
${3rdparty_SRC}
|
|
|
|
${3rdparty_MOC}
|
|
|
|
)
|
|
|
|
|
2015-06-15 16:53:45 +03:00
|
|
|
if(QTKEYCHAIN_FOUND OR QT5KEYCHAIN_FOUND)
|
|
|
|
list(APPEND libsync_LINK_TARGETS ${QTKEYCHAIN_LIBRARY})
|
|
|
|
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2014-07-11 02:31:24 +04:00
|
|
|
# add executable icon on windows and osx
|
2018-01-04 23:06:23 +03:00
|
|
|
|
|
|
|
# UPSTREAM our ECMAddAppIcon.cmake then require that version here
|
|
|
|
# find_package(ECM 1.7.0 REQUIRED NO_MODULE)
|
|
|
|
# list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
|
|
|
include(ECMAddAppIcon)
|
2014-07-11 02:31:24 +04:00
|
|
|
|
2017-03-27 12:12:28 +03:00
|
|
|
# For historical reasons we can not use the application_shortname
|
|
|
|
# for ownCloud but must rather set it manually.
|
|
|
|
if (NOT DEFINED APPLICATION_ICON_NAME)
|
|
|
|
set(APPLICATION_ICON_NAME ${APPLICATION_SHORTNAME})
|
2014-07-11 02:31:24 +04:00
|
|
|
endif()
|
|
|
|
|
2018-01-04 23:06:23 +03:00
|
|
|
file(GLOB_RECURSE OWNCLOUD_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-icon*")
|
|
|
|
if(APPLE)
|
|
|
|
file(GLOB_RECURSE OWNCLOUD_SIDEBAR_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-sidebar*")
|
|
|
|
MESSAGE(STATUS "OWNCLOUD_SIDEBAR_ICONS: ${APPLICATION_ICON_NAME}: ${OWNCLOUD_SIDEBAR_ICONS}")
|
|
|
|
endif()
|
|
|
|
ecm_add_app_icon(final_src ICONS "${OWNCLOUD_ICONS}" SIDEBAR_ICONS "${OWNCLOUD_SIDEBAR_ICONS}" OUTFILE_BASE "${APPLICATION_ICON_NAME}")
|
2014-07-11 02:31:24 +04:00
|
|
|
|
2017-09-20 19:26:06 +03:00
|
|
|
if(UNIX AND NOT APPLE)
|
2017-10-06 15:34:22 +03:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
|
2017-09-20 19:26:06 +03:00
|
|
|
endif()
|
|
|
|
|
2014-07-11 14:36:01 +04:00
|
|
|
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
2014-07-11 02:31:24 +04:00
|
|
|
|
|
|
|
if(NOT WIN32)
|
2017-03-27 12:12:28 +03:00
|
|
|
file( GLOB _icons "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon-*.png" )
|
2014-07-11 02:31:24 +04:00
|
|
|
foreach( _file ${_icons} )
|
2017-03-27 12:12:28 +03:00
|
|
|
string( REPLACE "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon-" "" _res ${_file} )
|
2014-07-11 02:31:24 +04:00
|
|
|
string( REPLACE ".png" "" _res ${_res} )
|
2017-03-27 12:12:28 +03:00
|
|
|
install( FILES ${_file} RENAME ${APPLICATION_ICON_NAME}.png DESTINATION ${DATADIR}/icons/hicolor/${_res}x${_res}/apps )
|
2014-07-11 02:31:24 +04:00
|
|
|
endforeach( _file )
|
|
|
|
endif(NOT WIN32)
|
|
|
|
|
2015-08-11 16:11:46 +03:00
|
|
|
install(FILES ${client_I18N} DESTINATION ${SHAREDIR}/${APPLICATION_EXECUTABLE}/i18n)
|
2014-07-11 02:31:24 +04:00
|
|
|
|
|
|
|
# we may not add MACOSX_BUNDLE here, if not building one
|
|
|
|
|
|
|
|
# add_executable( ${APPLICATION_EXECUTABLE} main.cpp ${final_src})
|
|
|
|
add_executable( ${APPLICATION_EXECUTABLE} WIN32 main.cpp ${final_src})
|
2014-09-12 13:25:52 +04:00
|
|
|
else()
|
2014-10-22 12:20:38 +04:00
|
|
|
# set(CMAKE_INSTALL_PREFIX ".") # Examples use /Applications. hurmpf.
|
2014-07-11 02:31:24 +04:00
|
|
|
set(MACOSX_BUNDLE_ICON_FILE "ownCloud.icns")
|
|
|
|
|
|
|
|
# we must add MACOSX_BUNDLE only if building a bundle
|
|
|
|
add_executable( ${APPLICATION_EXECUTABLE} WIN32 MACOSX_BUNDLE main.cpp ${final_src})
|
|
|
|
|
|
|
|
set (QM_DIR ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/Translations)
|
2014-11-10 00:30:05 +03:00
|
|
|
install(FILES ${client_I18N} DESTINATION ${QM_DIR})
|
2014-10-22 12:20:38 +04:00
|
|
|
get_target_property(_qmake Qt5::qmake LOCATION)
|
|
|
|
execute_process(COMMAND ${_qmake} -query QT_INSTALL_TRANSLATIONS
|
|
|
|
OUTPUT_VARIABLE QT_TRANSLATIONS_DIR
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
2014-07-11 02:31:24 +04:00
|
|
|
file(GLOB qt_I18N ${QT_TRANSLATIONS_DIR}/qt_??.qm ${QT_TRANSLATIONS_DIR}/qt_??_??.qm)
|
|
|
|
install(FILES ${qt_I18N} DESTINATION ${QM_DIR})
|
2014-10-22 12:20:38 +04:00
|
|
|
file(GLOB qtbase_I18N ${QT_TRANSLATIONS_DIR}/qtbase_??.qm ${QT_TRANSLATIONS_DIR}/qt_??_??.qm)
|
|
|
|
install(FILES ${qtbase_I18N} DESTINATION ${QM_DIR})
|
2014-07-11 02:31:24 +04:00
|
|
|
file(GLOB qtkeychain_I18N ${QT_TRANSLATIONS_DIR}/qtkeychain*.qm)
|
|
|
|
install(FILES ${qtkeychain_I18N} DESTINATION ${QM_DIR})
|
|
|
|
endif()
|
|
|
|
|
2017-12-14 19:54:31 +03:00
|
|
|
add_library(updater STATIC ${updater_SRCS})
|
2017-12-14 17:10:33 +03:00
|
|
|
target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Network Qt5::Xml)
|
2017-12-14 19:54:31 +03:00
|
|
|
target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
2014-07-11 02:31:24 +04:00
|
|
|
|
2014-07-11 14:36:01 +04:00
|
|
|
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
|
|
|
|
)
|
2014-10-22 12:20:38 +04:00
|
|
|
# Only relevant for Linux? On OS X it by default properly checks in the bundle directory next to the exe
|
2014-07-11 14:36:01 +04:00
|
|
|
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
2017-09-22 11:45:40 +03:00
|
|
|
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" )
|
2014-07-11 02:31:24 +04:00
|
|
|
|
2017-12-14 17:10:33 +03:00
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::Widgets Qt5::Network Qt5::Xml)
|
2014-07-11 14:36:01 +04:00
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} )
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} updater )
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${OS_SPECIFIC_LINK_LIBRARIES} )
|
2014-07-11 02:31:24 +04:00
|
|
|
|
2017-12-14 19:54:31 +03:00
|
|
|
target_include_directories(${APPLICATION_EXECUTABLE} PRIVATE
|
|
|
|
${CMAKE_SOURCE_DIR}/src/3rdparty/QProgressIndicator
|
|
|
|
${CMAKE_SOURCE_DIR}/src/3rdparty/qtlockedfile
|
|
|
|
${CMAKE_SOURCE_DIR}/src/3rdparty/qtmacgoodies/src
|
|
|
|
${CMAKE_SOURCE_DIR}/src/3rdparty/qtsingleapplication
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
)
|
|
|
|
|
2017-12-14 17:10:33 +03:00
|
|
|
## handle DBUS for Fdo notifications
|
|
|
|
if( UNIX AND NOT APPLE )
|
|
|
|
find_package(Qt5 COMPONENTS DBus)
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::DBus)
|
|
|
|
target_compile_definitions(${APPLICATION_EXECUTABLE} PRIVATE "USE_FDO_NOTIFICATIONS")
|
|
|
|
endif()
|
|
|
|
|
2018-01-04 22:47:54 +03:00
|
|
|
if (APPLE)
|
|
|
|
find_package(Qt5 COMPONENTS MacExtras)
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::MacExtras)
|
|
|
|
endif()
|
|
|
|
|
2017-12-14 17:10:33 +03:00
|
|
|
if (NOT NO_SHIBBOLETH)
|
|
|
|
find_package(Qt5 COMPONENTS WebKitWidgets)
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::WebKitWidgets)
|
|
|
|
endif()
|
|
|
|
|
2014-08-26 20:07:42 +04:00
|
|
|
if(WITH_CRASHREPORTER)
|
2018-01-14 01:49:58 +03:00
|
|
|
target_link_libraries(${APPLICATION_EXECUTABLE} crashreporter-handler)
|
2014-08-26 20:07:42 +04:00
|
|
|
|
|
|
|
if(UNIX AND NOT MAC)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2017-12-14 17:10:33 +03:00
|
|
|
# application.cpp still uses QDesktopServices::storageLocation
|
|
|
|
target_compile_definitions(${APPLICATION_EXECUTABLE} PRIVATE "QT_DISABLE_DEPRECATED_BEFORE=0")
|
|
|
|
|
|
|
|
|
2014-07-11 14:36:01 +04:00
|
|
|
install(TARGETS ${APPLICATION_EXECUTABLE}
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
2014-10-22 12:20:38 +04:00
|
|
|
BUNDLE DESTINATION "."
|
2014-07-11 02:31:24 +04:00
|
|
|
)
|
|
|
|
|
2014-11-18 18:44:14 +03:00
|
|
|
|
2015-01-20 21:03:56 +03:00
|
|
|
# FIXME: The following lines are dup in src/gui and src/cmd because it needs to be done after both are installed
|
2014-07-11 02:31:24 +04:00
|
|
|
#FIXME: find a nice solution to make the second if(BUILD_OWNCLOUD_OSX_BUNDLE) unnecessary
|
|
|
|
# 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
|
2014-10-22 12:20:38 +04:00
|
|
|
if(BUILD_OWNCLOUD_OSX_BUNDLE AND NOT BUILD_LIBRARIES_ONLY)
|
|
|
|
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
|
|
|
install(CODE "
|
2015-10-05 07:21:19 +03:00
|
|
|
message(STATUS \"Deploying (Qt) dependencies and fixing library paths...\")
|
2014-10-22 12:20:38 +04:00
|
|
|
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE} ${QT_QMAKE_EXECUTABLE})
|
|
|
|
" COMPONENT RUNTIME)
|
2014-07-11 02:31:24 +04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE AND NOT WIN32)
|
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop)
|
2015-05-13 10:43:34 +03:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop DESTINATION ${DATADIR}/applications )
|
2014-07-11 02:31:24 +04:00
|
|
|
endif()
|
|
|
|
|