From 4371c0cbfed37fa319822e8433be61fd9ce4aa72 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 7 Feb 2022 13:48:52 +0100 Subject: [PATCH] add headers in cmake files to get them properly detected qt creator for example requires that headers are explcitly given in the source lists Signed-off-by: Matthieu Gallien --- shell_integration/dolphin/CMakeLists.txt | 4 +- src/cmd/CMakeLists.txt | 10 ++- src/csync/CMakeLists.txt | 4 + src/gui/CMakeLists.txt | 103 +++++++++++++++++++++++ src/gui/socketapi/CMakeLists.txt | 2 + src/libsync/CMakeLists.txt | 62 +++++++++++++- src/libsync/vfs/cfapi/CMakeLists.txt | 3 + src/libsync/vfs/suffix/CMakeLists.txt | 1 + src/libsync/vfs/xattr/CMakeLists.txt | 2 + 9 files changed, 186 insertions(+), 5 deletions(-) diff --git a/shell_integration/dolphin/CMakeLists.txt b/shell_integration/dolphin/CMakeLists.txt index 60a38e389..76b6f6ea9 100644 --- a/shell_integration/dolphin/CMakeLists.txt +++ b/shell_integration/dolphin/CMakeLists.txt @@ -26,7 +26,9 @@ add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) #---HELPER--- set(OWNCLOUDDOLPHINHELPER ${APPLICATION_EXECUTABLE}dolphinpluginhelper) -add_library(${OWNCLOUDDOLPHINHELPER} SHARED ownclouddolphinpluginhelper.cpp) +add_library(${OWNCLOUDDOLPHINHELPER} SHARED + ownclouddolphinpluginhelper.h + ownclouddolphinpluginhelper.cpp) target_link_libraries(${OWNCLOUDDOLPHINHELPER} Qt5::Network) generate_export_header(${OWNCLOUDDOLPHINHELPER} BASE_NAME ownclouddolphinpluginhelper) install(TARGETS ${OWNCLOUDDOLPHINHELPER} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt index 118ca3cb4..8ddebfdce 100644 --- a/src/cmd/CMakeLists.txt +++ b/src/cmd/CMakeLists.txt @@ -1,7 +1,11 @@ project(cmd) set(CMAKE_AUTOMOC TRUE) -add_library(cmdCore STATIC simplesslerrorhandler.cpp netrcparser.cpp) +add_library(cmdCore STATIC + simplesslerrorhandler.h + simplesslerrorhandler.cpp + netrcparser.h + netrcparser.cpp) target_link_libraries(cmdCore PUBLIC @@ -24,7 +28,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") endif() if(NOT BUILD_LIBRARIES_ONLY) - add_executable(nextcloudcmd cmd.cpp) + add_executable(nextcloudcmd + cmd.h + cmd.cpp) set_target_properties(nextcloudcmd PROPERTIES RUNTIME_OUTPUT_NAME "${APPLICATION_EXECUTABLE}cmd") diff --git a/src/csync/CMakeLists.txt b/src/csync/CMakeLists.txt index ec655df67..5bdd5e5bf 100644 --- a/src/csync/CMakeLists.txt +++ b/src/csync/CMakeLists.txt @@ -39,11 +39,15 @@ if(NO_RENAME_EXTENSION) endif() set(csync_SRCS + csync.h csync.cpp + csync_exclude.h csync_exclude.cpp + std/c_time.h std/c_time.cpp + vio/csync_vio_local.h ) if (WIN32) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 0834d25c8..6b3cf688e 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -64,110 +64,206 @@ else() endif() set(client_SRCS + accountmanager.h accountmanager.cpp + accountsettings.h accountsettings.cpp + application.h application.cpp + invalidfilenamedialog.h invalidfilenamedialog.cpp + conflictdialog.h conflictdialog.cpp + conflictsolver.h conflictsolver.cpp + connectionvalidator.h connectionvalidator.cpp + folder.h folder.cpp + foldercreationdialog.h foldercreationdialog.cpp + folderman.h folderman.cpp + folderstatusmodel.h folderstatusmodel.cpp + folderstatusdelegate.h folderstatusdelegate.cpp + folderstatusview.h folderstatusview.cpp + folderwatcher.h folderwatcher.cpp + folderwizard.h folderwizard.cpp + generalsettings.h generalsettings.cpp + legalnotice.h legalnotice.cpp + internallinkwidget.h internallinkwidget.cpp + ignorelisteditor.h ignorelisteditor.cpp + ignorelisttablewidget.h ignorelisttablewidget.cpp + lockwatcher.h lockwatcher.cpp + logbrowser.h logbrowser.cpp + navigationpanehelper.h navigationpanehelper.cpp + networksettings.h networksettings.cpp + ocsnavigationappsjob.h ocsnavigationappsjob.cpp + ocsjob.h ocsjob.cpp + ocssharejob.h ocssharejob.cpp + ocsshareejob.h ocsshareejob.cpp + openfilemanager.h openfilemanager.cpp + owncloudgui.h owncloudgui.cpp + owncloudsetupwizard.h owncloudsetupwizard.cpp + passwordinputdialog.h passwordinputdialog.cpp + selectivesyncdialog.h selectivesyncdialog.cpp + settingsdialog.h settingsdialog.cpp + sharedialog.h sharedialog.cpp + sharelinkwidget.h sharelinkwidget.cpp + sharemanager.h sharemanager.cpp + shareusergroupwidget.h shareusergroupwidget.cpp + profilepagewidget.h profilepagewidget.cpp + sharee.h sharee.cpp + sslbutton.h sslbutton.cpp + sslerrordialog.h sslerrordialog.cpp + syncrunfilelog.h syncrunfilelog.cpp + systray.h systray.cpp + thumbnailjob.h thumbnailjob.cpp + userinfo.h userinfo.cpp + accountstate.h accountstate.cpp + addcertificatedialog.h addcertificatedialog.cpp + authenticationdialog.h authenticationdialog.cpp + proxyauthhandler.h proxyauthhandler.cpp + proxyauthdialog.h proxyauthdialog.cpp + tooltipupdater.h tooltipupdater.cpp + notificationconfirmjob.h notificationconfirmjob.cpp + guiutility.h guiutility.cpp + elidedlabel.h elidedlabel.cpp + headerbanner.h headerbanner.cpp + iconutils.h iconutils.cpp + remotewipe.h remotewipe.cpp + userstatusselectormodel.h userstatusselectormodel.cpp + emojimodel.h emojimodel.cpp + fileactivitylistmodel.h fileactivitylistmodel.cpp + tray/svgimageprovider.h tray/svgimageprovider.cpp + tray/syncstatussummary.h tray/syncstatussummary.cpp + tray/activitydata.h tray/activitydata.cpp + tray/activitylistmodel.h tray/activitylistmodel.cpp + tray/unifiedsearchresult.h tray/unifiedsearchresult.cpp + tray/unifiedsearchresultimageprovider.h tray/unifiedsearchresultimageprovider.cpp + tray/unifiedsearchresultslistmodel.h tray/unifiedsearchresultslistmodel.cpp + tray/usermodel.h tray/usermodel.cpp + tray/notificationhandler.h tray/notificationhandler.cpp + tray/notificationcache.h tray/notificationcache.cpp + creds/credentialsfactory.h creds/credentialsfactory.cpp + creds/httpcredentialsgui.h creds/httpcredentialsgui.cpp + creds/oauth.h creds/oauth.cpp + creds/flow2auth.h creds/flow2auth.cpp + creds/webflowcredentials.h creds/webflowcredentials.cpp + creds/webflowcredentialsdialog.h creds/webflowcredentialsdialog.cpp + wizard/postfixlineedit.h wizard/postfixlineedit.cpp + wizard/abstractcredswizardpage.h wizard/abstractcredswizardpage.cpp + wizard/owncloudadvancedsetuppage.h wizard/owncloudadvancedsetuppage.cpp + wizard/owncloudconnectionmethoddialog.h wizard/owncloudconnectionmethoddialog.cpp + wizard/owncloudhttpcredspage.h wizard/owncloudhttpcredspage.cpp + wizard/owncloudoauthcredspage.h wizard/owncloudoauthcredspage.cpp + wizard/flow2authcredspage.h wizard/flow2authcredspage.cpp + wizard/flow2authwidget.h wizard/flow2authwidget.cpp + wizard/owncloudsetuppage.h wizard/owncloudsetuppage.cpp + wizard/owncloudwizardcommon.h wizard/owncloudwizardcommon.cpp + wizard/owncloudwizard.h wizard/owncloudwizard.cpp + wizard/slideshow.h wizard/slideshow.cpp + wizard/welcomepage.h wizard/welcomepage.cpp + wizard/linklabel.h wizard/linklabel.cpp ) if (Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) list(APPEND client_SRCS + wizard/webviewpage.h wizard/webviewpage.cpp + wizard/webview.h wizard/webview.cpp ) endif() IF(BUILD_UPDATER) set(updater_SRCS + updater/ocupdater.h updater/ocupdater.cpp + updater/updateinfo.h updater/updateinfo.cpp + updater/updater.h updater/updater.cpp ) endif() @@ -201,12 +297,19 @@ list(APPEND client_SRCS folderwatcher_mac.cpp) ENDIF() set(3rdparty_SRC + ../3rdparty/QProgressIndicator/QProgressIndicator.h ../3rdparty/QProgressIndicator/QProgressIndicator.cpp + ../3rdparty/qtlockedfile/qtlockedfile.h ../3rdparty/qtlockedfile/qtlockedfile.cpp + ../3rdparty/qtsingleapplication/qtlocalpeer.h ../3rdparty/qtsingleapplication/qtlocalpeer.cpp + ../3rdparty/qtsingleapplication/qtsingleapplication.h ../3rdparty/qtsingleapplication/qtsingleapplication.cpp + ../3rdparty/qtsingleapplication/qtsinglecoreapplication.h ../3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp + ../3rdparty/kmessagewidget/kmessagewidget.h ../3rdparty/kmessagewidget/kmessagewidget.cpp + ../3rdparty/kirigami/wheelhandler.h ../3rdparty/kirigami/wheelhandler.cpp ) diff --git a/src/gui/socketapi/CMakeLists.txt b/src/gui/socketapi/CMakeLists.txt index 9290269ee..a84933d90 100644 --- a/src/gui/socketapi/CMakeLists.txt +++ b/src/gui/socketapi/CMakeLists.txt @@ -1,5 +1,7 @@ target_sources(nextcloudCore PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/socketapi.h ${CMAKE_CURRENT_SOURCE_DIR}/socketapi.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/socketuploadjob.h ${CMAKE_CURRENT_SOURCE_DIR}/socketuploadjob.cpp ) diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt index 6618f28e5..0ee2016bb 100644 --- a/src/libsync/CMakeLists.txt +++ b/src/libsync/CMakeLists.txt @@ -12,59 +12,111 @@ if ( APPLE ) endif() set(libsync_SRCS + account.h account.cpp + pushnotifications.h pushnotifications.cpp + wordlist.h wordlist.cpp + bandwidthmanager.h bandwidthmanager.cpp + capabilities.h capabilities.cpp + clientproxy.h clientproxy.cpp + cookiejar.h cookiejar.cpp + discovery.h discovery.cpp + discoveryphase.h discoveryphase.cpp + encryptfolderjob.h encryptfolderjob.cpp + filesystem.h filesystem.cpp + httplogger.h httplogger.cpp + logger.h logger.cpp + accessmanager.h accessmanager.cpp + configfile.h configfile.cpp + abstractnetworkjob.h abstractnetworkjob.cpp + networkjobs.h networkjobs.cpp + iconjob.h iconjob.cpp + owncloudpropagator.h owncloudpropagator.cpp + nextcloudtheme.h nextcloudtheme.cpp + abstractpropagateremotedeleteencrypted.h abstractpropagateremotedeleteencrypted.cpp + deletejob.h deletejob.cpp + progressdispatcher.h progressdispatcher.cpp + propagatorjobs.h propagatorjobs.cpp + propagatedownload.h propagatedownload.cpp + propagateupload.h propagateupload.cpp propagateuploadv1.cpp propagateuploadng.cpp + bulkpropagatorjob.h bulkpropagatorjob.cpp + putmultifilejob.h putmultifilejob.cpp + propagateremotedelete.h propagateremotedelete.cpp + propagateremotedeleteencrypted.h propagateremotedeleteencrypted.cpp + propagateremotedeleteencryptedrootfolder.h propagateremotedeleteencryptedrootfolder.cpp + propagateremotemove.h propagateremotemove.cpp + propagateremotemkdir.h propagateremotemkdir.cpp + propagateuploadencrypted.h propagateuploadencrypted.cpp + propagatedownloadencrypted.h propagatedownloadencrypted.cpp + syncengine.h syncengine.cpp + syncfileitem.h syncfileitem.cpp + syncfilestatustracker.h syncfilestatustracker.cpp + localdiscoverytracker.h localdiscoverytracker.cpp + syncresult.h syncresult.cpp + syncoptions.h syncoptions.cpp + theme.h theme.cpp + clientsideencryption.h clientsideencryption.cpp + clientsideencryptionjobs.h clientsideencryptionjobs.cpp + datetimeprovider.h datetimeprovider.cpp + ocsuserstatusconnector.h ocsuserstatusconnector.cpp + userstatusconnector.h userstatusconnector.cpp + ocsprofileconnector.h ocsprofileconnector.cpp + creds/dummycredentials.h creds/dummycredentials.cpp + creds/abstractcredentials.h creds/abstractcredentials.cpp + creds/credentialscommon.h creds/credentialscommon.cpp + creds/keychainchunk.h creds/keychainchunk.cpp ) @@ -74,9 +126,15 @@ if (WIN32) endif() if(TOKEN_AUTH_ONLY) - set (libsync_SRCS ${libsync_SRCS} creds/tokencredentials.cpp) + set (libsync_SRCS + ${libsync_SRCS} + creds/tokencredentials.h + creds/tokencredentials.cpp) else() - set (libsync_SRCS ${libsync_SRCS} creds/httpcredentials.cpp) + set (libsync_SRCS + ${libsync_SRCS} + creds/httpcredentials.h + creds/httpcredentials.cpp) endif() # These headers are installed for libowncloudsync to be used by 3rd party apps diff --git a/src/libsync/vfs/cfapi/CMakeLists.txt b/src/libsync/vfs/cfapi/CMakeLists.txt index a6ac662d3..f882087d8 100644 --- a/src/libsync/vfs/cfapi/CMakeLists.txt +++ b/src/libsync/vfs/cfapi/CMakeLists.txt @@ -2,8 +2,11 @@ if (WIN32) add_definitions(-D_WIN32_WINNT=_WIN32_WINNT_WIN10) add_library(nextcloudsync_vfs_cfapi SHARED + cfapiwrapper.h cfapiwrapper.cpp + hydrationjob.h hydrationjob.cpp + vfs_cfapi.h vfs_cfapi.cpp ) diff --git a/src/libsync/vfs/suffix/CMakeLists.txt b/src/libsync/vfs/suffix/CMakeLists.txt index bb326c4ad..2ded256ea 100644 --- a/src/libsync/vfs/suffix/CMakeLists.txt +++ b/src/libsync/vfs/suffix/CMakeLists.txt @@ -1,4 +1,5 @@ add_library(nextcloudsync_vfs_suffix SHARED + vfs_suffix.h vfs_suffix.cpp ) diff --git a/src/libsync/vfs/xattr/CMakeLists.txt b/src/libsync/vfs/xattr/CMakeLists.txt index 877d2635a..792e85acb 100644 --- a/src/libsync/vfs/xattr/CMakeLists.txt +++ b/src/libsync/vfs/xattr/CMakeLists.txt @@ -1,6 +1,8 @@ if (LINUX) set(vfs_xattr_SRCS + vfs_xattr.h vfs_xattr.cpp + xattrwrapper.h xattrwrapper_linux.cpp )