Commit graph

395 commits

Author SHA1 Message Date
Rolf Eike Beer
1f4777a287 CMake: move enable_testing() to the top level
This allows calling ctest from the main build directory instead of having to
change one level down. As a bonus the unittests now show up in my KDevelop so I
can directly run them from the IDE.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-04-12 12:59:17 +03:00
Rolf Eike Beer
5ad52db451 drop support for Qt 5.4 and before
The oldest version tested on TravisCI is Qt 5.5, which is also what is in
Ubuntu 16.04. Drop all the older cruft, noone should use that anymore.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27 07:36:33 -07:00
Dirk Hohndel
643f4a5726 Remove partial support for QWebEngine
Printing never worked, none of this was ever included in test builds. Also, now
that there are official releases of QtWebKit again, this just doesn't seem worth
carrying along anymore.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-20 08:45:02 -07:00
Rolf Eike Beer
dc254716cf CMake: call cmake_minimim_required() before project()
Some policies can affect how project() works.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-19 12:41:32 -07:00
Rolf Eike Beer
d0acee4083 CMake: let CMake set the needed flags for C and C++ standards
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-19 12:41:32 -07:00
Dirk Hohndel
4dd6b82634 build-system: explicitly add libgit2 dependencies for LGTM
For some reason on LGTM these two libraries aren't automatically added to the
link line for Subsurface.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-16 20:24:07 -07:00
Rolf Eike Beer
62c6a19744 CMake: get rid of QT_EXTRA_LIBRARIES
This can be easily derived from QT_EXTRA_COMPONENTS.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-09 09:51:55 -08:00
Rolf Eike Beer
f555fa787f CMake: simplify writing qt.conf on Windows
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05 13:27:54 -08:00
Rolf Eike Beer
b702e8e225 CMake: tell the Intel compiler to use the correct C/C++ standards
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05 13:27:54 -08:00
Rolf Eike Beer
47e9a771ba CMake: do not expand variables in if-expressions
CMake will do the expansion internally itself. Not doing it here is not only
less code, it also makes sure one does not accidentially get a double expansion.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05 13:27:54 -08:00
Rolf Eike Beer
69508d7123 CMake: simplify checking if policy can be set
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05 13:27:54 -08:00
Doug Junkins
a29f7b7b32 Add support to compile from source on a Raspberry Pi
Update CMakeLists.txt to test if the CMAKE_SYSTEM_PROCESSOR variable is
either armv6l or armv7l. If so, add libGLESv2 to the list of libraries
to be linked to support openGL on embedded systems.

Update INSTALL file to list the packages needed to be installed on
Raspian Stretch or Ubuntu Mate to successfully compile subsurface from
source.

Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-03-05 09:01:22 -08:00
Lubomir I. Ivanov
a1ffe115cf facebook: remove the featute from the code base
Remove from:
- unit tests
- desktop widgets
- preferences
- core intergration
- cmakefiles
- build scripts
- icons
- docs

Also remove the plugins and social network integration.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2019-02-01 17:16:43 -08:00
Jan Mulder
6c872931d5 Android build: buildtools version is automatically detected
With commit 0d8fc7ef970e of qt-android-cmake, the buildtools version
is automatically detected. So do not try to pass it any more, as
this breaks the build.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-06 21:53:02 +01:00
Dirk Hohndel
5963a15bbd MXE: add missing Qt5PositioningQuick.dll
Without this the map won't load.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-11-14 00:20:18 -08:00
Dirk Hohndel
a250642479 Android: find Qt cmake modules
With a recent change to the qt-android-cmake project we are now using
the toolchain file bundled with the NDK, and that forces all cmake
modules to be part of the NDK tree - which breaks the way we find our Qt
installation.  This is a hack to work around this as it undoes this
setting, which I'm sure is well intentioned to prevent host system
issues in this cross build scenario.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-11-13 15:51:17 +08:00
Robert C. Helling
4cea7b4901 std99 does not make sense for C++
... and makes Qt Creator fail to parse files.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-10-28 19:59:07 +01:00
Dirk Hohndel
4012ac1c50 build system: work around strange cmake issue
On both Mac and Linux cmake 3.12 complained that there were "no sources given
to target" for the Subsurface-mobile target, which made no sense at all (easy
enough to add debug output to ensure there were, in fact, sources given in the
call to add_executable()). But splitting this across two lines like this seems
to make it work both for older and newer cmake versions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-09 10:03:38 -07:00
Jan Mulder
5681f686ba Revert "Revert "QML UI: newer Kirigami and fallout""
This reverts commit a5db03c2b3.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-01 05:29:46 -07:00
Dirk Hohndel
a5db03c2b3 Revert "QML UI: newer Kirigami and fallout"
Turns out that Jan found an issue with the latest Kirigami, so let's go back to
the known good one.

This reverts commit 17ec95e70c.

Suggested-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-28 14:53:22 -07:00
Jan Mulder
17ec95e70c QML UI: newer Kirigami and fallout
Update to the master of today, and no issues detected on mobile-on-desktop
and Android.

Only, the ugly border is back as the magic hack of 0b16b547ae failed
due to the patch file that errored. So that is fixed too.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-27 08:42:47 -07:00
Alexander Wilms
bcf568586d Fix appdata
Use correct format, create script to update the version and release date in the
appdata.

[Dirk Hohndel: call said script during the build process]

Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-09 18:43:30 -07:00
Berthold Stoeger
77577f717f Build: suppress inconsistent-missing-override warnings on clang
In a previous commit all override-modifiers were thrown out owing
to warning floods caused by the inconsistent-missing-override
flag on clang.

Re-adding overrides is now very painful because it's an all-or-nothing
thing. Let's disable the warning for now. If we reastablished good
coverage with override, we might think about re-enabling the warning.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-03 13:30:14 -07:00
jan Iversen
b05e4c7b5f tests: make qml test harness
build a qml test runner that includes ssrf interface

The qml test runner allows having qml test files.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 17:12:56 +02:00
jan Iversen
55f0b3b1f8 ssrf: add QuickTest to test libraries.
QuickTest enables QML TestCase which are used for qml testing

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 17:12:56 +02:00
jan Iversen
fe38a768f2 ssrf: move functions from mobile-helper to mobile-main
Move few mobile only functions from mobile-helper to mobile-main

remove subsurface-mobile-helper

file structure is now subsurface-*-main.cpp + subsurface-helper.cpp

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
jan Iversen
2c402b0fcf ssrf: combine subsurface-*-helper into subsurface-helper
combine shared functions like init_ui and run_ui in one file

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
jan Iversen
8cc0b6dbc1 ssrf: add shared helper file
add subsurface-helper.cpp to share functions between mobile and desktop

move mobile qml registrations to a shared function (avoiding differences in registrations)

Target is to replace current subsurface-desktop-main + subsurface-desktop-helper and
subsurface-mobile-main + subsurface-mobile-helper with
subsurface-*-main + subsurface-helper

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
Dirk Hohndel
3b8c576d95 build-system: we always require QtQuick and QtLocation
No point in listing them twice as extra components.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-10 15:44:27 -07:00
Alexander Wilms
12519af8b4 Install subsurface.appdata.xml
This is required to make Subsurface show up in Gnome Software & KDE Discover

Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
2018-07-08 20:24:24 -07:00
Dirk Hohndel
7297c5991b build-system/macOS: remove outdated message about errors
This hasn't been true for a long time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 22:18:38 -07:00
Dirk Hohndel
4595ccb9f9 build-system/macOS: copy one more library when building against Qt5.11
I don't quite understand why this one is missing, but otherwise the map doesn't work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 17:23:54 -07:00
Dirk Hohndel
0620c81594 build-system/macOS: try both possitble locations for googlemaps
And don't show an error for the one where it isn't.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-06 17:20:53 -07:00
jan Iversen
5df93e084d android/desktop: remove mapWidget from subsurface.qrc
remove mapWidget entries from subsurface.qrc, and
add reference to map-widget.qrc in CMakelist.txt

Android uses the same CMakelist.txt

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-21 20:27:58 -07:00
Dirk Hohndel
1501c8fbc7 QML UI: update to newer Kirigami
This seems equally stable to what we have and doesn't appear to
introduce any new breakage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-18 06:32:23 +09:00
jan Iversen
d0e9f62624 mobile: add qmlprefs class
add class to cmake and pro
register class

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15 14:12:14 -07:00
jan Iversen
aab8f0dcf6 profile: make profile self contained
move qmlprofile.* to profile dir, to keep all parts of the
widget in one place.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:16:53 +02:00
Dirk Hohndel
5b9c28e1c0 Mac: support running Subsurface-mobile
Copy the required QML modules into the app bundle.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-19 14:13:46 -07:00
Lubomir I. Ivanov
a0b80ca775 cmake: add the GCC_OPTIMIZATION_FLAGS variable
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-29 22:47:33 +03:00
Allen Hall
d4d99b0116 Add -libpath argument for qtmacdeploy
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-23 09:31:11 -07:00
Dirk Hohndel
24a798a5c3 QML UI: update to latest Kirigami
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-15 08:16:59 -07:00
Lubomir I. Ivanov
9a6cd451e2 cmake: update CMake to build the map components on mobile
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-03-11 11:40:12 -07:00
Jan Mulder
88d0ce499d Build: do include modules instead of files
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-02-15 21:23:28 +01:00
Jan Mulder
c8e9b93404 build system: split qt-models into parts
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-10 16:44:15 +01:00
Jan Mulder
a5b44362c6 mobile: newer Kirigami SHA
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
2018-01-03 14:04:08 +01:00
Dirk Hohndel
f067d3b5d6 Fix build for cmake before 3.10
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-24 13:50:59 -08:00
Dirk Hohndel
795f6e24ea Silence cmake 3.10 warnings
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-24 11:34:49 -08:00
Berthold Stoeger
0f3bda4c44 Compile with -O2 optimization even in debug mode
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-18 08:17:35 -08:00
Dirk Hohndel
bd66ab15da Turn on -Wall
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-17 09:08:21 -08:00
Dirk Hohndel
5be38b2b14 cmake: building Subsurface-mobile without BT is no longer supported
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-12-05 19:29:59 -08:00