mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2025-01-18 12:02:10 +01:00
Added build option to link using PKGCONFIG
This commit is contained in:
parent
cc2b03423b
commit
4653525da8
@ -22,7 +22,7 @@ install:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmd: |-
|
- cmd: |-
|
||||||
qmake PROTOBUF=%VCPKGDIR% ZLIB=%VCPKGDIR% ABSEIL=%VCPKGDIR% pbfplugin.pro
|
qmake USE_PKGCONFIG=true pbfplugin.pro
|
||||||
nmake release
|
nmake release
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -39,20 +39,26 @@ RESOURCES += pbfplugin.qrc
|
|||||||
|
|
||||||
DEFINES += QT_NO_DEPRECATED_WARNINGS
|
DEFINES += QT_NO_DEPRECATED_WARNINGS
|
||||||
|
|
||||||
|
equals(USE_PKGCONFIG, "true") {
|
||||||
|
CONFIG += link_pkgconfig
|
||||||
|
PKGCONFIG += protobuf-lite zlib
|
||||||
|
}
|
||||||
|
|
||||||
unix:!macx:!android {
|
unix:!macx:!android {
|
||||||
|
!equals(USE_PKGCONFIG, "true") {
|
||||||
LIBS += -lprotobuf-lite \
|
LIBS += -lprotobuf-lite \
|
||||||
-lz
|
-lz
|
||||||
|
}
|
||||||
|
|
||||||
target.path += $$[QT_INSTALL_PLUGINS]/imageformats
|
target.path += $$[QT_INSTALL_PLUGINS]/imageformats
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
}
|
}
|
||||||
win32 {
|
win32 {
|
||||||
|
!equals(USE_PKGCONFIG, "true") {
|
||||||
INCLUDEPATH += $$PROTOBUF/include \
|
INCLUDEPATH += $$PROTOBUF/include \
|
||||||
$$ZLIB/include
|
$$ZLIB/include
|
||||||
LIBS += $$PROTOBUF/lib/libprotobuf-lite.lib \
|
LIBS += $$PROTOBUF/lib/libprotobuf-lite.lib \
|
||||||
$$ZLIB/lib/zlibstatic.lib
|
$$ZLIB/lib/zlibstatic.lib
|
||||||
!isEmpty(ABSEIL) {
|
|
||||||
LIBS += $$ABSEIL/lib/libabsl.lib
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMAKE_TARGET_PRODUCT = QtPBFImagePlugin
|
QMAKE_TARGET_PRODUCT = QtPBFImagePlugin
|
||||||
@ -60,14 +66,18 @@ win32 {
|
|||||||
QMAKE_TARGET_COPYRIGHT = Copyright (c) 2018-2025 Martin Tuma
|
QMAKE_TARGET_COPYRIGHT = Copyright (c) 2018-2025 Martin Tuma
|
||||||
}
|
}
|
||||||
macx {
|
macx {
|
||||||
|
!equals(USE_PKGCONFIG, "true") {
|
||||||
INCLUDEPATH += $$PROTOBUF/include
|
INCLUDEPATH += $$PROTOBUF/include
|
||||||
LIBS += $$PROTOBUF/lib/libprotobuf-lite.a \
|
LIBS += $$PROTOBUF/lib/libprotobuf-lite.a \
|
||||||
-lz
|
-lz
|
||||||
|
}
|
||||||
}
|
}
|
||||||
android {
|
android {
|
||||||
|
!equals(USE_PKGCONFIG, "true") {
|
||||||
INCLUDEPATH += $$PROTOBUF/include
|
INCLUDEPATH += $$PROTOBUF/include
|
||||||
LIBS += $$PROTOBUF/$$ANDROID_TARGET_ARCH/libprotobuf-lite.a \
|
LIBS += $$PROTOBUF/$$ANDROID_TARGET_ARCH/libprotobuf-lite.a \
|
||||||
-lz
|
-lz
|
||||||
|
}
|
||||||
|
|
||||||
top_builddir=$$shadowed($$PWD)
|
top_builddir=$$shadowed($$PWD)
|
||||||
DESTDIR = $$top_builddir/plugins
|
DESTDIR = $$top_builddir/plugins
|
||||||
|
Loading…
x
Reference in New Issue
Block a user