aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2015-11-18Cmake: add SUBSURFACE_MOBILE definition earlierGravatar Dirk Hohndel
This way it is set when subsurface-core is built. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12SmartTrak import - Add build capability to cmakeGravatar Salvador Cuñat
This enables posibility of building standalone import tool via cmake. Adds an option SMARTRAK_IMPORT (defaults to OFF) which, if turned ON, will require glib-2.0 and libmdb libraries to be installed, and, calling will produce an executable with the highly original name of smtk2ssrf. I have no capability to cross-compile to windows, so I haven't even tried to put this in Win, less say in Mac. I expect linux users which may be actual users of SmartTrak, to test this before trying to build on windows, although the target public will probably be the windows users (or at least, ex windows user). Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Location service: move files around to fit new directory layoutGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Location service: Add GPS location infrastructure for Subsurface-mobileGravatar Dirk Hohndel
This doesn't do a thing - just adds the empty class and sets up the Cmake file so it finds the required Qt components for Subsurface-mobile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-10Enable BT compilation earlierGravatar Miika Turkia
Commit ba55c603953bb530de2fe97fa46098d8c87e6aa5 broke Bluetooth support for me. This patch moves the setting of BT_SUPPORT earlier, re-enabling BT download option on the download dialog. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Don't rely on CMAKE_AUTOUICGravatar Tomaz Canabrava
Some old CMakes that we use had problems with it, change to use the qt5_wrap_ui macro that's bundled with Qt. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Remove Facebook from PluginsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Removed C++11 from the code.Gravatar Tomaz Canabrava
Make Dirk ungrumpy Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Revert "Mac: don't use C++11 on older clang versions"Gravatar Dirk Hohndel
This reverts commit acb74f25f7e6d26df7f39f596510ee2d5226fb15. Better not enable it anywhere
2015-11-08Make building plugins optionalGravatar Dirk Hohndel
This currently fails at least on my old Mac that I use to create binaries that work on 10.7 and newer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Mac: don't use C++11 on older clang versionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07organize qml files in subdirectoriesGravatar Sebastian Kügler
This makes the organization of the qml files a bit more fine-grained, it prevents mixing of .cpp and QML files, and also of what's compiled, and what's included in the app as qrc data. In particular: - subsurface specific QML items go into the qml/ subdirectory - theme and unit definitions to into qml/theme subdirectory (they already were located in a theme directory) - generic components, such as our Label goes into qml/components This facilitates sharing of functionality and identifying common stuff better. Ideally, we can pull qml/theme and qml/components from a standardized set at some point, so we don't have to maintain that code. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Better file names for Subsurface-mobile related sourcesGravatar Dirk Hohndel
They aren't Android specific - they are for the QML UI mobile app which should run on iOS as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Cmake: untangle subsurface and subsurface-mobileGravatar Dirk Hohndel
In the cmake restructuring it seems that subsurface-mobile building got completely messed up. With this subsurface-mobile still doesn't actually build (still too many unfulfilled dependencies, but we're getting closer). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Use target_link_libraries for GrantleeGravatar Rex Dieter
This allows for finding headers when not in /usr/include (like parallel-installable distribution-packaged grantlee5) Signed-off-by: Rex Dieter <rdieter@fedoraproject.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Cmake: fix BT definitionGravatar Dirk Hohndel
This was set twice, the first time before we checked that we have a new enough Qt version installed. Also fixed a typo. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Make code compile in gnu11 and c++11Gravatar Tomaz Canabrava
This is to make it possible to use some nice to have features of c11 and c++11 like range based loops, delete default functions, auto variable assignment. Talked to Dirk about this and he is ok with the change, but he also states that he will not accept lambdas Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Make icons work againGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Clear the main CMake fileGravatar Tomaz Canabrava
A bit of dust was setting here, when I moved tons of things around I forgot to remove some bits. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30CMake for tests in its own folderGravatar Tomaz Canabrava
Besides making it more simple to add a new test now since you don't need to play hide and seek with the main cmake this has another good thing: on IDE's that scan the cmake to create targets on the project tree, the main project was being popullated with test-targets on the main tree and not inside the tests directory. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move Profile widget out of desktop-widgetsGravatar Tomaz Canabrava
The reason for that is, even if profile widget is made with qpainter and for that reason it should be a desktop widget, it's being used on the mobile version because of a lack of QML plotting library that is fast and reliable. We discovered that it was faster just to encapsulate our Profile in a QML class and call it directly. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Single CMake to handle the modelsGravatar Tomaz Canabrava
This one was pretty easy because of the work I did a few months ago to separate the models from the UI. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30main.cpp -> {android-main, desktop-main}Gravatar Tomaz Canabrava
This is needed to compile both in a single call to make. Also it will help removing some of the mistakes in the current android version: it always created the mainwindow, even without using it for anything, so tons of memory will be freed now for the android version, making it snappier and smoother. This is a necessary move so we don't need to #ifdef all over the place for the two different versions, and imo the changes needed to keep both versions will not be that huge if we keep things in subsurface-core sane. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
Since we have now destkop and mobile versions, 'qt-ui' was a very poor name choice for a folder that contains only destkop-enabled widgets. Also, move the graphicsview-common.h/cpp to subsurface-core because it doesn't depend on qgraphicsview, it merely implements all the colors that we use throughout Subsurface, and we will use colors on both desktop and mobile versions Same thing applies for metrics.h/cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move the icons to the icons folderGravatar Tomaz Canabrava
There was no reason at all to keep those icons on the root folder. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Modify code to make it compile after rebaseGravatar Tomaz Canabrava
Did a git rebase and some stuff changed in the meantime; This is a compatibility commit: Add a few include directories on the cmake to quiet some ui_headers.h not being found (the ones that are created automatically by uic) and a few noiseances like models requiring interface functionality. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move all core-functionality to subsurface-coreGravatar Tomaz Canabrava
And adapt a new CMakeLists.txt file for it. On the way I've also found out that we where double-compilling a few files. I've also set the subsurface-core as a include_path but that was just to reduce the noise on this commit, since I plan to remove it from the include path to make it obligatory to specify something like include "subsurface-core/dive.h" for the header files. Since the app is growing quite a bit we ended up having a few different files with almost same name that did similar things, I want to kill that (for instance Dive.h, dive.h, PrintDive.h and such). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Start to clean CMakeGravatar Tomaz Canabrava
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>
2015-10-29Add subsurface.debug script to help debugging and install it (for Linux only)Gravatar Guillaume GARDET
This patch adds subsurface.debug script and install it for Linux. Instead of running subsurface, you can run subsurface.debug which will launch subsurface as usual, but will monitor subsurface exit and run gdb automatically if subsurface crashes and it creates a crashlog in $HOME/. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Cmake: fix incorrect modification of a QT_LIBRARIESGravatar Dirk Hohndel
It's a list, not a string. Treating it as a string creates all kinds of exciting weird errors that make no sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Fix building without BT supportGravatar Dirk Hohndel
I guess no one had tried this in a while. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18Use hidapi on MacGravatar Dirk Hohndel
This allows us to support the Suunto EON Steel on Mac, assuming the matching libdivecomputer version from the Subsurface-branch. If that was compiled with the hdiapi lib then hopefully the build for Subsurface should find that library as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-08Move the algorithm to divesite.cpp fileGravatar Tomaz Canabrava
This shouldn't be on the maintab.cpp, this file is already too convoluted. [Dirk Hohndel: slightly refactored this commit and the next one to make the code actually work and make the split across the two commits more reasonable] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Cmake: ensure marbledata is actually copied into the build directoryGravatar Dirk Hohndel
This can be done regarless of whether Marble is enabled or not. No harm done. Fixes #937 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-05Add test for import, merge and renumberingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Make TestGitStorage run lastGravatar Dirk Hohndel
This can take a long time on slow connections so it makes sense to run all the other tests first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28Cmake: make libssh2 library path explicitGravatar Dirk Hohndel
Under certain conditions on my Mac the build process will happily find libssh2 but then at link time can't figure out where it is. Making the path to the library explicit seems to fix that issue. This commit also adds the code to dump all visible variables at the end of the cmake file (commented out). I have looked this up online, added it to address an issue, and then removed it quite a few times... I figure I might as well keep it there for the next time I need it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22Cmake: add LIBMARBLE_FROM_PKGCONFIG and some Marble related fixesGravatar Lubomir I. Ivanov
This patch adds the option to retrive Marble with pkg-config in a similar way to Grantlee, libgit2, etc. It reorganizes the "if(NO_MARBLE)" case to be the "else()" of if(NOT NO_MARBLE). Also, it adds the "-r" option to "rm" here: add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata ... as otherwise it fails on Win32/Msys with "marbledata is a directory". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06Cmake: make Grantlee5 requiredGravatar Dirk Hohndel
Otherwise printing doesn't work. And we get weird build errors. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-01Cmake: turn on printing by defaultGravatar Dirk Hohndel
As we get closer to the 4.5 release we should try to make sure we build with printing enabled everywhere and just turn it off if we no it's not supported. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Add a new model: SsrfFilterProxyModelGravatar Tomaz Canabrava
Add a new Model, it's the QSortFilterProxyModel that accepts functions to filter / sort. so instead of creating a new class for each different sorting (overkill), now we can just create a function and pass to this class. I'll rework the filtering system of subsurface to use this - in the meantime I've created this to ease the creation of another filter: the dive sites by gps coordinates. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-30Add test for dive site duplication bugGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-27Cmake: install grantlee plugins on MacGravatar Dirk Hohndel
And add a small message that two potential ERRORS that are thrown in the deploy step are actually harmless. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Add simple test for git storageGravatar Dirk Hohndel
This just makes sure that writing data to git storage and reading it back gives you the same result. Without the fixed generation of initial dive site UUIDs this fails. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Cmake: fix cross compiling on WindowsGravatar Dirk Hohndel
Cmake has a bug that causes the moc process not being handed the necessary defines for the architecture we are building for. Also we were missing a library to make the BT implementation on Windows work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Connect up serial_ftdi custom serialGravatar Anton Lundin
This connects the serial_ftdi implementation to subsurface, and builds libftdi1 for the android builds. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Turn serial_ftdi.c into a custom_serialGravatar Anton Lundin
This cleans up serial_ftdi.c from being a libdivecomputer source and making it into a subsurface custom_serial. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Cmake: automatically create version for Mac bundleGravatar Dirk Hohndel
The version info that is used for the Mac bundle is created at cmake run time, not at make run time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16Cmake: only link against libusb-1.0 if it was foundGravatar Dirk Hohndel
This should work much better as libusb is really only required if you want support for all the dive computers (e.g., Atomics Aquatics Cobalt family). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15Add DiveSitePicturesModelGravatar Tomaz Canabrava
This model should be used inside the Edit Dive Site mode. It should display all photos from all dives that are part of this dive site, ignoring trips. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>