Commit graph

19 commits

Author SHA1 Message Date
Lubomir I. Ivanov
af97020634 subsurface-configure.pri: exclude -Wno-maybe-uninitialized on win32
On native Windows the suggested compiler for Qt4.8 is mingw-gcc-4.4.0,
which does not has the -Wno-maybe-uninitialized flag (yet).

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:29:18 -08:00
Dirk Hohndel
33b15ea906 Silence some warnings when building on Mac
The *-clang* selector doesn't appear to work correctly in my build environment
(or I just don't understand how it is supposed to work). Either way, making
this conditional on !mac works.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 05:03:56 -08:00
Lubomir I. Ivanov
b589dedf3c subsurface-configure.pri: fix for the QMAKE_HOST.os check
Looks like having $$ before QMAKE_HOST.os does not work.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13 11:31:06 -07:00
Dirk Hohndel
35952a59d0 Get cross build to work again
...and re-enable silent mode by default for cross builds

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11 13:33:38 -07:00
Lubomir I. Ivanov
8b517f8081 subsurface-configure.pri: disable auto-"silent" mode for win32
Certain versions of mingw32-make will try to "CreateProcess"
passing the contents of CC and CXX. On win32, with CONFIG += silent
CC and CXX become composite containing multiple commands
such as "@echo... && gcc", which produces undesired results.

For the time being, do not automatically enable "silent" mode
if the current OS is win32. Possibly a better solution can be
found later on.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10 07:14:59 -07:00
Thiago Macieira
1a98e049dc Try to read the libdivecomputer.la file (created by GNU libtool)
Getting dependency information for static libraries requires extra
files. Libtool creates .la files, which are "industry standard". qmake
has its own .prl files, but it can create .la in a pinch if necessary.

This change allows us to get the actual dependency information from
libdivecomputer, without having to guess whether it linked to something
else or not. If it changes in the future, we shouldn't have to do
anything.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 17:43:42 -07:00
Dirk Hohndel
cf2dc742f4 We already try to link against libusb anyway
No need for the special case here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 16:11:42 -07:00
Dirk Hohndel
7db3093b1b Try hard not to link against a shared libdivecomputer
Versioning is wrong. It's not a library shared with other projects. And at
least on Mac and Windows we bundle it with the app, anyway.

Requested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 16:07:18 -07:00
Lubomir I. Ivanov
a3d279b776 subsurface-configure.pri: add a libiconv dependency
This is a bit crude of a solution, but the Win32 version
of libxml (or at least some versions) seem to require libiconv,
thus we add the library with pkg-config if it is available.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 15:47:31 -07:00
Lubomir I. Ivanov
d63327469b subsurface-configure.pri: add another libxml/libxslt detection stage
libxml and libxslt use custom -config scripts which brake
qmake and make on Win32. The output of executing a .sh or .cmd
script with the same name produces garbled output. The output
of executables with the same name is untested, but a bit excessive
as a solution.

To work around the issue add another detection stage, which checks
if the previous output from (e.g.) xml2-config is empty and try
to use pkg-config instead.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 15:47:29 -07:00
Lubomir I. Ivanov
19c62bc509 subsurface-configure.pri: enable the libusb detection stage
The commented out step should work as expected (in theory).

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 15:47:23 -07:00
Lubomir I. Ivanov
a3ee9a1142 subsurface-configure.pri: pkg-config detection change
This is a small change, but it seems to work as expected on both
Linux and Win32. What happens if 2> NUL > NUL is used on Win32
for cmd.exe is that the output of both stdout and stderr seems
to pipe into NUL and pkg-config is always reported as missing.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 15:47:20 -07:00
Dirk Hohndel
fbb3d80d9b Don't set -Wno-maybe-uninitialized for clang
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 13:21:16 -07:00
Thiago Macieira
9f582f76d0 Turn down warnings with Clang too
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 10:34:10 -07:00
Dirk Hohndel
97f3b3b747 Turn down warnings (after going through them)
This was getting way too noisy with tons of false positives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 08:11:50 -07:00
Anton Lundin
cfbbf1bffe Link static to libdivecomputer
In previous build system we linked static to libdivecomputer, so start
doing that again.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 07:29:42 -07:00
Thiago Macieira
dddcd10162 Turn off exceptions in C++
We don't use them in our code and Qt doesn't throw either, so save a
few bytes and maybe a few setjump() calls on Windows.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:45:38 -07:00
Thiago Macieira
f51f5d581e Don't turn warnings on in Subsurface's build
We're getting a ton of them and they're mostly harmless. I've already
turned on the ones that are problematic (with -Werror even).

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:44:45 -07:00
Thiago Macieira
67e49d6480 Implement a qmake-based build for Subsurface
This is working for me, but requires a bit more testing. To build,
run:
  qmake [options]

Where options might be:
  V=1               disable "silent" build
  LIBDCDEVEL=1      use side-by-side libdivecomputer
  INCLUDEPATH+=xxx  add -Ixxx (e.g., INCLUDEPATH+=/usr/local/marble/include)
  LIBS+=xxx         add xxx to the linker flags (e.g. LIBS+=-L/usr/local/marble/lib)
  or any other qmake option, including debug and release options

If your distribution is already using qtchooser in place of qmake, you
may need to pass an extra option to qmake to select the a
cross-build. For example:

  qmake -qt=i686-w64-mingw32-qt4

If your distribution is not yet using qtchooser, then you need to file
a bug report requesting it and you need to run the full path to qmake.

Note:
 - there are some ### left in the buildsystem

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:29:33 -07:00