"Fossies" - the Fresh Open Source Software Archive

Member "ownCloud-2.7.6.3261/src/gui/CMakeLists.txt" (5 Feb 2021, 8376 Bytes) of package /linux/misc/ownCloud-2.7.6.3261.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 2.7.5.3180_vs_2.7.6.3261.

    1 include(ECMAddAppIcon)
    2 
    3 find_package(Qt5 REQUIRED COMPONENTS Widgets)
    4 
    5 add_subdirectory(updater)
    6 
    7 set(client_UI_SRCS
    8     aboutdialog.ui
    9     accountsettings.ui
   10     folderwizardsourcepage.ui
   11     folderwizardtargetpage.ui
   12     generalsettings.ui
   13     ignorelisteditor.ui
   14     networksettings.ui
   15     protocolwidget.ui
   16     issueswidget.ui
   17     activitywidget.ui
   18     settingsdialog.ui
   19     sharedialog.ui
   20     sharelinkwidget.ui
   21     shareusergroupwidget.ui
   22     shareuserline.ui
   23     sslerrordialog.ui
   24     addcertificatedialog.ui
   25     proxyauthdialog.ui
   26     notificationwidget.ui
   27     logbrowser.ui
   28     wizard/owncloudadvancedsetuppage.ui
   29     wizard/owncloudconnectionmethoddialog.ui
   30     wizard/owncloudhttpcredspage.ui
   31     wizard/owncloudoauthcredspage.ui
   32     wizard/owncloudsetupnocredspage.ui
   33     wizard/owncloudwizardresultpage.ui
   34 )
   35 
   36 set(client_SRCS
   37     aboutdialog.cpp
   38     accountmanager.cpp
   39     accountsettings.cpp
   40     application.cpp
   41     clientproxy.cpp
   42     connectionvalidator.cpp
   43     folder.cpp
   44     folderman.cpp
   45     folderstatusmodel.cpp
   46     folderstatusdelegate.cpp
   47     folderwatcher.cpp
   48     folderwizard.cpp
   49     generalsettings.cpp
   50     ignorelisteditor.cpp
   51     lockwatcher.cpp
   52     logbrowser.cpp
   53     networksettings.cpp
   54     ocsjob.cpp
   55     ocssharejob.cpp
   56     ocsshareejob.cpp
   57     openfilemanager.cpp
   58     owncloudgui.cpp
   59     owncloudsetupwizard.cpp
   60     protocolwidget.cpp
   61     issueswidget.cpp
   62     activitydata.cpp
   63     activitylistmodel.cpp
   64     activitywidget.cpp
   65     activityitemdelegate.cpp
   66     selectivesyncdialog.cpp
   67     settingsdialog.cpp
   68     sharedialog.cpp
   69     sharelinkwidget.cpp
   70     sharemanager.cpp
   71     shareusergroupwidget.cpp
   72     sharee.cpp
   73     socketapi.cpp
   74     sslbutton.cpp
   75     sslerrordialog.cpp
   76     syncrunfilelog.cpp
   77     systray.cpp
   78     thumbnailjob.cpp
   79     quotainfo.cpp
   80     accountstate.cpp
   81     addcertificatedialog.cpp
   82     authenticationdialog.cpp
   83     proxyauthhandler.cpp
   84     proxyauthdialog.cpp
   85     tooltipupdater.cpp
   86     notificationwidget.cpp
   87     notificationconfirmjob.cpp
   88     servernotificationhandler.cpp
   89     guiutility.cpp
   90     elidedlabel.cpp
   91     creds/httpcredentialsgui.cpp
   92     wizard/postfixlineedit.cpp
   93     wizard/abstractcredswizardpage.cpp
   94     wizard/owncloudadvancedsetuppage.cpp
   95     wizard/owncloudconnectionmethoddialog.cpp
   96     wizard/owncloudhttpcredspage.cpp
   97     wizard/owncloudoauthcredspage.cpp
   98     wizard/owncloudsetuppage.cpp
   99     wizard/owncloudwizardcommon.cpp
  100     wizard/owncloudwizard.cpp
  101     wizard/owncloudwizardresultpage.cpp
  102 )
  103 
  104 set(3rdparty_SRC
  105     ../3rdparty/QProgressIndicator/QProgressIndicator.cpp
  106     ../3rdparty/qtlockedfile/qtlockedfile.cpp
  107     ../3rdparty/qtsingleapplication/qtlocalpeer.cpp
  108     ../3rdparty/qtsingleapplication/qtsingleapplication.cpp
  109     ../3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp
  110    )
  111 
  112 if(NOT WIN32)
  113    list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_unix.cpp)
  114 else()
  115    list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_win.cpp )
  116 endif()
  117 
  118 set( final_src
  119     ${MIRALL_RC_SRC}
  120     ${client_SRCS}
  121     ${client_UI_SRCS}
  122     ${3rdparty_SRC}
  123 )
  124 
  125 if(TARGET qt5keychain)
  126     list(APPEND libsync_LINK_TARGETS qt5keychain)
  127 endif()
  128 
  129 add_library(owncloudCore STATIC ${final_src})
  130 set_target_properties(owncloudCore PROPERTIES AUTOUIC ON AUTORCC ON)
  131 target_link_libraries(owncloudCore PUBLIC Qt5::Widgets Qt5::Network Qt5::Xml
  132                                           ${synclib_NAME})
  133 
  134 target_include_directories(owncloudCore PUBLIC
  135     ${CMAKE_SOURCE_DIR}/src/3rdparty/QProgressIndicator
  136     ${CMAKE_SOURCE_DIR}/src/3rdparty/qtlockedfile
  137     ${CMAKE_SOURCE_DIR}/src/3rdparty/qtsingleapplication
  138     ${CMAKE_CURRENT_BINARY_DIR}
  139 )
  140 
  141 
  142 target_sources(owncloudCore PRIVATE
  143     updater/ocupdater.cpp
  144     updater/updateinfo.cpp
  145     updater/updater.cpp
  146 )
  147 
  148 IF( APPLE )
  149     find_package(Qt5 COMPONENTS MacExtras)
  150     target_link_libraries(owncloudCore PUBLIC Qt5::MacExtras)
  151 
  152     target_sources(owncloudCore PRIVATE
  153             cocoainitializer_mac.mm
  154             socketapisocket_mac.mm
  155             systray.mm
  156             settingsdialog_mac.mm
  157 
  158             folderwatcher_mac.cpp)
  159 
  160     if(SPARKLE_FOUND)
  161         # Define this, we need to check in updater.cpp
  162         target_compile_definitions(owncloudCore PUBLIC HAVE_SPARKLE)
  163         target_sources(owncloudCore PRIVATE
  164             updater/sparkleupdater_mac.mm
  165             updater/sparkleupdater.h)
  166         target_link_libraries(owncloudCore PRIVATE ${SPARKLE_LIBRARY})
  167    endif()
  168 elseif( WIN32 )
  169     target_sources(owncloudCore PRIVATE
  170             folderwatcher_win.cpp
  171             navigationpanehelper.cpp)
  172 elseif(UNIX AND NOT APPLE )
  173     ## handle DBUS for Fdo notifications
  174     find_package(Qt5 COMPONENTS DBus)
  175     if (TARGET Qt5::DBus)
  176         target_link_libraries(owncloudCore PUBLIC Qt5::DBus)
  177         target_compile_definitions(owncloudCore PUBLIC "USE_FDO_NOTIFICATIONS")
  178     endif()
  179     target_sources(owncloudCore PRIVATE folderwatcher_linux.cpp)
  180 endif()
  181 
  182 
  183 if(WITH_CRASHREPORTER)
  184     target_link_libraries(owncloudCore PUBLIC crashreporter-handler)
  185 
  186     if(UNIX AND NOT MAC)
  187         find_package(Threads REQUIRED)
  188         target_link_libraries(owncloudCore PUBLIC ${CMAKE_THREAD_LIBS_INIT})
  189     endif()
  190 endif()
  191 
  192 add_executable(${APPLICATION_EXECUTABLE} main.cpp)
  193 set_target_properties(${APPLICATION_EXECUTABLE} PROPERTIES AUTOUIC ON AUTORCC ON)
  194 target_link_libraries( ${APPLICATION_EXECUTABLE} owncloudCore )
  195 
  196 
  197 find_package(Qt5LinguistTools)
  198 if(Qt5LinguistTools_FOUND)
  199     qt5_add_translation(client_I18N ${TRANSLATIONS})
  200     target_sources(${APPLICATION_EXECUTABLE} PRIVATE ${client_I18N})
  201 endif()
  202 
  203 #TODO Move resources files
  204 target_sources(${APPLICATION_EXECUTABLE} PRIVATE
  205     ${PROJECT_SOURCE_DIR}/client.qrc
  206     ${PROJECT_SOURCE_DIR}/core_theme.qrc)
  207 
  208 generate_theme(${APPLICATION_EXECUTABLE} OWNCLOUD_SIDEBAR_ICONS)
  209 MESSAGE(STATUS "OWNCLOUD_SIDEBAR_ICONS: ${APPLICATION_ICON_NAME}: ${OWNCLOUD_SIDEBAR_ICONS}")
  210 
  211 ecm_add_app_icon(appIcons ICONS "${OWNCLOUD_ICONS}" SIDEBAR_ICONS "${OWNCLOUD_SIDEBAR_ICONS}" OUTFILE_BASENAME "${APPLICATION_ICON_NAME}")
  212 target_sources(${APPLICATION_EXECUTABLE} PRIVATE ${appIcons})
  213 
  214 if(NOT APPLE)
  215     if(WIN32)
  216         configure_file(
  217           ${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in
  218           ${CMAKE_CURRENT_BINARY_DIR}/version.rc
  219           @ONLY)
  220         target_sources(${APPLICATION_EXECUTABLE} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
  221         if(NOT MSVC)
  222             target_sources(${APPLICATION_EXECUTABLE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/manifest-mingw.rc)
  223         endif()
  224     else()
  225         file(GLOB _icons "${OEM_THEME_DIR}/theme/colored/*-${APPLICATION_ICON_NAME}-icon.png")
  226         foreach(_file ${_icons})
  227             string(REPLACE "${OEM_THEME_DIR}/theme/colored/" "" _res ${_file})
  228             string(REPLACE "-${APPLICATION_ICON_NAME}-icon.png" "" _res ${_res})
  229             install(FILES ${_file} RENAME ${APPLICATION_ICON_NAME}.png DESTINATION ${DATADIR}/icons/hicolor/${_res}x${_res}/apps)
  230         endforeach(_file)
  231     endif()
  232 
  233     install(FILES ${client_I18N} DESTINATION ${SHAREDIR}/${APPLICATION_EXECUTABLE}/i18n)
  234 
  235     # we may not add MACOSX_BUNDLE here, if not building one
  236 else()
  237     target_sources(${APPLICATION_EXECUTABLE} PRIVATE ${OWNCLOUD_BUNDLED_RESOURCES})
  238 
  239     set_source_files_properties(
  240       ${client_I18N}
  241       PROPERTIES
  242       MACOSX_PACKAGE_LOCATION Resources/Translations
  243       )
  244 
  245     set_source_files_properties(
  246       ${OWNCLOUD_BUNDLED_RESOURCES}
  247       PROPERTIES
  248       MACOSX_PACKAGE_LOCATION Resources
  249       )
  250 
  251   set_target_properties(${APPLICATION_EXECUTABLE} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist)
  252 endif()
  253 
  254 install(TARGETS ${APPLICATION_EXECUTABLE} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
  255 
  256 if(UNIX AND NOT APPLE)
  257     include(libcloudproviders/libcloudproviders.cmake)
  258 
  259     configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
  260                    ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop)
  261     install(FILES  ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop DESTINATION ${DATADIR}/applications )
  262 
  263     configure_file(owncloud.xml.in ${APPLICATION_EXECUTABLE}.xml)
  264     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.xml DESTINATION ${DATADIR}/mime/packages )
  265 
  266     find_package(SharedMimeInfo)
  267     if(SharedMimeInfo_FOUND)
  268         update_xdg_mimetypes( ${DATADIR}/mime/packages )
  269     endif(SharedMimeInfo_FOUND)
  270 endif()