aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2018-04-29cmake: add the GCC_OPTIMIZATION_FLAGS variableGravatar Lubomir I. Ivanov
Instead of always adding -O2 for CMAKE_C_FLAGS_DEBUG and CMAKE_CXX_FLAGS_DEBUG allow the user to pass a custom value via GCC_OPTIMIZATION_FLAGS. Passing -DGCC_OPTIMIZATION_FLAGS:STRING=-O0 would disable all optimizations. Suggested-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-23Add -libpath argument for qtmacdeployGravatar Allen Hall
Resolves ERROR: no file at "/usr/lib/libgit2.dylib" when building on MacOS. [Dirk Hohndel: SOB in PR #1201 - copying it into the commit for consistenty] Signed-off-by: Allen Hall <revenant83@hotmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-15QML UI: update to latest KirigamiGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-11cmake: update CMake to build the map components on mobileGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-02-15Build: do include modules instead of filesGravatar Jan Mulder
Cleanup only. It seems a little weird to first define a CMAKE_MODULE_PATH search path and then explicitly include files including a hard coded path instead of letting the include command search for the modules we like to include. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-01-10build system: split qt-models into partsGravatar Jan Mulder
For a long time, I did not realize that a lot of qt-models are only used in the mobile app, or only used in the desktop application. This commit splits the qt-models in 3 parts. Used in both mobile and desktop, used in desktop only, used in mobile only. There is no other code change in here, other than cmake changes. To me, this gives at least developers more insight where code is actually used, and there is a small benefit in footpoint. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-01-03mobile: newer Kirigami SHAGravatar Jan Mulder
This commit consists of the following 3 parts: 1. There are 2 source files added, adapt our build process accordingly. 2. Due to a change in icon and kirigami QML prefixes, we need to adapt for this as well. Changed mobile-resources.qrc for that. When this would not be changed, the icons will not be found. 3. To further prepare for the future, abandon the iconName property in favour of the new icon grouped property, which can have more attributes than only the name. But currently it is only a syntactic change. Tested on Android device, and no visible changes. Signedoff-by: Jan Mulder <jlmulder@xs4all.nl
2017-12-24Fix build for cmake before 3.10Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-24Silence cmake 3.10 warningsGravatar Dirk Hohndel
Explicitly turning of automoc and friends for every single auto generated file seems a rather dumb approach... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-18Compile with -O2 optimization even in debug modeGravatar Berthold Stoeger
The -O0 default is useless owing to extremely convoluted assembly. Moreover, many warnings depending on data analysis are ineffective with -O0. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-12-17Turn on -WallGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-05cmake: building Subsurface-mobile without BT is no longer supportedGravatar Dirk Hohndel
It just doesn't seem to make sense. Why would you do that. Allowing this options makes things more complicated as we need to test for that in various places. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-15cmake: make sure to only handle objcopy from MXEGravatar Lubomir I. Ivanov
The native Windows build does not use the MXE tools and call such as `i686-w64-mingw32.shared-objcopy` can fail. Attempt to first find if the program exists using `find_program()` and only then call it. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-15MXE: move the objcopy calls to cmakelists.txtGravatar Lubomir I. Ivanov
The objcopy calls to strip the debug symbols out of subsurface.exe need to happen before the installer is created (staged). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-04Rename README to README.md in some scripts, makefiles,...Gravatar Stefan Fuchs
Was needed after the file itself was renamed. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-23Mac build: use more system librariesGravatar Dirk Hohndel
libxml2, libxslt, and libsqlite3 are new enough on macOS to no longer require our own versions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-20cmake: deal with occasional build order issueGravatar Dirk Hohndel
I only ran into this a couple of times and can't figure out why it picked the order in which it tried to build things - but hard coding the dependency seems to have fixed it (then again, since I didn't always run into this, I'm not sure). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-07Typo fix remoev -> removeGravatar Darexon
Signed-off-by: Cameron Phillips <darexon331@gmail.com>
2017-10-06Revert "QML UIL: go back to older Kirigami"Gravatar Dirk Hohndel
This reverts commit 893ff019dbabf356a477da0bdf7d954123759018. Thanks to the amazing support from Marco Martin the theming issue in Kirigami master has been fixed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-05QML UIL: go back to older KirigamiGravatar Dirk Hohndel
This brings back correct theming. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-04Switch back to latest KirigamiGravatar Dirk Hohndel
And fix the build issue. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17cmake: enable BLE on MacsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-04remove Marble from packaging and build scriptsGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> --- please note, that i have no way to test most of the scripts ATM.
2017-08-26cmake: try to find the Googlemaps plugin on LinuxGravatar Dirk Hohndel
Different flavors of Linux put this in different subdirectories. Just have cmake find the plugin for us. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-08-25Enable googlemaps plugin from build directory on LinuxGravatar Dirk Hohndel
With this change, when running Subsurface from the build directory, it should find a googlemaps plugin that was installed into the install_root. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-08-02Mac build: install googlemaps pluginGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29Mac install: add missing esri pluginGravatar Dirk Hohndel
Thanks to Lubomir for figuring what was missing! Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28cmake: install QML components for Subsurface as wellGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28cmake: only install Marble files when we use MarbleGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28cmake: add the Quick, Location, QuickWidgets dependenciesGravatar Lubomir I. Ivanov
Applies only to DesktopExecutable for now. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-15Mac build: correctly deal with no printingGravatar Dirk Hohndel
Including working around a weird hack to install the Grantlee plugins. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-30BLE: require Qt 5.6 and suggest Qt 5.9.1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-24Enable BLE on AndroidGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-24Very early and likely quite broken BLE GATT codeGravatar Linus Torvalds
This is some very early and hacky code to be able to access BLE-enabled dive computers that use the GATT protocol to send packets back and forth (which seems to be pretty much all of them: a vendor-specific GATT service with a write characteristic and a notification characteristic for reading). For testing only. But it does successfully let me download dives from my EON Steel and my Scubapro G2. NOTE! There are several very hacky pieces in here, including just "knowing" that the write characteristic is the first one, and the notification characteristic is second. The code should actually check the properties rather than have those kinds of hardcoded assumptions. It also checks "vendor specific" by looking at the UUID string representation, and knowing that the standard ones start with zero. Crazily, there doesn't seem to be any normal way to test for this, although I guess that maybe the uuid.minimumSize() function could be used. There are other nasty corners. Don't complain, send me patches. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-11CMakeLists.txt: Remove SmartTrak import optionsGravatar Salvador Cuñat
Remove SmartTrak import options from Subsurface's CMakeLists,txt, as a first step to keep the importer apart from the main application.
2017-05-27Android build: rely on KEYSTORE environment for release buildGravatar Dirk Hohndel
With the gradle build it seems we automatically get a Debug build unless the keystore is defined. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Don't use the deprecated CMake variableGravatar Thiago Macieira
The *_VERSION_STRING variable has been deprecated in Qt since 5.1.0. Use the non-deprecated variable instead (which is not a string). Qt 5.9.0 has a bug in the deprecated variable. Since it's deprecated, it's probably not going to be fixed until 5.9.1. See https://bugreports.qt.io/browse/QTBUG-60936 Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Android build: Add BUILDTOOLS_REVISIONGravatar Jan Mulder
The used cmake toolkit for building the Android Subsurface-mobile app (qt-android-cmake) recently moved away from compiling with Ant in favor of Gradle. The most recent Android SDK will not support Ant any more. This calls for the addition of the Android SDK BUILDTOOLS_REVISION define to the cmake of Subsurface-mobile. Without this, the build will fail. The value has to be set to an existing directory in .../android-sdk/build-tools/ Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-01QML UI: we now depend on QuckControls2Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-01QML UI: Fully port dive edit to Kirigami2Gravatar Marco Martin
Completely adapt to the api changes of OverlaySheet in Kirigami2 in order to achieve the same look and behavior for the dive edits that had with kirigami1 Port most components to QtQuickContrls2, except comboboxes in the dive edit sheet that will need a new control type Signed-off-by: Marco Martin <notmart@gmail.com>
2017-03-24Fix double to int truncation in C++ codeGravatar Jeremie Guichard
Wfloat-conversion enabled for C++ part of the code Fix warnings raised by the flag using lrint Original issue reported on the mailing list: The ascent/descent rates are sometimes not what is expected. E.g. setting the ascent rate to 10m/min results in an actual ascent rate of 9m/min. This is due to truncating the ascent rate preference, then effectively rounding up the time to reach each stop to 2s intervals. The result being that setting the ascent rate to 10m/min results in 20s to ascend 3m (9m/min), when it should be exactly 18s. Reported-by: John Smith <noseygit@hotmail.com> Reported-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-09Fix potential double/float to int rounding errorsGravatar Jeremie Guichard
Not using lrint(f) when converting double/float to int creates rounding errors. This error was detected by TestParse::testParseDM4 failure on Windows. It was creating rounding inconsistencies on Linux too, see change in TestDiveDM4.xml. Enable -Wfloat-conversion for gcc version greater than 4.9.0 Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-02-25Move CMake variables printing into a utility macroGravatar Jeremie Guichard
Added cmake_variables_helper.cmake providing 2 helpers - print_variable - print_all_variables Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-02-24Use SUBSURFACE_TEST_DATA definition to point to test data dirGravatar Jeremie Guichard
Update tests with a (compile time) option SUBSURFACE_TEST_DATA, pointing to test data base path. It is needed for cross compilation cases. SUBSURFACE_TEST_DATA is set to SUBSURFACE_SOURCE by default, or configurable via cmake option -DSUBSURFACE_TEST_DATA="...". Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-02-03Fix build breakage with earlier Qt versionsGravatar Dirk Hohndel
In order to get the translations right for Windows we now explicitly pull in a lot more translation files - some of which don't exist in earlier Qt versions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22QML UI: allow building Subsurface-mobile on desktopGravatar Dirk Hohndel
Since we manually track Kirigami we need to compile the desktopicon.cpp file when not building on Android or iOS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21Revert "QML UI: build against latest Kirigami"Gravatar Dirk Hohndel
This reverts commit a842e44b685dbb7e34df317a8beacff747cee6bd.
2017-01-16build.sh: if new enough libgit2 is installed, use itGravatar Dirk Hohndel
Right now this is only designed for Linux where current distros all should have a new enough libgit2 (and our instructions tell people to install this with system tools, so we should also use it). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-03CMake dependency fixGravatar Dirk Hohndel
With this the auto generated headers should be ready before filtermodels.cpp needs them Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01CMake: more changes to a simple conditionalGravatar Dirk Hohndel
It seems the CMake versions on Linux and Mac disagree about what might be the correct way to use parenthesis in a mixed AND/OR conditional. This may seem overkill, but it made both CMake versions happy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>