diff --git a/.gitmodules b/.gitmodules index 95b1073..bf529ba 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "maplibre-native-qt"] path = maplibre-native-qt url = https://github.com/maplibre/maplibre-native-qt.git +[submodule "libzip"] + path = libzip + url = https://github.com/nih-at/libzip.git +[submodule "zlib"] + path = zlib + url = https://github.com/madler/zlib.git diff --git a/buildscript-android.sh b/buildscript-android.sh new file mode 100755 index 0000000..f631b29 --- /dev/null +++ b/buildscript-android.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Fail on first error +set -e + + +for PLATFORM in android_armv7 android_arm64_v8a android_x86 android_x86_64 +do + echo + echo "Android ARMv7" + + $Qt6_DIR_BASE/$PLATFORM/bin/qt-cmake \ + -S maplibre-native-qt \ + -B build-maplibre-native-qt-$PLATFORM \ + -G Ninja \ + -DBUILD_TESTING=OFF \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_PREFIX_PATH=$Qt6_DIR_BASE/$PLATFORM \ + -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/$PLATFORM + cmake --build build-maplibre-native-qt-$PLATFORM + cmake --install build-maplibre-native-qt-$PLATFORM +done diff --git a/buildscript-ios.sh b/buildscript-ios.sh new file mode 100755 index 0000000..b845c41 --- /dev/null +++ b/buildscript-ios.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Fail on first error +set -e + + +echo +echo "zlib - static for arm64 and x86_64 on iOS" + +$Qt6_DIR_BASE/ios/bin/qt-cmake \ + -G Ninja \ + -S zlib \ + -B build-zlib-iOS \ + -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ + -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/ios +cmake --build build-zlib-iOS +cmake --install build-zlib-iOS + +echo +echo "libzip - static for arm64 and x86_64 on iOS" + +$Qt6_DIR_BASE/ios/bin/qt-cmake \ + -G Ninja \ + -S libzip \ + -B build-libzip-iOS \ + -DBUILD_DOC=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_REGRESS=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_TOOLS=OFF \ + -DENABLE_BZIP2=OFF \ + -DENABLE_LZMA=OFF \ + -DENABLE_ZSTD=OFF \ + -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ + -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/ios +cmake --build build-libzip-iOS +cmake --install build-libzip-iOS diff --git a/buildscript-linux.sh b/buildscript-linux.sh new file mode 100755 index 0000000..8d4f128 --- /dev/null +++ b/buildscript-linux.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Fail on first error +set -e + + +echo +echo "Linux Desktop" + +$Qt6_DIR_BASE/gcc_64/bin/qt-cmake \ + -S maplibre-native-qt \ + -B build-maplibre-native-qt-linux \ + -G Ninja \ + -DMLN_QT_WITH_INTERNAL_ICU=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_PREFIX_PATH=$Qt6_DIR_BASE/gcc_64 \ + -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/gcc_64 +cmake --build build-maplibre-native-qt-linux +cmake --install build-maplibre-native-qt-linux diff --git a/buildscript-macos.sh b/buildscript-macos.sh new file mode 100755 index 0000000..7a1ae82 --- /dev/null +++ b/buildscript-macos.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Fail on first error +set -e + + +echo +echo "maplibre for macOS Desktop" + +$Qt6_DIR_BASE/macos/bin/qt-cmake \ + -S maplibre-native-qt \ + -B build-maplibre-native-qt-macOS \ + -G Ninja \ + -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ + -DBUILD_TESTING=OFF \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/macos +cmake --build build-maplibre-native-qt-macOS +cmake --install build-maplibre-native-qt-macOS diff --git a/buildscript-maplibre-linux.sh b/buildscript-maplibre-linux.sh deleted file mode 100755 index a381e30..0000000 --- a/buildscript-maplibre-linux.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# Fail on first error -set -e - - -# -# The Linux Desktop binary needs MLN_QT_WITH_INTERNAL_ICU -# - -echo -echo "Linux Desktop" -mkdir -p build-maplibre-native-qt-linux -$Qt6_DIR_BASE/gcc_64/bin/qt-cmake \ - -S maplibre-native-qt \ - -B build-maplibre-native-qt-linux \ - -G Ninja \ - -DMLN_QT_WITH_INTERNAL_ICU=ON \ - -DBUILD_TESTING=OFF \ - -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_PREFIX_PATH=$Qt6_DIR_BASE/gcc_64 \ - -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/gcc_64 -cmake --build build-maplibre-native-qt-linux -cmake --install build-maplibre-native-qt-linux - - -# -# The Android binaries all need identical CMAKE configurations -# - -for PLATFORM in android_armv7 android_arm64_v8a android_x86 android_x86_64 -do - echo - echo "Android ARMv7" - mkdir -p build-maplibre-native-qt-$PLATFORM - $Qt6_DIR_BASE/$PLATFORM/bin/qt-cmake \ - -S maplibre-native-qt \ - -B build-maplibre-native-qt-$PLATFORM \ - -G Ninja \ - -DBUILD_TESTING=OFF \ - -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_PREFIX_PATH=$Qt6_DIR_BASE/$PLATFORM \ - -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/$PLATFORM - cmake --build build-maplibre-native-qt-$PLATFORM - cmake --install build-maplibre-native-qt-$PLATFORM -done diff --git a/buildscript-maplibre-macos.sh b/buildscript-maplibre-macos.sh deleted file mode 100755 index e911050..0000000 --- a/buildscript-maplibre-macos.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -# Fail on first error -set -e - - -# -# macOS -# - -echo -echo "macOS Desktop" -mkdir -p build-maplibre-native-qt-macOS -$Qt6_DIR_BASE/macos/bin/qt-cmake \ - -S maplibre-native-qt \ - -B build-maplibre-native-qt-macOS \ - -G Ninja \ - -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ - -DBUILD_TESTING=OFF \ - -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/macos -cmake --build build-maplibre-native-qt-macOS -cmake --install build-maplibre-native-qt-macOS - - -# -# iOS -# - -echo -echo "iOS" -mkdir -p build-maplibre-native-qt-iOS -$Qt6_DIR_BASE/macos/bin/qt-cmake \ - -S maplibre-native-qt \ - -B build-maplibre-native-qt-iOS \ - -G "Ninja Multi-Config" \ - -DCMAKE_CONFIGURATION_TYPES="Release;Debug" \ - -DBUILD_TESTING=OFF \ - -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/ios -cmake --build build-maplibre-native-qt-iOS -cmake --install build-maplibre-native-qt-iOS - - -# -# The Android binaries all need identical CMAKE configurations -# - -for PLATFORM in android_armv7 android_arm64_v8a android_x86 android_x86_64 -do - echo - echo "Android ARMv7" - mkdir -p build-maplibre-native-qt-$PLATFORM - $Qt6_DIR_BASE/$PLATFORM/bin/qt-cmake \ - -S maplibre-native-qt \ - -B build-maplibre-native-qt-$PLATFORM \ - -G Ninja \ - -DBUILD_TESTING=OFF \ - -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ - -DCMAKE_PREFIX_PATH=$Qt6_DIR_BASE/$PLATFORM \ - -DCMAKE_INSTALL_PREFIX=$Qt6_DIR_BASE/$PLATFORM - cmake --build build-maplibre-native-qt-$PLATFORM - cmake --install build-maplibre-native-qt-$PLATFORM -done diff --git a/libzip b/libzip new file mode 160000 index 0000000..0b6ebe6 --- /dev/null +++ b/libzip @@ -0,0 +1 @@ +Subproject commit 0b6ebe6fad8adb1ec95bb5529c5af2185d40c2cf diff --git a/zlib b/zlib new file mode 160000 index 0000000..643e17b --- /dev/null +++ b/zlib @@ -0,0 +1 @@ +Subproject commit 643e17b7498d12ab8d15565662880579692f769d