aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
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>
2015-04-04cmake: Mac install into Subsurface.appGravatar Dirk Hohndel
I guess I should add the code to move that app to /Applications but I never use it this way... not sure how many people really install from source on a Mac, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: make sure we have no emptry Qt translation namesGravatar Dirk Hohndel
When building on a Mac for some reason I was getting an empty translation file name (and therefore and entry that was the whole directory and not a translation file. This is a bit clumsy but it fixes the problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04cmake: add ostctools.cGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-03cmake: make Windows binary a GUI appGravatar Dirk Hohndel
This way we don't get the annoying terminal window Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-03cmake: correctly link against CoreServicesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-03cmake: build working Windows installer including all the DLLsGravatar Dirk Hohndel
Figure out the DLLs we need to include in the installer before building the installer executable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-01cmake: add installer target for creating Windows installerGravatar Dirk Hohndel
Silly cmake doesn't allow a target to depend on the install target. This ugly hack appears to be the recommended workaround :-( Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-01cmake: setup .nsi file when cross building for WindowsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-31cmake: first stab at installing cross built Windows files into stagingGravatar Dirk Hohndel
From there it can then be assembled as an installer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-31cmake: remove debug output that snuck into an earlier commitGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-31cmake: add Qt translation filesGravatar Dirk Hohndel
Not doing anything with them, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30cmake: create translations and correctly install themGravatar Dirk Hohndel
The previous attempt to install them was completely bogus as it only worked when the source directory had previously used for an in-source build using qmake. Oops. With this change we now create the translations in the build directory and install them from there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30cmake: fix Documentation build and installGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30cmake: implement "make install" for LinuxGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26cmake: make CMakeLists.txt more readableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26cmake: add CoreServices framework for MacGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26cmake: add support to compile for Windows and MacGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26cmake: use DEFINED instead of comparing to ""Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25cmake: setup marble link directory correctlyGravatar Dirk Hohndel
This way the necessary rpath settings are created Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25cmake: handle libzip like the other librariesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25cmake cleanupGravatar Dirk Hohndel
- don't reference .so files, reference libraries - handle libdivecomputer just like the other libraries - add the ability to link libdivecomputer statically Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Some simple test for file parsingGravatar Dirk Hohndel
With no V2 question shown - parsing fails when a V2 file is loaded - parsing succeeds when a V3 file is loaded - import of CSV file succeeds With V2 question shown - parsing succeeds when a V2 file is loaded Finally compare the output of reading in the various files with reference output included in the sources. My guess is that this test might be a bit fragile, but hey, it's a start. (reminder: the tests only get built when using cmake) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Add Subsurface resources to testsGravatar Dirk Hohndel
This way we can use the resources from within the tests, for example to load XSLT files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10Add notificationwidget to cmake buildGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10Import Datatrak/WLog filesGravatar Salvador Cuñat
Sequentially parses a file, expected to be a Datatrak/WLog divelog, and converts the dive info into Subsurface's dive structure. As my first DC, back in 90s, was an Aladin Air X, the obvious choice of log software was DTrak (Win version). After using it for some time we moved to WLog (shareware software more user friendly than Dtrak, printing capable, and still better, it runs under wine, which, as linux user, was definitive for me). Then, some years later, my last Aladin died and I moved to an OSTC, forcing me to look for a software that support this DC. I found JDivelog which was capable of import Dtrak logs and used it for some time until discovered Subsurface existence and devoted to it. The fact was that importing Dtrak dives in JDivelog and then re-importing them in Subsurface caused a significant data loss (mainly in the profile events and alarms) and weird location of some other info in the dive notes (mostly tag items in the original Dtrak software). This situation can't actually be solved with tools like divelogs.de which causes similar if no greater data loss. Although this won't be a core feature for Subsurface, I expect it can be useful for some other divers as has been for me. Comments and issues: Datatrak/Wlog files include a lot of diving data which are not directly supported in Subsurface, in these cases we choose mostly to use "tags". The lack of some important info in Datatrak archives (e.g. tank's initial pressure) forces us to do some arbitrary assumptions (e.g. initial pressure = 200 bar). There might be archives coming directly from old DOS days, as first versions of Datatrak run on that OS; they were coded CP437 or CP850, while dive logs coming from Win versions seems to be coded CP1252. Finally, Wlog seems to use a mixed confusing style. Program directly converts some of the old encoded chars to iso8859 but is expected there be some issues with non alphabetic chars, e.g. "ª". There are two text fields: "Other activities" and "Dive notes", both limited to 256 char size. We have merged them in Subsurface's "Dive Notes" although the first one could be "tagged", but we're unsure that the user had filled it in a tag friendly way. WLog adds some information to the dive and lets the user to write more than 256 chars notes. This is achieved, while keeping compatibility with DTrak divelogs, by adding a complementary file named equally as the .log file and with .add extension where all this info is stored. We have, still, not worked with this complementary files. This work is based on the paper referenced in butracker #194 which has some errors (e.g. beginning of log and beginning of dive are changed) and a lot of bytes of unknown meaning. Example.log shows, at least, one more byte than those referred in the paper for the O2 Aladin computer, this could be a byte referred to the use of SCR but the lack of an OC dive with O2 computer makes impossible for us to compare. The only way we have figured out to distinguish a priori between SCR and non SCR dives with O2 computers is that the dives are tagged with a "rebreather" tag. Obviously this is not a very trusty way of doing things. In SCR dives, the O2% in mix means, probably, the maximum O2% in the circuit, not the O2% of the EAN mix in the tanks, which would be unknown in this case. The list of DCs related in bug #194 paper seems incomplete, we have added one or two from WLog and discarded those which are known to exist but whose model is unknown, grouping them under the imaginative name of "unknown". The list can easily be increased in the future if we ever know the models identifiers. BTW, in Example.log, 0x00 identifier is used for some DC dives and from my own divelogs is inferred that 0x00 is used for manually entered dives, this could easily be an error in Example.log coming from a preproduction DC model. Example.log which is shipped in datatrak package is included in dives directory for testing pourposes. [Dirk Hohndel: some small cleanups, merged with latest master, support divesites, remove the pointless memset() before free() calls add to cmake build] Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-24Cmake build now contains iconsGravatar Patrick Valsecchi
Fixed the icon problem Dirk found. We really should choose between qmake and cmake. I wouldn't care about cmake if qmake was building the UTs... From 8eeea28a523fd6ef588d81b82ab904d4512b3d7a Mon Sep 17 00:00:00 2001 From: Patrick Valsecchi <patrick@thus.ch> Date: Tue, 24 Feb 2015 09:06:37 +0100 Subject: [PATCH 3/3] Cmake build now contains icons Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-24Fixed cmake build.Gravatar Patrick Valsecchi
Non parallel build was broken because qthelper.cpp was depending indirectly on a QT generated file and no cmake dependency was enforcing the file to be generated before. I've removed the not needed #include that was introducing this dependency. In cmake, {FOO STREQUAL ""} is TRUE only if FOO is defined and empty. Fixed a couple of bad usages. Made the required libraries actually required in cmake. From ef5ab90f258c5754d3022a023c28050cbafed3d5 Mon Sep 17 00:00:00 2001 From: Patrick Valsecchi <patrick@thus.ch> Date: Tue, 24 Feb 2015 08:38:49 +0100 Subject: [PATCH 1/2] Fixed cmake build. Non parallel build was broken because qthelper.cpp was depending indirectly on a QT generated file and no cmake dependency was enforcing the file to be generated before. I've removed the not needed #include that was introducing this dependency. In cmake, {FOO STREQUAL ""} is TRUE only if FOO is defined and empty. Fixed a couple of bad usages. Made the required libraries actually required in cmake. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23Add LIBGITDEVEL support to CMakeLists.txtGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23Add new files to CMakeLists.txtGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23Add LIBMARBLEDEVEL support to cmakeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Start splitting out git repo helper routinesGravatar Linus Torvalds
This doesn't actually change any code, but it moves the 'is_git_repo()' function that is used by both loading and saving into a new git-access.c file. This is where I'll start doing remote repo syncing too. Knock wood. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-04More tolerant when parsing GPS coordinates.Gravatar Patrick Valsecchi
Refactored the parsing logic to make it more solid (no more guessing) and more flexible (support more formats). Added a test for checking that. Fixed a few warnings. [Dirk Hohndel: some changes to coding style] Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03Fix ssrf-version.h generation by cmake.Gravatar Patrick Valsecchi
My previous cmake patch was relying on ssrf-version.h to be generated correctly by qmake, in the source directory. This one fixes the generation of this file in the build directory. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-02Fixed CMakeLists.txt to work with Qt5Gravatar Patrick Valsecchi
Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Move the filters code to it's own file.Gravatar Tomaz Canabrava
We already have a bunch of filters, let's pack them together Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-07Added import for Liquivision LVD log filesGravatar John Van Ostrand
Support includes cylinder pressures and works for v3.0 log files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>