diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-09-02 19:09:08 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-30 10:36:02 -0700 |
commit | a0798214231c652ac6142228f5ddfc4b65c921f8 (patch) | |
tree | 53e739cff48e1b111ea2e84fb9441d03b63fe443 /qt-ui/CMakeLists.txt | |
parent | f38ca97a78aa01afdd8ed3093fc104e6e0f101ce (diff) | |
download | subsurface-a0798214231c652ac6142228f5ddfc4b65c921f8.tar.gz |
Start to clean CMake
CMake can be a good system but if we keep everything into one big
cmake file things can go nuts really quick. Since I already took
quite a start on an subsurface layer separation some time ago, I'm
improving it by making each module on Subsurface depend on it's own
CMake module.
This first patch moves the qt-ui part to qt-ui/CMakeLists.txt file,
it cleans tons of the main cmake file ( moving all parts to the in
ternal folder ), and makes things more easily manageable by the
programmer that will change the ui bits, he doesn't need to play
hide and seek with the CMakeLists.txt file anymore, trying to figure
out where should he put his newly generated file.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/CMakeLists.txt')
-rw-r--r-- | qt-ui/CMakeLists.txt | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/qt-ui/CMakeLists.txt b/qt-ui/CMakeLists.txt new file mode 100644 index 000000000..9def39ff3 --- /dev/null +++ b/qt-ui/CMakeLists.txt @@ -0,0 +1,104 @@ +# create the libraries +file(GLOB SUBSURFACE_UI *.ui) +qt5_wrap_ui(SUBSURFACE_UI_HDRS ${SUBSURFACE_UI}) +qt5_add_resources(SUBSURFACE_RESOURCES subsurface.qrc) +source_group("Subsurface Interface Files" FILES ${SUBSURFACE_UI}) + +# the interface, in C++ +set(SUBSURFACE_INTERFACE + updatemanager.cpp + about.cpp + divecomputermanagementdialog.cpp + divelistview.cpp + diveplanner.cpp + diveshareexportdialog.cpp + downloadfromdivecomputer.cpp + globe.cpp + graphicsview-common.cpp + kmessagewidget.cpp + maintab.cpp + mainwindow.cpp + modeldelegates.cpp + metrics.cpp + notificationwidget.cpp + preferences.cpp + simplewidgets.cpp + starwidget.cpp + subsurfacewebservices.cpp + tableview.cpp + divelogimportdialog.cpp + tagwidget.cpp + groupedlineedit.cpp + divelogexportdialog.cpp + divepicturewidget.cpp + usersurvey.cpp + configuredivecomputerdialog.cpp + undocommands.cpp + locationinformation.cpp + qtwaitingspinner.cpp +) + +if(NOT NO_USERMANUAL) + set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE} + usermanual.cpp + ) +endif() + +if(NOT NO_PRINTING) + set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE} + templateedit.cpp + printdialog.cpp + printoptions.cpp + printer.cpp + templatelayout.cpp + ) +endif() + +if (FBSUPPORT) + set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE} + socialnetworks.cpp + ) +endif() + +if (BTSUPPORT) + set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE} + btdeviceselectiondialog.cpp + ) +endif() + +source_group("Subsurface Interface" FILES ${SUBSURFACE_INTERFACE}) + +# the profile widget +set(SUBSURFACE_PROFILE_LIB_SRCS + profile/profilewidget2.cpp + profile/diverectitem.cpp + profile/divepixmapitem.cpp + profile/divelineitem.cpp + profile/divetextitem.cpp + profile/animationfunctions.cpp + profile/divecartesianaxis.cpp + profile/diveprofileitem.cpp + profile/diveeventitem.cpp + profile/divetooltipitem.cpp + profile/ruleritem.cpp + profile/tankitem.cpp +) +source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS}) + +# the yearly statistics widget. +set(SUBSURFACE_STATISTICS_LIB_SRCS + statistics/statisticswidget.cpp + statistics/yearstatistics.cpp + statistics/statisticsbar.cpp + statistics/monthstatistics.cpp +) +source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS}) + +add_library(subsurface_profile STATIC ${SUBSURFACE_PROFILE_LIB_SRCS}) +target_link_libraries(subsurface_profile ${QT_LIBRARIES}) +add_library(subsurface_statistics STATIC ${SUBSURFACE_STATISTICS_LIB_SRCS}) +target_link_libraries(subsurface_statistics ${QT_LIBRARIES}) +add_library(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS}) +target_link_libraries(subsurface_generated_ui ${QT_LIBRARIES}) +add_library(subsurface_interface STATIC ${SUBSURFACE_INTERFACE}) +target_link_libraries(subsurface_interface ${QT_LIBRARIES} ${MARBLE_LIBRARIES}) |