Compare commits

...

8 Commits

2 changed files with 20 additions and 4 deletions

View File

@ -41,7 +41,14 @@ jobs:
version: '6.4.0' version: '6.4.0'
target: 'android' target: 'android'
arch: 'android_arm64_v8a' arch: 'android_arm64_v8a'
- name: Install Android Google Protocol Buffers
run: git clone https://github.com/tumic0/android_protobuf.git
- name: Configure build - name: Configure build
run: qmake pbfplugin.pro run: qmake pbfplugin.pro PROTOBUF=android_protobuf
- name: Build project - name: Build project
run: make -j2 run: make -j2
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: libplugins_imageformats_libpbf_arm64-v8a.so
path: plugins/libpbf/libplugins_imageformats_libpbf_arm64-v8a.so

View File

@ -39,9 +39,12 @@ RESOURCES += pbfplugin.qrc
DEFINES += QT_NO_DEPRECATED_WARNINGS DEFINES += QT_NO_DEPRECATED_WARNINGS
unix:!macx{ unix:!macx:!android {
LIBS += -lprotobuf-lite \ LIBS += -lprotobuf-lite \
-lz -lz
target.path += $$[QT_INSTALL_PLUGINS]/imageformats
INSTALLS += target
} }
win32 { win32 {
INCLUDEPATH += $$PROTOBUF/include \ INCLUDEPATH += $$PROTOBUF/include \
@ -58,6 +61,12 @@ macx {
LIBS += $$PROTOBUF/lib/libprotobuf-lite.a \ LIBS += $$PROTOBUF/lib/libprotobuf-lite.a \
-lz -lz
} }
android {
INCLUDEPATH += $$PROTOBUF/include
LIBS += $$PROTOBUF/$$ANDROID_TARGET_ARCH/libprotobuf-lite.a \
-lz
target.path += $$[QT_INSTALL_PLUGINS]/imageformats top_builddir=$$shadowed($$PWD)
INSTALLS += target DESTDIR = $$top_builddir/plugins/libpbf
TARGET = $$qt5LibraryTarget(libpbf, "plugins/imageformats/")
}