diff --git a/docker/android-armv8a-go1.23-qt5.15-dynamic.Dockerfile b/docker/android-armv8a-go1.23-qt5.15-dynamic.Dockerfile index f392479e..8f581342 100644 --- a/docker/android-armv8a-go1.23-qt5.15-dynamic.Dockerfile +++ b/docker/android-armv8a-go1.23-qt5.15-dynamic.Dockerfile @@ -9,9 +9,16 @@ COPY cmd/android-mktemplate/android-mktemplate.sh /usr/local/bin/android-mktempl ENV PATH=/usr/local/go/bin:/opt/cmake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/Qt-5.15.13/bin:/opt/android-sdk/cmdline-tools/tools/bin:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/opt/android-sdk/platform-tools +# The pkg-config definitions were all installed with platform-specific suffixes +# (i.e. need to use Qt5Widgets_arm64-v8a instead of Qt5Widgets) +# This container is targeting armv8-a, so set up simple symlinks +RUN /bin/bash -c 'cd /usr/local/Qt-5.15.13/lib/pkgconfig ; for f in *_arm64-v8a.pc ; do cp $f "$(basename -s _arm64-v8a.pc "$f").pc"; done' + ENV CC=/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang ENV CXX=/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++ ENV CGO_ENABLED=1 ENV GOOS=android ENV GOARCH=arm64 -ENV GOFLAGS=-buildvcs=false \ No newline at end of file +ENV GOFLAGS=-buildvcs=false +ENV PKG_CONFIG_PATH=/usr/local/Qt-5.15.13/lib/pkgconfig +ENV CGO_CXXFLAGS="-Wno-ignored-attributes -D_Bool=bool" diff --git a/qt/cflags.go b/qt/cflags.go index f10f6a66..27de3be3 100644 --- a/qt/cflags.go +++ b/qt/cflags.go @@ -1,5 +1,3 @@ -// +build linux,!android windows darwin - package qt /* diff --git a/qt/cflags_android.go b/qt/cflags_android.go deleted file mode 100644 index 7103b856..00000000 --- a/qt/cflags_android.go +++ /dev/null @@ -1,9 +0,0 @@ -package qt - -/* - -#cgo CXXFLAGS: -fPIC -DQT_WIDGETS_LIB -I/usr/local/Qt-5.15.13/include/QtWidgets -I/usr/local/Qt-5.15.13/include/ -I/usr/local/Qt-5.15.13/include/QtCore -DQT_GUI_LIB -I/usr/local/Qt-5.15.13/include/QtGui -DQT_CORE_LIB -#cgo LDFLAGS: /usr/local/Qt-5.15.13/lib/libQt5Widgets_arm64-v8a.so /usr/local/Qt-5.15.13/lib/libQt5Gui_arm64-v8a.so /usr/local/Qt-5.15.13/lib/libQt5Core_arm64-v8a.so /usr/local/Qt-5.15.13/lib/libQt5Svg_arm64-v8a.so /usr/local/Qt-5.15.13/lib/libQt5AndroidExtras_arm64-v8a.so - -*/ -import "C"