aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2015-05-29Move DivePlannerModel and CylinderModel to qt-modelsGravatar Tomaz Canabrava
Still trying to make it easier for the Mobile Port: This patch is a bit bigger than I hopped, but it was the smallest that I could get. A lot of TODO items where added where I broke the code because the current implementation would break the QML implementtion on the designer. I'll most probably fix those myself when I finish the transition to the models to the new folder. I only moved both models at once because there's an interdependency between them (seems inevitable, tough, but I'll take a better look at it later). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move CleanerTableModel to its own fileGravatar Tomaz Canabrava
models.h / .cpp was getting too big (around 2.5k lines), and each change triggered a rebuild in tons of parts of Subsurface, this is the first commit trying to make the models code sane by removing them all of the models.h/cpp file and also clearning code in the process. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move the models to its own folderGravatar Tomaz Canabrava
This is an attempt to help share code between the desktop version of Subsurface and the mobile version. More code will be moved around and the models will be split in a way that will help recompile times and also creation of different interfaces for different form-factors. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Add USE_LIBGIT23_API as cmake optionGravatar Dirk Hohndel
Just as we would expect, the libgit2 developers of course once again broke their API. In order to compile against current master we need to remap those APIs once again. Simply call cmake with -DUSE_LIBGIT23_API Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Use group of files to show the project hierarchyGravatar Tomaz Canabrava
This doesn't work on QtCreator yet - but it's the documented way in CMake to display the project hierarchy in some IDEs (the one that I know that it works with is Visual Studio). Even knowing that this doesn't work with QtCreator, it's a valid change because someone can fix creator in the future. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17Add a new class, QtWaitingSpinner, MIT Licensed.Gravatar Tomaz Canabrava
from https://github.com/snowwlex/QtWaitingSpinner Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17Move Locationinformation to its own file.Gravatar Tomaz Canabrava
The SimpleWidgets file was getting too big, and location information will also need a new model - a good way to do not mix everything is to put things in a new file. [Dirk Hohndel: added missing include of stdint.h] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-01cmake: enable Facebook supportGravatar Dirk Hohndel
Not sure if we have this on Android, so right now I just enable it for Linux, OS X, and Windows. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-28cmake: missing spaceGravatar Dirk Hohndel
This caused cut to fail and the whole dll dependency calculation went wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26CMake needs hints that this will be a win32 or a mac bundle.Gravatar Tomaz Canabrava
MACOSX_BUNDLE and WIN32 give hints to cmake for different install behaviors. for instance, trying to copy frameworks and other stuff to the correct places. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24cmake: don't always build testsGravatar Dirk Hohndel
Only build the tests when running them. The downside of the way this is implemented is that build errors for the tests actually show up as test errors and are only seen in the test log - but this seemed worth not having every build include the tests. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24cmake: copy images / icons into the build Documentation folderGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24cmake: include the git SHA in the Windows installer nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21cmake: fix finding MarbleGravatar Dirk Hohndel
Silly bug. A lot of things in cmake are case insensitive. Some care about case. Stupid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: more consitent multi-line callsGravatar Lubomir I. Ivanov
- don't put anything on the first line after the opening "(" - fix indentation of the closing "(" Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: use uppercase for defined macrosGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: fix message for NO_MARBLEGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: lowercase all built-in callsGravatar Lubomir I. Ivanov
e.g. SET() -> set() ELSEIF() -> elseif() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: generate clean ssrf-version.hGravatar Lubomir I. Ivanov
remoevs the extra white sapce in the generated ssrf-version.h. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: whitespace cleanupGravatar Lubomir I. Ivanov
- indentation - spaces near comments Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add LIBGIT2_FROM_PKGCONFIG and LIBDC_FROM_PKGCONFIGGravatar Lubomir I. Ivanov
These two new options allow usage of pkg-config to retrieve libdivecomputer and libgit2. For some reason the variables *_LIBRARIES have to be set to blank strings in the process, otherwise "-l" is passed to the linker. LIBGIT2_FROM_PKGCONFIG is a rename from PREFER_GIT_FROMSOURCE for consistency. The IF() check is also fixed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add the NO_MARBLE optionGravatar Lubomir I. Ivanov
If NO_MARBLE is set to ON, the MARBLE package is not seeked. If set to OFF the package is seeked, but if the find fails the gcc definition -DNO_MARBLE is set and marble is disabled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add the NO_TESTS NO_DOCS optionsGravatar Lubomir I. Ivanov
NO_TESTS: disable the tests NO_DOCS: disable the docs Both are set to OFF by default. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-16cmake: fix bug when using system libgit2Gravatar Dirk Hohndel
Simple omission in commit 7596db28b5ad ("cmake: allow looking for optional libraries"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-16cmake: add extra -lpthread to fix Ubuntu buildsGravatar Dirk Hohndel
We shouldn't need this. Ubuntu is once again broken. What else is new. But since this shouldn't hurt any of the sane Linux version, I'll just add it for any Linux flavor. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14cmake: remove references to LRELEASEGravatar Tomaz Canabrava
This is being taken care by Qt5::LinguistTool Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: try to find the macdeployqt programGravatar Dirk Hohndel
There is no variable for it, but we can abuse the variable that shows us where moc is located. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: improve test for variableGravatar Dirk Hohndel
CMake still confuses me. When testing if a variable was set it sometimes needs to want "DEFINED", but sometimes I need to compare it to an empty string. Let's do both (this seems to fix the problem I ran into) - but this is still weird. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: allow looking for optional librariesGravatar Dirk Hohndel
And use this to look for libusb. If it's there then libdivecomputer likely was linked against it. If it isn't then we don't need it, either. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Move the translations to it's own subfolderGravatar Tomaz Canabrava
By adding a new CMakeLists.txt file and configuring the translations inside of it's folder, the buildsystem will compile everything on that folder. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Use Qt5Translations to deal with translationsGravatar Tomaz Canabrava
And remove the old code that did the same thing in a very complex way. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09We use static library if we find - option was not being used.Gravatar Tomaz Canabrava
Currently we search for a static library and if we don't find it, we search for a shared library. If one of them is found, we return success but if none of them is found, error. So - A static library for libgit and libdivecomputer is preferred over the shared one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07cmake: fix typoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Make it compilant with the build scriptGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Add FindLibdivecomputer.cmakeGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Simplify libgit handling on main CMakeLists.txtGravatar Tomaz Canabrava
We will use the OPTIONS variable to decide to find the .a or the .so, so there's no need to do checks here. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Add build optionsGravatar Tomaz Canabrava
- add an option to toogle between libgit2 from package vs built from source - add two options that will be used in the future: use static/dynamic lib Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07No need to specify Marble dir anymoreGravatar Tomaz Canabrava
We are already looking for the default directory. *if* cmake doesn't find Marble automatically, the user needs to specify -DMARBLE_INCLUDE_DIR and -DMARBLE_LIBRARIES Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Move the pkg_config_library macro to its own fileGravatar Tomaz Canabrava
The pkg_config_library macro is a helper macro and was generating noise on the main CMakeLists.txt file, so I moved it to another file. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07FindMarble moved to cmake/ModulesGravatar Tomaz Canabrava
This is the correct way to deal with CMake Modules (or at least, the default way). All our custom CMakeFiles will be here. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Simplify finding QtGravatar Tomaz Canabrava
Qt5 Supports Components, which means that we can list the components we need to find, instead of specifying one for each line. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05cmake: second attempt to install our ssrfmarble libGravatar Dirk Hohndel
Sorry for the noise. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05cmake: on Linux install our special marble libraryGravatar Dirk Hohndel
If we build our own library, make sure it gets installed as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05cmake: add libz to end of linker line on LinuxGravatar Dirk Hohndel
While I don't need this when building on Fedora 20, OBS builds for openSUSE appear to fail without this. Strange. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05cmake: the application name should be capitalized on MacGravatar Dirk Hohndel
We want Subsurface.app but subsurface and subsurface.exe Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: try to get the dependency on the .qm files rightGravatar Dirk Hohndel
This is still not something I'm 100% sure I got right. But at least now it correctly rebuilds the .qm files... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: use the correct macdeployqt command nameGravatar Dirk Hohndel
Oops, that was silly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: correctly create a Mac bundleGravatar Dirk Hohndel
Don't try to install the TARGET into the Subsurface.app or we get a neat infinite recursion. As a bundle cmake does all these things automagically. Right now the version is hard coded which is ugly but since it's determined in a separate cmake file it seemed non-obvious how to do this right... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: try to pick a useful default for the location of Qt translationsGravatar Dirk Hohndel
Not sure if this will work for most installations - it does work for mine. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: don't always create .qm filesGravatar Dirk Hohndel
The cmake keywords still confuse me at times. A custom target is always recreated. How silly. But the correct (I think) implementation is actually easier... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>