summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@qt.io>2018-05-14 11:12:54 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-05-14 19:06:21 +0000
commit36e7b1925e2ff2df167280eb3592b99697a1234d (patch)
tree3e5626e955e8a74ad89624146afbd9646611dfc3 /src
parent9894e604dff2bf9fe9961b475a678938316154f1 (diff)
downloadqttools-36e7b1925e2ff2df167280eb3592b99697a1234d.tar.gz
Allow to link qdoc dynamically to libclang
For releasing we want to link qdoc statically to libclang and ship a "fat" binary, which allows us to not distribute separate libclang. In the same time our users may want to link qdoc to an existing libclang binary. Both cases make sense, especially that the static build required some invasive patches in libclang. Partially reverts fddf7ee536e4fd0061d0ee933707881cebe54223 Task-number: QTBUG-68178 Change-Id: Iaeab59c40b881907f0fd5f3ccefb6700dcd2dded Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qdoc/qdoc.pro14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/qdoc/qdoc.pro b/src/qdoc/qdoc.pro
index 1475a441d..b35897c26 100644
--- a/src/qdoc/qdoc.pro
+++ b/src/qdoc/qdoc.pro
@@ -14,12 +14,14 @@ qtHaveModule(qmldevtools-private) {
LIBS += $$CLANG_LIBS
!contains(QMAKE_DEFAULT_INCDIRS, $$CLANG_INCLUDEPATH): INCLUDEPATH += $$CLANG_INCLUDEPATH
-# Support static libclang linking on different platforms
-equals(QMAKE_HOST.os, Windows): {
- DEFINES += CINDEX_LINKAGE=
-} else {
- LIBS += -lz -ldl
- equals(QMAKE_HOST.os, Darwin): LIBS += -lcurses -lm -lxml2
+!isEmpty(QDOC_USE_STATIC_LIBCLANG) {
+ # Support static libclang linking on different platforms
+ equals(QMAKE_HOST.os, Windows) {
+ DEFINES += CINDEX_LINKAGE=
+ } else {
+ LIBS += -lz -ldl
+ equals(QMAKE_HOST.os, Darwin): LIBS += -lcurses -lm -lxml2
+ }
}
!contains(QMAKE_DEFAULT_LIBDIRS, $$CLANG_LIBDIR):!disable_external_rpath: QMAKE_RPATHDIR += $$CLANG_LIBDIR