CMake: add headers to targets

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
Rolf Eike Beer 2019-03-25 22:47:44 +01:00 committed by Dirk Hohndel
parent 8526fea973
commit 7635ee3e77
5 changed files with 246 additions and 78 deletions

View file

@ -23,104 +23,183 @@ endif()
if(BTSUPPORT) if(BTSUPPORT)
add_definitions(-DBT_SUPPORT) add_definitions(-DBT_SUPPORT)
set(BT_SRC_FILES desktop-widgets/btdeviceselectiondialog.cpp) set(BT_SRC_FILES desktop-widgets/btdeviceselectiondialog.cpp)
set(BT_CORE_SRC_FILES qtserialbluetooth.cpp btdiscovery.cpp) set(BT_CORE_SRC_FILES
btdiscovery.cpp
btdiscovery.h
qtserialbluetooth.cpp
)
endif() endif()
if(BLESUPPORT) if(BLESUPPORT)
add_definitions(-DBLE_SUPPORT) add_definitions(-DBLE_SUPPORT)
set(BT_CORE_SRC_FILES ${BT_CORE_SRC_FILES} qt-ble.cpp) list(APPEND BT_CORE_SRC_FILES qt-ble.cpp qt-ble.h)
endif() endif()
# compile the core library part in C, part in C++ # compile the core library part in C, part in C++
set(SUBSURFACE_CORE_LIB_SRCS set(SUBSURFACE_CORE_LIB_SRCS
checkcloudconnection.cpp checkcloudconnection.cpp
checkcloudconnection.h
cloudstorage.cpp cloudstorage.cpp
cloudstorage.h
cochran.c cochran.c
cochran.h
color.cpp color.cpp
color.h
configuredivecomputer.cpp configuredivecomputer.cpp
configuredivecomputer.h
configuredivecomputerthreads.cpp configuredivecomputerthreads.cpp
configuredivecomputerthreads.h
connectionlistmodel.cpp connectionlistmodel.cpp
connectionlistmodel.h
datatrak.c datatrak.c
datatrak.h
deco.c deco.c
deco.h
device.c device.c
device.h
devicedetails.cpp devicedetails.cpp
devicedetails.h
display.h
dive.c dive.c
dive.h
divecomputer.cpp divecomputer.cpp
divelogexportlogic.cpp divecomputer.h
divesite.c
divesitehelpers.cpp
divesite-helper.cpp
divelist.c divelist.c
divelist.h
divelogexportlogic.cpp
divelogexportlogic.h
divesite-helper.cpp
divesite.c
divesite.h
divesitehelpers.cpp
divesitehelpers.h
downloadfromdcthread.cpp downloadfromdcthread.cpp
downloadfromdcthread.h
equipment.c equipment.c
errorhelper.c errorhelper.c
exif.cpp exif.cpp
exif.h
file.c file.c
file.h
format.cpp format.cpp
gaspressures.c format.h
gas-model.c gas-model.c
gaspressures.c
gaspressures.h
gettext.h
gettextfromc.cpp gettextfromc.cpp
gettextfromc.h
git-access.c git-access.c
git-access.h
gpslocation.cpp gpslocation.cpp
gpslocation.h
imagedownloader.cpp imagedownloader.cpp
imagedownloader.h
import-cobalt.c
import-csv.c
import-csv.h
import-divinglog.c
import-shearwater.c
import-suunto.c
libdivecomputer.c libdivecomputer.c
libdivecomputer.h
liquivision.c liquivision.c
load-git.c load-git.c
membuffer.c membuffer.c
membuffer.h
metadata.cpp metadata.cpp
xmp_parser.cpp metadata.h
metrics.cpp metrics.cpp
metrics.h
ostctools.c ostctools.c
parse-xml.c parse-xml.c
parse.c parse.c
import-suunto.c parse.h
import-shearwater.c
import-cobalt.c
import-divinglog.c
import-csv.c
planner.c planner.c
planner.h
plannernotes.c plannernotes.c
pref.h
profile.c profile.c
qthelper.cpp profile.h
qt-gui.h
qt-init.cpp qt-init.cpp
qthelper.cpp
qthelper.h
save-git.c save-git.c
save-xml.c
save-html.c save-html.c
save-html.h
save-xml.c
sha1.c sha1.c
sha1.h
ssrf.h
statistics.c statistics.c
statistics.h
strndup.h
strtod.c strtod.c
subsurface-string.h
subsurfacestartup.c subsurfacestartup.c
subsurfacestartup.h
subsurfacesysinfo.cpp subsurfacesysinfo.cpp
subsurfacesysinfo.h
taxonomy.c taxonomy.c
taxonomy.h
time.c time.c
uemis.c
uemis-downloader.c uemis-downloader.c
uemis.c
uemis.h
units.h
version.c version.c
version.h
videoframeextractor.cpp videoframeextractor.cpp
videoframeextractor.h
webservice.h
windowtitleupdate.cpp windowtitleupdate.cpp
windowtitleupdate.h
worldmap-options.h
worldmap-save.c worldmap-save.c
worldmap-save.h
xmp_parser.cpp
xmp_parser.h
# classes to manage struct preferences for QWidget and QML # classes to manage struct preferences for QWidget and QML
settings/qPref.cpp settings/qPref.cpp
settings/qPref.h
settings/qPrefCloudStorage.cpp settings/qPrefCloudStorage.cpp
settings/qPrefCloudStorage.h
settings/qPrefDisplay.cpp settings/qPrefDisplay.cpp
settings/qPrefDisplay.h
settings/qPrefDiveComputer.cpp settings/qPrefDiveComputer.cpp
settings/qPrefDiveComputer.h
settings/qPrefDivePlanner.cpp settings/qPrefDivePlanner.cpp
settings/qPrefDivePlanner.h
settings/qPrefGeneral.cpp settings/qPrefGeneral.cpp
settings/qPrefGeneral.h
settings/qPrefGeocoding.cpp settings/qPrefGeocoding.cpp
settings/qPrefGeocoding.h
settings/qPrefLanguage.cpp settings/qPrefLanguage.cpp
settings/qPrefLanguage.h
settings/qPrefLocationService.cpp settings/qPrefLocationService.cpp
settings/qPrefLocationService.h
settings/qPrefPartialPressureGas.cpp settings/qPrefPartialPressureGas.cpp
settings/qPrefPartialPressureGas.h
settings/qPrefPrivate.cpp settings/qPrefPrivate.cpp
settings/qPrefPrivate.h
settings/qPrefProxy.cpp settings/qPrefProxy.cpp
settings/qPrefProxy.h
settings/qPrefTechnicalDetails.cpp settings/qPrefTechnicalDetails.cpp
settings/qPrefTechnicalDetails.h
settings/qPrefUnit.cpp settings/qPrefUnit.cpp
settings/qPrefUnit.h
settings/qPrefUpdateManager.cpp settings/qPrefUpdateManager.cpp
settings/qPrefUpdateManager.h
#Subsurface Qt have the Subsurface structs QObjectified for easy access via QML. #Subsurface Qt have the Subsurface structs QObjectified for easy access via QML.
subsurface-qt/DiveObjectHelper.cpp
subsurface-qt/CylinderObjectHelper.cpp subsurface-qt/CylinderObjectHelper.cpp
subsurface-qt/CylinderObjectHelper.h
subsurface-qt/DiveListNotifier.cpp subsurface-qt/DiveListNotifier.cpp
subsurface-qt/DiveListNotifier.h
subsurface-qt/DiveObjectHelper.cpp
subsurface-qt/DiveObjectHelper.h
${SERIAL_FTDI} ${SERIAL_FTDI}
${PLATFORM_SRC} ${PLATFORM_SRC}
@ -130,4 +209,3 @@ source_group("Subsurface Core" FILES ${SUBSURFACE_CORE_LIB_SRCS})
add_library(subsurface_corelib STATIC ${SUBSURFACE_CORE_LIB_SRCS} ) add_library(subsurface_corelib STATIC ${SUBSURFACE_CORE_LIB_SRCS} )
target_link_libraries(subsurface_corelib ${QT_LIBRARIES}) target_link_libraries(subsurface_corelib ${QT_LIBRARIES})

View file

@ -52,64 +52,107 @@ set (SUBSURFACE_UI
# the interface, in C++ # the interface, in C++
set(SUBSURFACE_INTERFACE set(SUBSURFACE_INTERFACE
updatemanager.cpp
about.cpp
divecomputermanagementdialog.cpp
divelistview.cpp
diveplanner.cpp
diveshareexportdialog.cpp
downloadfromdivecomputer.cpp
findmovedimagesdialog.cpp
kmessagewidget.cpp
mainwindow.cpp
mapwidget.cpp
../map-widget/qmlmapwidgethelper.cpp ../map-widget/qmlmapwidgethelper.cpp
modeldelegates.cpp about.cpp
notificationwidget.cpp about.h
simplewidgets.cpp
starwidget.cpp
subsurfacewebservices.cpp
tableview.cpp
divelogimportdialog.cpp
tagwidget.cpp
groupedlineedit.cpp
divelogexportdialog.cpp
divepicturewidget.cpp
usersurvey.cpp
configuredivecomputerdialog.cpp
command.cpp command.cpp
command.h
command_base.cpp command_base.cpp
command_base.h
command_divelist.cpp command_divelist.cpp
locationinformation.cpp command_divelist.h
qtwaitingspinner.cpp configuredivecomputerdialog.cpp
configuredivecomputerdialog.h
divecomputermanagementdialog.cpp
divecomputermanagementdialog.h
divelistview.cpp
divelistview.h
divelogexportdialog.cpp
divelogexportdialog.h
divelogimportdialog.cpp
divelogimportdialog.h
divepicturewidget.cpp
divepicturewidget.h
diveplanner.cpp
diveplanner.h
diveshareexportdialog.cpp
diveshareexportdialog.h
downloadfromdivecomputer.cpp
downloadfromdivecomputer.h
filterwidget2.cpp filterwidget2.cpp
tab-widgets/TabDiveStatistics.cpp filterwidget2.h
tab-widgets/TabDiveInformation.cpp findmovedimagesdialog.cpp
tab-widgets/TabDivePhotos.cpp findmovedimagesdialog.h
tab-widgets/TabDiveExtraInfo.cpp groupedlineedit.cpp
tab-widgets/maintab.cpp groupedlineedit.h
kmessagewidget.cpp
kmessagewidget.h
locationinformation.cpp
locationinformation.h
mainwindow.cpp
mainwindow.h
mapwidget.cpp
mapwidget.h
modeldelegates.cpp
modeldelegates.h
notificationwidget.cpp
notificationwidget.h
qtwaitingspinner.cpp
qtwaitingspinner.h
simplewidgets.cpp
simplewidgets.h
starwidget.cpp
starwidget.h
subsurfacewebservices.cpp
subsurfacewebservices.h
tab-widgets/TabBase.cpp tab-widgets/TabBase.cpp
tab-widgets/TabBase.h
tab-widgets/TabDiveExtraInfo.cpp
tab-widgets/TabDiveExtraInfo.h
tab-widgets/TabDiveInformation.cpp
tab-widgets/TabDiveInformation.h
tab-widgets/TabDivePhotos.cpp
tab-widgets/TabDivePhotos.h
tab-widgets/TabDiveStatistics.cpp
tab-widgets/TabDiveStatistics.h
tab-widgets/maintab.cpp
tab-widgets/maintab.h
tableview.cpp
tableview.h
tagwidget.cpp
tagwidget.h
updatemanager.cpp
updatemanager.h
usersurvey.cpp
usersurvey.h
) )
if(NOT NO_USERMANUAL) if(NOT NO_USERMANUAL)
set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE} set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
usermanual.cpp usermanual.cpp
usermanual.h
) )
endif() endif()
if(NOT NO_PRINTING) if(NOT NO_PRINTING)
set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE} set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
templateedit.cpp
printdialog.cpp printdialog.cpp
printoptions.cpp printdialog.h
printer.cpp printer.cpp
printer.h
printoptions.cpp
printoptions.h
templateedit.cpp
templateedit.h
templatelayout.cpp templatelayout.cpp
templatelayout.h
) )
endif() endif()
if (BTSUPPORT) if (BTSUPPORT)
set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE} set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
btdeviceselectiondialog.cpp btdeviceselectiondialog.cpp
btdeviceselectiondialog.h
) )
endif() endif()
@ -117,10 +160,14 @@ source_group("Subsurface Interface" FILES ${SUBSURFACE_INTERFACE})
# the yearly statistics widget. # the yearly statistics widget.
set(SUBSURFACE_STATISTICS_LIB_SRCS set(SUBSURFACE_STATISTICS_LIB_SRCS
statistics/statisticswidget.cpp
statistics/yearstatistics.cpp
statistics/statisticsbar.cpp
statistics/monthstatistics.cpp statistics/monthstatistics.cpp
statistics/monthstatistics.h
statistics/statisticsbar.cpp
statistics/statisticsbar.h
statistics/statisticswidget.cpp
statistics/statisticswidget.h
statistics/yearstatistics.cpp
statistics/yearstatistics.h
) )
source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS}) source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS})

View file

@ -19,13 +19,21 @@ source_group("Subsurface Interface Files" FILES ${SUBSURFACE_PREFERENCES_UI})
set(SUBSURFACE_PREFERENCES_LIB_SRCS set(SUBSURFACE_PREFERENCES_LIB_SRCS
abstractpreferenceswidget.cpp abstractpreferenceswidget.cpp
preferencesdialog.cpp abstractpreferenceswidget.h
preferences_language.cpp
preferences_georeference.cpp
preferences_defaults.cpp preferences_defaults.cpp
preferences_units.cpp preferences_defaults.h
preferences_georeference.cpp
preferences_georeference.h
preferences_graph.cpp preferences_graph.cpp
preferences_graph.h
preferences_language.cpp
preferences_language.h
preferences_network.cpp preferences_network.cpp
preferences_network.h
preferences_units.cpp
preferences_units.h
preferencesdialog.cpp
preferencesdialog.h
) )
source_group("Subsurface Preferences" FILES ${SUBSURFACE_PREFERENCES_LIB_SRCS}) source_group("Subsurface Preferences" FILES ${SUBSURFACE_PREFERENCES_LIB_SRCS})

View file

@ -1,17 +1,30 @@
# the profile widget # the profile widget
set(SUBSURFACE_PROFILE_LIB_SRCS set(SUBSURFACE_PROFILE_LIB_SRCS
profilewidget2.cpp
diverectitem.cpp
divepixmapitem.cpp
divelineitem.cpp
divetextitem.cpp
animationfunctions.cpp animationfunctions.cpp
animationfunctions.h
divecartesianaxis.cpp divecartesianaxis.cpp
diveprofileitem.cpp divecartesianaxis.h
diveeventitem.cpp diveeventitem.cpp
diveeventitem.h
divelineitem.cpp
divelineitem.h
divepixmapitem.cpp
divepixmapitem.h
diveprofileitem.cpp
diveprofileitem.h
diverectitem.cpp
diverectitem.h
divetextitem.cpp
divetextitem.h
divetooltipitem.cpp divetooltipitem.cpp
divetooltipitem.h
profilewidget2.cpp
profilewidget2.h
# qmlprofile.h
ruleritem.cpp ruleritem.cpp
ruleritem.h
tankitem.cpp tankitem.cpp
tankitem.h
) )
source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS}) source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS})

View file

@ -3,36 +3,58 @@
# models used both mobile and desktop builds # models used both mobile and desktop builds
set(SUBSURFACE_GENERIC_MODELS_LIB_SRCS set(SUBSURFACE_GENERIC_MODELS_LIB_SRCS
diveplotdatamodel.cpp
diveimportedmodel.cpp
completionmodels.cpp completionmodels.cpp
completionmodels.h
diveimportedmodel.cpp
diveimportedmodel.h
divelocationmodel.cpp divelocationmodel.cpp
divelocationmodel.h
diveplotdatamodel.cpp
diveplotdatamodel.h
maplocationmodel.cpp maplocationmodel.cpp
maplocationmodel.h
) )
# models exclusively used in desktop builds # models exclusively used in desktop builds
set(SUBSURFACE_DESKTOP_MODELS_LIB_SRCS set(SUBSURFACE_DESKTOP_MODELS_LIB_SRCS
divepicturemodel.cpp
cleanertablemodel.cpp cleanertablemodel.cpp
models.cpp cleanertablemodel.h
tankinfomodel.cpp
treemodel.cpp
cylindermodel.cpp cylindermodel.cpp
yearlystatisticsmodel.cpp cylindermodel.h
weightsysteminfomodel.cpp
weightmodel.cpp
filtermodels.cpp
divecomputermodel.cpp
divetripmodel.cpp
diveplannermodel.cpp
divecomputerextradatamodel.cpp divecomputerextradatamodel.cpp
divecomputerextradatamodel.h
divecomputermodel.cpp
divecomputermodel.h
divepicturemodel.cpp
divepicturemodel.h
diveplannermodel.cpp
diveplannermodel.h
divetripmodel.cpp
divetripmodel.h
filtermodels.cpp
filtermodels.h
models.cpp
models.h
tankinfomodel.cpp
tankinfomodel.h
treemodel.cpp
treemodel.h
weightmodel.cpp
weightmodel.h
weightsysteminfomodel.cpp
weightsysteminfomodel.h
yearlystatisticsmodel.cpp
yearlystatisticsmodel.h
) )
# models exclusively used in mobile builds # models exclusively used in mobile builds
set(SUBSURFACE_MOBILE_MODELS_LIB_SRCS set(SUBSURFACE_MOBILE_MODELS_LIB_SRCS
divelistmodel.cpp divelistmodel.cpp
messagehandlermodel.cpp divelistmodel.h
gpslistmodel.cpp gpslistmodel.cpp
gpslistmodel.h
messagehandlermodel.cpp
messagehandlermodel.h
) )
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable") if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")