summaryrefslogtreecommitdiffstats
path: root/src/serialport/serialport-lib.pri
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2013-10-25 00:22:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-28 15:36:30 +0100
commitd4c0885256f3005a8758153c1b82d467ee87478d (patch)
treedb5a0db2ecfcaf77e60497bf4f136ec05c01cc2a /src/serialport/serialport-lib.pri
parent609b5c9fa7ba47157e1e1831270e2a2bd926b460 (diff)
Add support for loading udev at run-time
QtSerialPort is linked against udev by default if the development files can be detected on the system. The reason for this is that, it is more common to link against udev than loading it at run-time. People will usually use distribution packages where there cannot be inconsistency between different versions, and hence ABI breaks, etc. The relevant LINK_LIBUDEV variable will be set. This can be overridden by defining LOAD_LIBUDEV for qmake: qmake "DEFINES += LOAD_LIBUDEV" -r It is also worth noting that the common code is separated into a private header, and it can be included for either type of libudev usage. There is no need for its user to handle the compile-time linking or run-time loading separately on top of that. Task-number: QTBUG-34329 Change-Id: I45ffaaede2a74498587a6452fbe3fec7eaf83483 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src/serialport/serialport-lib.pri')
-rw-r--r--src/serialport/serialport-lib.pri4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serialport/serialport-lib.pri b/src/serialport/serialport-lib.pri
index 78f4139c..f9d0af3f 100644
--- a/src/serialport/serialport-lib.pri
+++ b/src/serialport/serialport-lib.pri
@@ -1,10 +1,10 @@
INCLUDEPATH += $$PWD
-unix {
+!contains(DEFINES, LOAD_LIBUDEV): unix {
CONFIG += link_pkgconfig
packagesExist(libudev) {
- DEFINES += HAVE_LIBUDEV
+ DEFINES += LINK_LIBUDEV
PKGCONFIG += libudev
}
}