"Initial commit to Gerrit"
[profile/ivi/gpsd.git] / libQgpsmm / libQgpsmm.pro
1 # -------------------------------------------------
2 # Project created by QtCreator 2010-03-26T10:37:44
3 # -------------------------------------------------
4 QT += network
5 QT -= gui
6 TARGET = Qgpsmm
7 TEMPLATE = lib
8 DEFINES += LIBQGPSMM_LIBRARY
9 DEFINES += USE_QT
10 DESTDIR = binaries
11 INCLUDEPATH += $$PWD \
12     ..
13
14 isEmpty( MAKE ) {
15     MAKE = make
16 }
17
18 SOURCES += \
19     gpsutils.cpp \
20     libgps_core.cpp \
21     ../libgpsmm.cpp \
22     ../libgps_json.c \
23     ../hex.c \
24     ../gpsd_report.c \
25     ../strl.c \
26     ../shared_json.c \
27     ../rtcm2_json.c \
28     ../ais_json.c \
29     ../json.c
30 HEADERS += libQgpsmm_global.h \
31     ../gps.h \
32     ../libgpsmm.h \
33     ../gps_json.h \
34     ../json.h
35
36 !win32 {
37
38     isEmpty( VERSION ) {
39         VERSION = $$system($${MAKE} -s -C .. print_libgps_VERSION)
40     }
41     HEADERS += \
42         ../gpsd.h \
43         ../ais_json.i
44
45     # Prefix: base instalation directory
46     isEmpty( PREFIX ) {
47         PREFIX = /usr/local
48     }
49     isEmpty( EXEC_PREFIX ) {
50         EXEC_PREFIX = $${PREFIX}
51     }
52     isEmpty( LIBDIR ) {
53         LIBDIR = /lib
54     }
55     isEmpty( INCLUDEDIR ) {
56         INCLUDEDIR = /include
57     }
58
59     # TARGET_LIBDIR and TARGET_INCLUDEDIR allow to override
60     # the library and header install paths.
61     # This is mainly a workaround as QT was not able to use the proper
62     # path on some platforms. Both TARGET_ variables will be
63     # set from the autotools generated Makefile.
64     # There should be a better way to handle this, though.
65     isEmpty( TARGET_LIBDIR ) {
66         TARGET_LIBDIR = $${EXEC_PREFIX}$${LIBDIR}
67     }
68     isEmpty( TARGET_INCLUDEDIR ) {
69         TARGET_INCLUDEDIR = $${PREFIX}$${INCLUDEDIR}
70     }
71     target.path = $${TARGET_LIBDIR}
72     INSTALLS += target
73
74     header.path = $${TARGET_INCLUDEDIR}
75     header.files = ../libgpsmm.h ../gps.h
76     INSTALLS += header
77
78     QMAKE_CFLAGS += -D_GNU_SOURCE
79
80 }
81
82 win32 {
83
84     include( mingw/version.pri )
85     HEADERS += \
86         gpsd.h \
87         mingw/ais_json.i
88
89     INCLUDEPATH = $$PWD/mingw $${INCLUDEPATH}
90
91     gpsdhcreate.target = gpsd.h
92     gpsdhcreate.commands = "copy /Y /B ..\gpsd.h-head + mingw\gpsd_config.h + ..\gpsd.h-tail  gpsd.h"
93     gpsdhcreate.depends = FORCE
94
95     PRE_TARGETDEPS += gpsd.h
96     QMAKE_EXTRA_TARGETS += gpsdhcreate
97
98 }