diff --git a/qmsgpack.pri b/qmsgpack.pri index 76039ee..c0caae2 100644 --- a/qmsgpack.pri +++ b/qmsgpack.pri @@ -1,4 +1,4 @@ -QT += core location +QT += core DEFINES += MSGPACK_MAKE_LIB @@ -12,8 +12,7 @@ SOURCES += \ $$PWD/src/private/qt_types_p.cpp \ $$PWD/src/msgpackstream.cpp \ $$PWD/src/stream/time.cpp \ - $$PWD/src/stream/geometry.cpp \ - $$PWD/src/stream/location.cpp + $$PWD/src/stream/geometry.cpp HEADERS += \ $$PWD/src/msgpack.h \ @@ -24,6 +23,12 @@ HEADERS += \ $$PWD/src/msgpack_export.h \ $$PWD/src/private/qt_types_p.h \ $$PWD/src/msgpackstream.h \ - $$PWD/src/stream/location.h \ $$PWD/src/stream/time.h \ $$PWD/src/stream/geometry.h + +qtHaveModule(location) { + QT += location + + SOURCES += $$PWD/src/stream/location.cpp + HEADERS += $$PWD/src/stream/location.h +} diff --git a/src/src.pro b/src/src.pro index 7a9de2e..f3008b1 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,4 +1,4 @@ -QT += core gui location +QT += core gui TARGET = qmsgpack CONFIG -= app_bundle @@ -21,8 +21,7 @@ SOURCES += msgpack.cpp \ private/qt_types_p.cpp \ msgpackstream.cpp \ stream/time.cpp \ - stream/geometry.cpp \ - stream/location.cpp + stream/geometry.cpp HEADERS += \ msgpack.h \ @@ -33,7 +32,6 @@ HEADERS += \ msgpack_export.h \ private/qt_types_p.h \ msgpackstream.h \ - stream/location.h \ stream/time.h \ stream/geometry.h @@ -45,9 +43,16 @@ HEADERS_INSTALL = \ msgpackstream.h \ STREAM_HEADERS_INSTALL = \ - stream/location.h \ stream/time.h +location { + QT += location + + SOURCES += stream/location.cpp + HEADERS += stream/location.h + STREAM_HEADERS_INSTALL += stream/location.h +} + unix { header_files.files = $$HEADERS_INSTALL header_files.path = /usr/include/qmsgpack