Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2017-03-26 23:21:25 +0300
committerMikkel Krautz <mikkel@krautz.dk>2017-03-26 23:21:25 +0300
commit029f0b8fc9e34bb6512388854efe2c91f064f391 (patch)
tree8b9af71a9d554724d76f3385e18b3afa12b7ce46 /qmake/protobuf.pri
parent0a497b0c8234335d39da853c54bf9da48d8e9ba1 (diff)
qmake/protobuf.pri: new file to include in .pro files for depending on protobuf.
This introduces a protobuf.pri helper that .pro files can include to depend on protobuf. Including protobuf.pri will link against the protobuf library, and include the proper headers.
Diffstat (limited to 'qmake/protobuf.pri')
-rw-r--r--qmake/protobuf.pri39
1 files changed, 39 insertions, 0 deletions
diff --git a/qmake/protobuf.pri b/qmake/protobuf.pri
new file mode 100644
index 000000000..7022fe649
--- /dev/null
+++ b/qmake/protobuf.pri
@@ -0,0 +1,39 @@
+# Copyright 2005-2017 The Mumble Developers. All rights reserved.
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file at the root of the
+# Mumble source tree or at <https://www.mumble.info/LICENSE>.
+
+include(pkgconfig.pri)
+
+# Include this file to portably link
+# against protobuf.
+#
+# It requires compiler.pri to be included
+# for $$PROTOBUF_PATH, etc. to work on win32.
+# This file can't include compiler.pri: it can
+# only be included once per .pro file.
+
+win32-msvc* {
+ # Legacy win32-static paths (protobuf 2.x)
+ INCLUDEPATH *= "$$PROTOBUF_PATH/vsprojects/include" "$$PROTOBUF_PATH/src" protobuf
+ CONFIG(debug, debug|release) {
+ QMAKE_LIBDIR *= "$$PROTOBUF_PATH/vsprojects/Debug"
+ } else {
+ QMAKE_LIBDIR *= "$$PROTOBUF_PATH/vsprojects/Release"
+ }
+
+ # New win32-static paths (protobuf 3.2+)
+ INCLUDEPATH *= "$$PROTOBUF_PATH/include"
+ QMAKE_LIBDIR *= "$$PROTOBUF_PATH/lib"
+
+ LIBS *= -llibprotobuf
+}
+
+win32-g++ {
+ LIBS *= -lprotobuf
+}
+
+unix {
+ CONFIG *= link_pkgconfig
+ must_pkgconfig(protobuf)
+}