Compare commits

...

4 Commits

2 changed files with 27 additions and 13 deletions

View File

@ -16,13 +16,14 @@ install:
- cmd: |-
set PATH=%QTDIR%\bin;%VCPKGDIR%\tools\protobuf;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat
vcpkg install pkgconf:x64-windows-static-md-release
vcpkg install protobuf:x64-windows-static-md-release
vcpkg install zlib:x64-windows-static-md-release
copy /y %VCPKGDIR%\lib\zlib.lib %VCPKGDIR%\lib\zlibstatic.lib
build_script:
- cmd: |-
qmake PROTOBUF=%VCPKGDIR% ZLIB=%VCPKGDIR% pbfplugin.pro
qmake USE_PKGCONFIG=true pbfplugin.pro
nmake release
artifacts:

View File

@ -39,32 +39,45 @@ RESOURCES += pbfplugin.qrc
DEFINES += QT_NO_DEPRECATED_WARNINGS
equals(USE_PKGCONFIG, "true") {
CONFIG += link_pkgconfig
PKGCONFIG += protobuf-lite zlib
}
unix:!macx:!android {
LIBS += -lprotobuf-lite \
-lz
!equals(USE_PKGCONFIG, "true") {
LIBS += -lprotobuf-lite \
-lz
}
target.path += $$[QT_INSTALL_PLUGINS]/imageformats
INSTALLS += target
}
win32 {
INCLUDEPATH += $$PROTOBUF/include \
$$ZLIB/include
LIBS += $$PROTOBUF/lib/libprotobuf-lite.lib \
$$ZLIB/lib/zlibstatic.lib
!equals(USE_PKGCONFIG, "true") {
INCLUDEPATH += $$PROTOBUF/include \
$$ZLIB/include
LIBS += $$PROTOBUF/lib/libprotobuf-lite.lib \
$$ZLIB/lib/zlibstatic.lib
}
QMAKE_TARGET_PRODUCT = QtPBFImagePlugin
QMAKE_TARGET_DESCRIPTION = Qt $$QT_VERSION MVT/PBF image plugin
QMAKE_TARGET_COPYRIGHT = Copyright (c) 2018-2025 Martin Tuma
}
macx {
INCLUDEPATH += $$PROTOBUF/include
LIBS += $$PROTOBUF/lib/libprotobuf-lite.a \
-lz
!equals(USE_PKGCONFIG, "true") {
INCLUDEPATH += $$PROTOBUF/include
LIBS += $$PROTOBUF/lib/libprotobuf-lite.a \
-lz
}
}
android {
INCLUDEPATH += $$PROTOBUF/include
LIBS += $$PROTOBUF/$$ANDROID_TARGET_ARCH/libprotobuf-lite.a \
-lz
!equals(USE_PKGCONFIG, "true") {
INCLUDEPATH += $$PROTOBUF/include
LIBS += $$PROTOBUF/$$ANDROID_TARGET_ARCH/libprotobuf-lite.a \
-lz
}
top_builddir=$$shadowed($$PWD)
DESTDIR = $$top_builddir/plugins