diff options
author | Jannis Voelker <jannis.voelker@basyskom.com> | 2018-02-05 16:26:49 +0100 |
---|---|---|
committer | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2018-02-14 10:07:05 +0000 |
commit | c3591fe77debc0eab79851bd8f0c050cd4f3f608 (patch) | |
tree | 4f8ad326706d1e268d7ae7a969427899e133dfe5 | |
parent | c5cd586c8c20a381e2f54e91693e794f03a651fb (diff) |
Use environment variables to locate open62541 for android and iOS
This patch adds QTOPCUA_OPEN62541_INCLUDE_PATH and
QTOPCUA_OPEN62541_LIB_PATH as a way to locate the open62541
library and header files when building qtopcua for android and iOS.
Change-Id: Iab77514312324996ec27df0ddcba4dcd6a4155dd
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
-rw-r--r-- | src/opcua/configure.json | 5 | ||||
-rw-r--r-- | src/opcua/configure.pri | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/opcua/configure.json b/src/opcua/configure.json index fb15b1e..6421ae3 100644 --- a/src/opcua/configure.json +++ b/src/opcua/configure.json @@ -30,6 +30,11 @@ { "libs": "-lopen62541 -lws2_32", "condition": "config.win32" + }, + { + "libs": "-lopen62541", + "condition": "config.android || config.ios", + "type": "open62541" } ] } diff --git a/src/opcua/configure.pri b/src/opcua/configure.pri new file mode 100644 index 0000000..1205ee8 --- /dev/null +++ b/src/opcua/configure.pri @@ -0,0 +1,22 @@ +# Add OPC UA SDKs using environment variable + +defineTest(qtConfLibrary_open62541) { + inc = $$getenv("QTOPCUA_OPEN62541_INCLUDE_PATH") + lib = $$getenv("QTOPCUA_OPEN62541_LIB_PATH") + + isEmpty(inc) { + qtLog("$QTOPCUA_OPEN62541_INCLUDE_PATH is not set.") + return(false) + } + + isEmpty(lib) { + qtLog("$QTOPCUA_OPEN62541_LIB_PATH is not set.") + return(false) + } + + $${1}.libs += -L$${lib} + $${1}.includedir = $${inc} + export($${1}.libs) + export($${1}.includedir) + return(true) +} |