Skip to content

Commit

Permalink
add headers in cmake files to get them properly detected
Browse files Browse the repository at this point in the history
qt creator for example requires that headers are explcitly given in the
source lists

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Feb 11, 2022
1 parent 9c266d2 commit 4371c0c
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 5 deletions.
4 changes: 3 additions & 1 deletion shell_integration/dolphin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
10 changes: 8 additions & 2 deletions src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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")

Expand Down
4 changes: 4 additions & 0 deletions src/csync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
103 changes: 103 additions & 0 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
)

Expand Down
2 changes: 2 additions & 0 deletions src/gui/socketapi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)

Expand Down
Loading

0 comments on commit 4371c0c

Please sign in to comment.