diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 7cfd40304..1141fc782 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,7 +1,10 @@ -name: Android +name: Android Build on: push: paths: + - 'vcpkg/**' + - 'vcpkg.json' + - 'VCPKG_BASELINE' - 'app/**' - 'core/**' - 'scripts/**' @@ -21,31 +24,35 @@ concurrency: jobs: android_build: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) + strategy: + fail-fast: false + matrix: + include: + - TRIPLET: 'arm-android' + ANDROID_ABI: 'armeabi-v7a' + - TRIPLET: 'arm64-android' + ANDROID_ABI: 'arm64-v8a' + runs-on: macos-15 env: - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change NDK_VERSION: 'r27' # '27.2.12479018' NDK_VERSION_FULL: r27c JDK_VERSION: 17 SDK_PLATFORM: android-35 - SDK_BUILD_TOOLS: 35.0.0 - INPUT_SDK_VERSION_ARM: arm-android-20250326-241 - INPUT_SDK_VERSION_ARM64: arm64-android-20250326-241 - CCACHE_DIR: /Users/runner/work/ccache - GITHUB_TOKEN: ${{ secrets.INPUTAPP_BOT_GITHUB_TOKEN }} - CACHE_VERSION: 0 - CMAKE_VERSION: '3.29.0' + ANDROIDAPI: 24 + VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' + SDK_BUILD_TOOLS: 34.0.0 + CMAKE_VERSION: '3.31.6' QT_ANDROID_KEYSTORE_ALIAS: input QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.INPUTKEYSTORE_STOREPASS }} QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.INPUTKEYSTORE_STOREPASS }} XC_VERSION: ${{ '16.2' }} + VCPKG_ROOT: "${{ github.workspace }}/vcpkg" steps: - uses: actions/checkout@v4 - - - name: Disk space before cleanup - run: | - df -h . + with: + path: mm # # Free up space by removing unused XCode versions @@ -58,51 +65,14 @@ jobs: run: | find /Applications/Xcode_* -maxdepth 0 -type d ! -name 'Xcode_${{ env.XC_VERSION }}.app' -exec rm -rf {} \; - - name: Disk space after cleanup - run: | - df -h . - - # CCache - - name: Prepare build cache for pull request - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name == 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - key: build-android-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }} - # The head_ref or source branch of the pull request in a workflow run. - # The base_ref or target branch of the pull request in a workflow run. - restore-keys: | - build-android-ccache-${{ github.actor }}-${{ github.head_ref }}- - build-android-ccache-refs/heads/${{ github.base_ref }}- - build-android-ccache-refs/heads/master- - - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name != 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: build-android-ccache-${{ github.ref }}-${{ github.sha }} - restore-keys: | - build-android-ccache-${{ github.ref }}- - build-android-ccache-refs/heads/master- - - - name: Install ccache - run: | - mkdir -p ${CCACHE_DIR} - brew install ccache - ccache --set-config=max_size=2.0G - ccache -s - - name: Install Build Dependencies run: | - brew update - + brew uninstall cmake brew install gnupg - brew install openssl - brew install ninja - brew install aqtinstall + brew install automake bison flex gnu-sed autoconf-archive libtool gettext lcov openssl mono + echo $(brew --prefix bison)/bin >> $GITHUB_PATH + echo $(brew --prefix flex)/bin >> $GITHUB_PATH + echo $(brew --prefix gettext)/bin >> $GITHUB_PATH if [[ ${{ github.ref }} == refs/tags/* ]] then @@ -117,43 +87,34 @@ jobs: echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV - - name: Install CMake and Ninja uses: lukka/get-cmake@latest with: cmakeVersion: ${{ env.CMAKE_VERSION }} - - name: Setup compiler - uses: maxim-lobanov/setup-xcode@v1 + - name: Setup XCode + uses: maxim-lobanov/setup-xcode@v1.6.0 with: xcode-version: ${{ env.XC_VERSION }} - - name: Cache Qt - id: cache-qt - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ github.workspace }}/Qt - key: ${{ runner.os }}-QtCache-v6-${{ env.QT_VERSION }}-android - - - name: Install Qt - if: steps.cache-qt.outputs.cache-hit != 'true' + - name: Extract Mergin API_KEY + env: + MERGINSECRETS_DECRYPT_KEY: ${{ secrets.MERGINSECRETS_DECRYPT_KEY }} run: | - aqt install-qt \ - mac android ${{ env.QT_VERSION }} android_arm64_v8a \ - -m qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth \ - -O ${{ github.workspace }}/Qt - - aqt install-qt \ - mac android ${{ env.QT_VERSION }} android_armv7 \ - -m qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth \ - -O ${{ github.workspace }}/Qt - - aqt install-qt \ - mac desktop ${{ env.QT_VERSION }} \ - -m qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth \ - -O ${{ github.workspace }}/Qt - - # Android SDK & NDK + cd mm/core/ + $HOMEBREW_PREFIX/bin/openssl \ + aes-256-cbc -d \ + -in merginsecrets.cpp.enc \ + -out merginsecrets.cpp \ + -k "$MERGINSECRETS_DECRYPT_KEY" \ + -md md5 + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ccache-${{ env.TRIPLET }} + max-size: 200M + - uses: nttld/setup-ndk@v1 id: setup-ndk with: @@ -173,67 +134,51 @@ jobs: run: | sdkmanager --verbose "platforms;${SDK_PLATFORM}" "build-tools;${SDK_BUILD_TOOLS}" tools platform-tools - # Input SDK - - name: Cache Input-SDK - id: cache-input-sdk - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ github.workspace }}/input-sdk - key: ${{ runner.os }}-input-sdk-v0-${{ env.INPUT_SDK_VERSION_ARM }}-${{ env.CACHE_VERSION }} - - - name: Install Input-SDK - if: steps.cache-input-sdk.outputs.cache-hit != 'true' - run: | - # download - wget -O \ - input-sdk-arm-android.tar.gz \ - https://github.com/MerginMaps/mobile-sdk/releases/download/${{ env.INPUT_SDK_VERSION_ARM }}/mergin-maps-input-sdk-qt-${{ env.QT_VERSION }}-${{ env.INPUT_SDK_VERSION_ARM }}.tar.gz - - wget -O \ - input-sdk-arm64-android.tar.gz \ - https://github.com/MerginMaps/mobile-sdk/releases/download/${{ env.INPUT_SDK_VERSION_ARM64 }}/mergin-maps-input-sdk-qt-${{ env.QT_VERSION }}-${{ env.INPUT_SDK_VERSION_ARM64 }}.tar.gz - - # unpack - mkdir -p ${{ github.workspace }}/input-sdk/arm-android - cd ${{ github.workspace }}/input-sdk/arm-android - tar -xvzf ${{ github.workspace }}/input-sdk-arm-android.tar.gz - - mkdir -p ${{ github.workspace }}/input-sdk/arm64-android - cd ${{ github.workspace }}/input-sdk/arm64-android - tar -xvzf ${{ github.workspace }}/input-sdk-arm64-android.tar.gz - - # check - ls ${{ github.workspace }}/input-sdk - - - name: Extract Mergin API_KEY - env: - MERGINSECRETS_DECRYPT_KEY: ${{ secrets.MERGINSECRETS_DECRYPT_KEY }} - run: | - cd core/ - /opt/homebrew/bin/openssl \ - aes-256-cbc -d \ - -in merginsecrets.cpp.enc \ - -out merginsecrets.cpp \ - -k "$MERGINSECRETS_DECRYPT_KEY" \ - -md md5 - - name: Extract GPS keystore env: INPUTKEYSTORE_DECRYPT_KEY: ${{ secrets.INPUTKEYSTORE_DECRYPT_KEY }} run: | - /opt/homebrew/bin/openssl \ + $HOMEBREW_PREFIX/bin/openssl \ aes-256-cbc -d \ - -in Input_keystore.keystore.enc \ - -out Input_keystore.keystore \ + -in mm/Input_keystore.keystore.enc \ + -out mm/Input_keystore.keystore \ -k $INPUTKEYSTORE_DECRYPT_KEY \ -md md5 - PATH_TO_KEYSTORE=`pwd`/Input_keystore.keystore + PATH_TO_KEYSTORE=`pwd`/mm/Input_keystore.keystore echo "path to keystore $PATH_TO_KEYSTORE" echo "QT_ANDROID_KEYSTORE_PATH=$PATH_TO_KEYSTORE" >> $GITHUB_ENV - # Build Input App + - name: Install vcpkg + shell: bash + run: | + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + VCPKG_TAG=`cat ${{ github.workspace }}/mm/VCPKG_BASELINE` + git checkout ${VCPKG_TAG} + cd "${{ env.VCPKG_ROOT }}" + chmod +x ./bootstrap-vcpkg.sh + ./bootstrap-vcpkg.sh + + - name: Setup NuGet Credentials + shell: bash + run: | + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + sources add \ + -source "https://nuget.pkg.github.com/merginmaps/index.json" \ + -storepasswordincleartext \ + -name "GitHub" \ + -username "mergin-maps-bot" \ + -password "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" + + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + setapikey "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" \ + -source "https://nuget.pkg.github.com/merginmaps/index.json" + - name: Calculate build number env: OFFFSET: 10 # offset for build number - due to previous builds ~ new builds must always have a higher number @@ -246,39 +191,45 @@ jobs: # add build number to summary echo ":rocket: Build number: ${BUILD_NUM}" >> $GITHUB_STEP_SUMMARY - - name: Configure Input + - name: Configure app env: ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} ANDROID_NDK_HOST: darwin-x86_64 - QT_BASE: ${{ github.workspace }}/Qt/${{ env.QT_VERSION }} - INPUT_SDK_ANDROID_BASE: ${{ github.workspace }}/input-sdk run: | - mkdir -p ${{ github.workspace }}/build-Input - cd ${{ github.workspace }}/build-Input + mkdir -p ${{ github.workspace }}/build-mm + cd ${{ github.workspace }}/build-mm + + export PATH=${{ env.VCPKG_ROOT }}:$PATH + export ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }} + export ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }} + export ANDROID_ABI=${{ matrix.ANDROID_ABI }} cmake \ -DCMAKE_BUILD_TYPE=Release \ - -DQT_ANDROID_ABIS="arm64-v8a;armeabi-v7a" \ - -DQT_HOST_PATH=$QT_BASE/macos \ + -DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT} \ + -DANDROID_NDK_VERSION="${ANDROID_NDK_VERSION}" \ + -DANDROID_BUILD_TOOLS_VERSION="${ANDROID_BUILD_TOOLS_VERSION}" \ + -DVCPKG_HOST_TRIPLET=arm64-osx \ + -DVCPKG_TARGET_TRIPLET="${{ matrix.triplet }}" \ + -DVCPKG_INSTALL_OPTIONS="--allow-unsupported" \ + -DANDROID_ABI=${{ matrix.ANDROID_ABI }} \ + -DQT_ANDROID_ABIS=${{ matrix.ANDROID_ABI }} \ -DQT_ANDROID_SIGN_APK=Yes \ - -DQT_ANDROID_SIGN_AAB=Yes \ -DUSE_MM_SERVER_API_KEY=Yes \ -DUSE_KEYCHAIN=No \ - -DCMAKE_TOOLCHAIN_FILE=$QT_BASE/android_arm64_v8a/lib/cmake/Qt6/qt.toolchain.cmake \ + -DCMAKE_TOOLCHAIN_FILE:PATH="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" \ -GNinja \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -S ../ \ + -S ../mm \ -B ./ - name: Build APK env: ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} ANDROID_NDK_HOST: darwin-x86_64 - QT_BASE: ${{ github.workspace }}/Qt/${{ env.QT_VERSION }} - INPUT_SDK_ANDROID_BASE: ${{ github.workspace }}/input-sdk run: | - cd ${{ github.workspace }}/build-Input + cd ${{ github.workspace }}/build-mm ninja apk echo "APKs:" @@ -287,14 +238,14 @@ jobs: - name: Rename APK artefacts run: | mv \ - ${{ github.workspace }}/build-Input/app/android-build/build/outputs/apk/release/android-build-release-signed.apk \ + ${{ github.workspace }}/build-mm/app/android-build/build/outputs/apk/release/android-build-release-signed.apk \ ${{ github.workspace }}/merginmaps-${{ env.INPUT_VERSION_CODE }}.apk - name: Upload APK to Artifacts uses: actions/upload-artifact@v4 with: path: ${{ github.workspace }}/merginmaps-${{ env.INPUT_VERSION_CODE }}.apk - name: Mergin Maps ${{ env.INPUT_VERSION_CODE }} APK [v7 + v8a] + name: Mergin Maps ${{ env.INPUT_VERSION_CODE }} APK [${{ matrix.ANDROID_ABI }}] - name: Build AAB if: ${{ github.ref_name == 'master' || startsWith( github.ref_name, 'dev/' ) || github.ref_type == 'tag' }} @@ -302,7 +253,6 @@ jobs: ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} ANDROID_NDK_HOST: darwin-x86_64 QT_BASE: ${{ github.workspace }}/Qt/${{ env.QT_VERSION }} - INPUT_SDK_ANDROID_BASE: ${{ github.workspace }}/input-sdk run: | cd ${{ github.workspace }}/build-Input ninja aab @@ -314,7 +264,7 @@ jobs: if: ${{ github.ref_name == 'master' || startsWith( github.ref_name, 'dev/' ) || github.ref_type == 'tag' }} run: | mv \ - ${{ github.workspace }}/build-Input/app/android-build/build/outputs/bundle/release/android-build-release.aab \ + ${{ github.workspace }}/build-mm/app/android-build/build/outputs/bundle/release/android-build-release.aab \ ${{ github.workspace }}/merginmaps-${{ env.INPUT_VERSION_CODE }}.aab - name: Upload AAB to Artifacts diff --git a/.github/workflows/gallery.yml b/.github/workflows/gallery.yml index 764b28075..87fa1b354 100644 --- a/.github/workflows/gallery.yml +++ b/.github/workflows/gallery.yml @@ -3,7 +3,6 @@ on: push: paths: - 'app/qml/**' - - 'app/qmlV2/**' - 'gallery/**' - '.github/workflows/gallery.yml' diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 90db9943d..28cea9a3e 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -1,30 +1,33 @@ name: iOS Build + on: push: paths: - - 'app/**' - - 'core/**' - - 'scripts/**' - - 'cmake/**' - - 'cmake_templates/**' - - 'CMakeLists.txt' - - '.github/workflows/ios.yml' - - '.github/secrets/ios/**' + - 'vcpkg/**' + - 'vcpkg.json' + - 'VCPKG_BASELINE' + - 'app/**' + - 'core/**' + - 'scripts/**' + - 'cmake/**' + - 'cmake_templates/**' + - 'CMakeLists.txt' + - '.github/workflows/ios.yml' + - '.github/secrets/ios/**' release: types: - published -env: - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change +env: + CMAKE_VERSION: '3.31.6' + VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' + VCPKG_ROOT: '${{ github.workspace }}/vcpkg' XC_VERSION: ${{ '16.4' }} - IOS_CMAKE_TOOLCHAIN_VERSION: "4.4.0" - INPUT_SDK_VERSION: arm64-ios-20250326-198 + DEPLOYMENT_TARGET: '14.0' + TRIPLET: arm64-ios IOS_PROVISIONING_PROFILE_UUID: 59aaa8d7-516a-4592-8c58-d7d1c1f81610 KEYCHAIN: ${{ 'inputapp.keychain' }} - CCACHE_DIR: /Users/runner/work/ccache - CMAKE_VERSION: '3.29.0' - CACHE_VERSION: 0 concurrency: group: ci-${{github.ref}}-ios @@ -35,71 +38,70 @@ jobs: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) runs-on: macos-15 steps: - - name: Select latest Xcode - run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" - - - uses: actions/checkout@v4 - - - name: Download ios-cmake toolchain + - name: Checkout uses: actions/checkout@v4 with: - repository: leetal/ios-cmake - ref: ${{ env.IOS_CMAKE_TOOLCHAIN_VERSION }} - path: ios-cmake - - # CCache - - name: Prepare build cache for pull request - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name == 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - key: build-ios-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }} - # The head_ref or source branch of the pull request in a workflow run. - # The base_ref or target branch of the pull request in a workflow run. - restore-keys: | - build-ios-ccache-${{ github.actor }}-${{ github.head_ref }}- - build-ios-ccache-refs/heads/${{ github.base_ref }}- - build-ios-ccache-refs/heads/master- - - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name != 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: build-ios-ccache-${{ github.ref }}-${{ github.sha }} - restore-keys: | - build-ios-ccache-${{ github.ref }}- - build-ios-ccache-refs/heads/master- + path: mm - name: Install brew deps run: | - brew update - brew install aqtinstall - + brew uninstall cmake + brew install automake bison flex gnu-sed autoconf-archive libtool gettext lcov openssl create-dmg mono brew install gnupg - brew install openssl - brew install ccache - brew install ninja - + echo $(brew --prefix bison)/bin >> $GITHUB_PATH + echo $(brew --prefix flex)/bin >> $GITHUB_PATH + echo $(brew --prefix gettext)/bin >> $GITHUB_PATH - name: Install CMake and Ninja uses: lukka/get-cmake@latest with: cmakeVersion: ${{ env.CMAKE_VERSION }} - - - name: Install ccache + + - name: Setup XCode + uses: maxim-lobanov/setup-xcode@v1.6.0 + with: + xcode-version: ${{ env.XC_VERSION }} + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ccache-${{ env.TRIPLET }} + max-size: 200M + + - name: Install vcpkg + shell: bash run: | - mkdir -p ${CCACHE_DIR} - ccache --set-config=max_size=2.0G - ccache -s + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + VCPKG_TAG=`cat ${{ github.workspace }}/mm/VCPKG_BASELINE` + git checkout ${VCPKG_TAG} + cd "${{ env.VCPKG_ROOT }}" + chmod +x ./bootstrap-vcpkg.sh + ./bootstrap-vcpkg.sh + + - name: Setup NuGet Credentials + shell: bash + run: | + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + sources add \ + -source "https://nuget.pkg.github.com/merginmaps/index.json" \ + -storepasswordincleartext \ + -name "GitHub" \ + -username "mergin-maps-bot" \ + -password "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" + + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + setapikey "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" \ + -source "https://nuget.pkg.github.com/merginmaps/index.json" - name: Extract Mergin API_KEY env: MERGINSECRETS_DECRYPT_KEY: ${{ secrets.MERGINSECRETS_DECRYPT_KEY }} run: | - cd core/ - /opt/homebrew/bin/openssl \ + cd mm/core/ + $HOMEBREW_PREFIX/bin/openssl \ aes-256-cbc -d \ -in merginsecrets.cpp.enc \ -out merginsecrets.cpp \ @@ -120,96 +122,60 @@ jobs: IOS_GPG_KEY: ${{ secrets.IOS_GPG_KEY }} IOS_CERT_KEY: ${{ secrets.IOS_CERT_KEY }} run: | - gpg --quiet --batch --yes --decrypt --passphrase="$IOS_GPG_KEY" --output ./.github/secrets/ios/Certificates_ios_dist.p12 ./.github/secrets/ios/Certificates_ios_dist.p12.gpg - security import "./.github/secrets/ios/Certificates_ios_dist.p12" -k "$KEYCHAIN" -P "$IOS_CERT_KEY" -A + gpg --quiet --batch --yes --decrypt --passphrase="$IOS_GPG_KEY" --output ./mm/.github/secrets/ios/Certificates_ios_dist.p12 ./mm/.github/secrets/ios/Certificates_ios_dist.p12.gpg + security import "./mm/.github/secrets/ios/Certificates_ios_dist.p12" -k "$KEYCHAIN" -P "$IOS_CERT_KEY" -A security set-key-partition-list -S apple-tool:,apple: -s -k "" "$KEYCHAIN" mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles - gpg --quiet --batch --yes --decrypt --passphrase="$IOS_GPG_KEY" --output ./.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision ./.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision.gpg - cp ./.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/${IOS_PROVISIONING_PROFILE_UUID}.mobileprovision - - # Input SDK - - name: Cache Input-SDK - id: cache-input-sdk - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ github.workspace }}/input-sdk - key: ${{ runner.os }}-input-sdk-v0-${{ env.INPUT_SDK_VERSION }}-${{ env.CACHE_VERSION }} - - - name: Install Input-SDK - if: steps.cache-input-sdk.outputs.cache-hit != 'true' - run: | - wget -O \ - ${{ github.workspace }}/input-sdk.tar.gz \ - https://github.com/MerginMaps/mobile-sdk/releases/download/${{ env.INPUT_SDK_VERSION }}/mergin-maps-input-sdk-qt-${{ env.QT_VERSION }}-${{ env.INPUT_SDK_VERSION }}.tar.gz - mkdir -p ${{ github.workspace }}/input-sdk/arm64-ios - cd ${{ github.workspace }}/input-sdk/arm64-ios - tar -xvzf ${{ github.workspace }}/input-sdk.tar.gz - - # Qt - - name: Cache Qt - id: cache-qt - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ github.workspace }}/Qt - key: ${{ runner.os }}-QtCache-v3-${{ env.QT_VERSION }}-ios - - - name: Install Qt - if: steps.cache-qt.outputs.cache-hit != 'true' - run: | - aqt install-qt \ - mac ios ${{ env.QT_VERSION }} \ - -m qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth\ - -O ${{ github.workspace }}/Qt - - aqt install-qt \ - mac desktop ${{ env.QT_VERSION }} \ - -m qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth\ - -O ${{ github.workspace }}/Qt + gpg --quiet --batch --yes --decrypt --passphrase="$IOS_GPG_KEY" --output ./mm/.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision ./mm/.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision.gpg + cp ./mm/.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/${IOS_PROVISIONING_PROFILE_UUID}.mobileprovision - name: Calculate a build number env: OFFFSET: 10 # offset for build number - due to previous builds ~ new builds must always have a higher number run: | - BUILD_NUM=$GITHUB_RUN_NUMBER$((GITHUB_RUN_ATTEMPT + OFFFSET)) + BUILD_NUM=$GITHUB_RUN_NUMBER$((GITHUB_RUN_ATTEMPT + OFFFSET)) - TIMESTAMP=`date "+%y.%-m"` - CF_BUNDLE_VERSION=${TIMESTAMP}.${BUILD_NUM} + TIMESTAMP=`date "+%y.%-m"` + CF_BUNDLE_VERSION=${TIMESTAMP}.${BUILD_NUM} - echo "INPUT_VERSION_CODE=${CF_BUNDLE_VERSION}" >> $GITHUB_ENV - echo "Build number: ${CF_BUNDLE_VERSION}" + echo "INPUT_VERSION_CODE=${CF_BUNDLE_VERSION}" >> $GITHUB_ENV + echo "Build number: ${CF_BUNDLE_VERSION}" - # add build number to summary - echo ":rocket: Build number: ${CF_BUNDLE_VERSION}" >> $GITHUB_STEP_SUMMARY + # add build number to summary + echo ":rocket: Build number: ${CF_BUNDLE_VERSION}" >> $GITHUB_STEP_SUMMARY - name: Create build system with cmake run: | - mkdir -p install-Input - mkdir -p build-INPUT - cd build-INPUT - - ls -1 ${{ github.workspace }}/Qt/${{ env.QT_VERSION }} + mkdir -p install-mm + mkdir -p build-mm + cd build-mm # run cmake cmake \ - -DCMAKE_TOOLCHAIN_FILE:PATH="${{ github.workspace }}/ios-cmake/ios.toolchain.cmake" \ - -DCMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/ios \ -DIOS_USE_PRODUCTION_SIGNING=TRUE \ - -DQT_HOST_PATH=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos \ + -DVCPKG_HOST_TRIPLET=arm64-osx \ + -DVCPKG_TARGET_TRIPLET=${{ env.TRIPLET }} \ + -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake \ + -D ENABLE_BITCODE=OFF \ + -D ENABLE_ARC=ON \ + -D CMAKE_CXX_VISIBILITY_PRESET=hidden \ + -D CMAKE_SYSTEM_NAME=iOS \ + -D CMAKE_SYSTEM_PROCESSOR=aarch64 \ + -D CMAKE_OSX_DEPLOYMENT_TARGET=${{ env.DEPLOYMENT_TARGET }} \ -DIOS=TRUE \ -DUSE_MM_SERVER_API_KEY=TRUE \ -DUSE_KEYCHAIN=No \ - -DCMAKE_INSTALL_PREFIX:PATH=../install-Input \ - -DINPUT_SDK_PATH=${{ github.workspace }}/input-sdk/arm64-ios \ + -DCMAKE_INSTALL_PREFIX:PATH=../install-mm \ -G "Xcode" \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -S ${{ github.workspace }} \ + -S ${{ github.workspace }}/mm \ -B ./ - - - name: Build Input + + - name: Build app (release) run: | - cd build-INPUT + cd build-mm xcodebuild \ -project Input.xcodeproj/ \ @@ -219,10 +185,10 @@ jobs: archive -archivePath Input.xcarchive \ "OTHER_CODE_SIGN_FLAGS=--keychain '$KEYCHAIN'" - - name: Create Input Package + - name: Create package run: | - INPUT_DIR=`pwd` - cd build-INPUT + INPUT_DIR=`pwd`/mm + cd build-mm xcodebuild \ -archivePath Input.xcarchive \ -exportOptionsPlist $INPUT_DIR/scripts/ci/ios/exportOptions.plist \ @@ -237,6 +203,6 @@ jobs: INPUTAPP_BOT_GITHUB_TOKEN: ${{ secrets.INPUTAPP_BOT_GITHUB_TOKEN }} if: success() run: | - CF_BUNDLE_VERSION=`/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" build-INPUT/app/CMakeFiles/Input.dir/Info.plist` + CF_BUNDLE_VERSION=`/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" build-mm/app/CMakeFiles/Input.dir/Info.plist` echo "Publishing ios ${CF_BUNDLE_VERSION}" - xcrun altool --upload-app -t ios -f build-INPUT/Input.ipa -u "$INPUTAPP_BOT_APPLEID_USER" -p "$INPUTAPP_BOT_APPLEID_PASS" --verbose + xcrun altool --upload-app -t ios -f build-mm/Input.ipa -u "$INPUTAPP_BOT_APPLEID_USER" -p "$INPUTAPP_BOT_APPLEID_PASS" --verbose diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8defae042..42891b0ab 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,7 +1,11 @@ name: linux Build + on: push: paths: + - 'vcpkg/**' + - 'vcpkg.json' + - 'VCPKG_BASELINE' - 'app/**' - 'core/**' - 'scripts/**' @@ -16,12 +20,11 @@ on: - published env: - CCACHE_DIR: ~/.ccache - INPUT_SDK_VERSION: x64-linux-20250327-197 - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change - CMAKE_VERSION: '3.29.0' - CACHE_VERSION: 0 - + CMAKE_VERSION: '3.31.6' + VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' + VCPKG_ROOT: "${{ github.workspace }}/vcpkg" + TRIPLET: x64-linux + concurrency: group: ci-${{github.ref}}-linux cancel-in-progress: true @@ -31,10 +34,13 @@ jobs: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) runs-on: ubuntu-22.04 steps: - - name: Checkout Input - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: - path: input + path: mm + + - name: Free Disk Space + uses: jlumbroso/free-disk-space@main - name: Install Build Dependencies run: | @@ -44,28 +50,21 @@ jobs: gperf autopoint '^libxcb.*-dev' libx11-xcb-dev libegl1-mesa libegl1-mesa-dev \ libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev \ autoconf-archive libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libfuse2 \ - bison flex ccache lcov + bison flex lcov nasm libxrandr-dev xvfb + + # Required to run unit tests on linux + echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV - name: Install CMake and Ninja uses: lukka/get-cmake@latest with: cmakeVersion: ${{ env.CMAKE_VERSION }} - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - setup-python: 'false' - modules: 'qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth' - dir: ${{ github.workspace }} - cache: true - cache-key-prefix: ${{ runner.os }}-QtCache-v0-${{ env.QT_VERSION }}-lnx - name: Extract Mergin API_KEY env: MERGINSECRETS_DECRYPT_KEY: ${{ secrets.MERGINSECRETS_DECRYPT_KEY }} run: | - cd input/core/ + cd mm/core/ openssl \ aes-256-cbc -d \ -in merginsecrets.cpp.enc \ @@ -73,57 +72,41 @@ jobs: -k "$MERGINSECRETS_DECRYPT_KEY" \ -md md5 - # CCache - - name: Prepare build cache for pull request - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name == 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - key: build-linux-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }} - # The head_ref or source branch of the pull request in a workflow run. - # The base_ref or target branch of the pull request in a workflow run. - restore-keys: | - build-linux-ccache-${{ github.actor }}-${{ github.head_ref }}- - build-linux-ccache-refs/heads/${{ github.base_ref }}- - build-linux-ccache-refs/heads/master- - - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name != 'pull_request' + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 with: - path: ${{ env.CCACHE_DIR }} - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: build-linux-ccache-${{ github.ref }}-${{ github.sha }} - restore-keys: | - build-linux-ccache-${{ github.ref }}- - build-linux-ccache-refs/heads/master- - - - name: Install ccache - run: | - mkdir -p ${CCACHE_DIR} - ccache --set-config=max_size=2.0G - ccache -s - - # Input SDK - - name: Cache Input-SDK - id: cache-input-sdk - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ github.workspace }}/input-sdk - key: ${{ runner.os }}-input-sdk-v0-${{ env.INPUT_SDK_VERSION }}-${{ env.CACHE_VERSION }} + key: ccache-${{ env.TRIPLET }} + max-size: 200M - - name: Install Input-SDK - if: steps.cache-input-sdk.outputs.cache-hit != 'true' + - name: Install vcpkg + shell: bash + run: | + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + VCPKG_TAG=`cat ${{ github.workspace }}/mm/VCPKG_BASELINE` + git checkout ${VCPKG_TAG} + cd "${{ env.VCPKG_ROOT }}" + chmod +x ./bootstrap-vcpkg.sh + ./bootstrap-vcpkg.sh + + - name: Setup NuGet Credentials + shell: bash run: | - wget -O \ - ${{ github.workspace }}/input-sdk.tar.gz \ - https://github.com/MerginMaps/mobile-sdk/releases/download/${{ env.INPUT_SDK_VERSION }}/mergin-maps-input-sdk-qt-${{ env.QT_VERSION }}-${{ env.INPUT_SDK_VERSION }}.tar.gz - mkdir -p ${{ github.workspace }}/input-sdk/x64-linux - cd ${{ github.workspace }}/input-sdk/x64-linux - tar -xvzf ${{ github.workspace }}/input-sdk.tar.gz - - # Build Input App + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + sources add \ + -source "https://nuget.pkg.github.com/merginmaps/index.json" \ + -storepasswordincleartext \ + -name "GitHub" \ + -username "mergin-maps-bot" \ + -password "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" + + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + setapikey "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" \ + -source "https://nuget.pkg.github.com/merginmaps/index.json" + - name: Calculate build number run: | BUILD_NUM=$GITHUB_RUN_NUMBER$GITHUB_RUN_ATTEMPT @@ -131,26 +114,23 @@ jobs: echo "Version code: ${BUILD_NUM}" - - # Do Tests - - name: build Input (Debug) + - name: build app (debug) run: | - mkdir -p build-Input-db - cd build-Input-db + mkdir -p build-mm-db + cd build-mm-db cmake \ -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64 \ - -DUSE_SERVER_API_KEY=TRUE \ + -DVCPKG_TARGET_TRIPLET=${{ env.TRIPLET }} \ + -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake \ -DUSE_KEYCHAIN=No \ - -DINPUT_SDK_PATH=${{ github.workspace }}/input-sdk/x64-linux \ - -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/input/app/android/assets/qgis-data \ + -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/build-mm-db/app/android/assets/qgis-data \ -DUSE_MM_SERVER_API_KEY=TRUE \ -DCOVERAGE=TRUE \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DENABLE_TESTS=TRUE \ -GNinja \ - -S ../input + -S ../mm ninja @@ -161,12 +141,12 @@ jobs: TEST_API_PASSWORD: ${{ secrets.TEST_API_PASSWORD }} QT_QPA_PLATFORM: "offscreen" run: | - cd build-Input-db/ + cd build-mm-db/ xvfb-run --server-args="-screen 0 640x480x24" ctest --output-on-failure - name: build lcov summary run: | - cd build-Input-db + cd build-mm-db lcov --directory . --capture --output-file coverage.info @@ -177,28 +157,28 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: build-Input-db/coverage.info + path-to-lcov: build-mm-db/coverage.info - name: build Input run: | - mkdir -p install-Input - mkdir -p build-Input - cd build-Input + mkdir -p install-mm + mkdir -p build-mm + cd build-mm cmake \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/gcc_64 \ - -DCMAKE_INSTALL_PREFIX:PATH=../install-Input \ - -DINPUT_SDK_PATH=${{ github.workspace }}/input-sdk/x64-linux \ - -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/input/app/android/assets/qgis-data \ + -DVCPKG_TARGET_TRIPLET=${{ env.TRIPLET }} \ + -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake \ + -DCMAKE_INSTALL_PREFIX:PATH=../install-mm \ + -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/build-mm/app/android/assets/qgis-data \ -DUSE_MM_SERVER_API_KEY=TRUE \ -DUSE_KEYCHAIN=No \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -GNinja \ - -S ../input + -S ../mm ninja - ninja install + ninja install - name: Get TimeStamp id: time @@ -208,14 +188,14 @@ jobs: - name: package Input run: | - INPUT_TAR=input-${{ env.INPUT_SDK_VERSION }}-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.tar.gz - echo "INPUT_TAR=${INPUT_TAR}" >> $GITHUB_ENV + MM_TAR=input-${{ env.INPUT_SDK_VERSION }}-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.tar.gz + echo "MM_TAR=${MM_TAR}" >> $GITHUB_ENV - cd ${{ github.workspace }}/install-Input + cd ${{ github.workspace }}/install-mm find . - tar -c -z -f ${{ github.workspace }}/${INPUT_TAR} ./ + tar -c -z -f ${{ github.workspace }}/${MM_TAR} ./ - name: Upload Sdk in Artifacts uses: actions/upload-artifact@v4 with: - path: ${{ github.workspace }}/${{ env.INPUT_TAR }} + path: ${{ github.workspace }}/${{ env.MM_TAR }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3056db56b..39e54e22d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -2,26 +2,29 @@ name: macOS Build on: push: paths: - - 'app/**' - - 'core/**' - - 'scripts/**' - - 'cmake/**' - - 'cmake_templates/**' - - 'test/**' - - 'CMakeLists.txt' - - '.github/workflows/macos.yml' + - 'vcpkg/**' + - 'vcpkg.json' + - 'VCPKG_BASELINE' + - 'app/**' + - 'core/**' + - 'scripts/**' + - 'cmake/**' + - 'cmake_templates/**' + - 'test/**' + - 'CMakeLists.txt' + - '.github/workflows/macos.yml' release: types: - published env: - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change - INPUT_SDK_VERSION: x64-osx-20250326-218 - CCACHE_DIR: /Users/runner/work/ccache - CACHE_VERSION: 0 - CMAKE_VERSION: '3.29.0' - XC_VERSION: ${{ '15.2' }} + CMAKE_VERSION: '3.31.6' + VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' + VCPKG_ROOT: '${{ github.workspace }}/vcpkg' + XC_VERSION: ${{ '16.4' }} + DEPLOYMENT_TARGET: '11.0' + TRIPLET: arm64-osx concurrency: group: ci-${{github.ref}}-macos @@ -30,125 +33,101 @@ concurrency: jobs: macos_build: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) - runs-on: macos-13 + runs-on: macos-15 steps: - - name: Checkout Input - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: - path: input + path: mm - - name: Select latest Xcode - run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" - - - name: install brew deps + - name: Install brew deps run: | - brew install lcov - brew install ccache - brew install ninja + brew uninstall cmake + brew install automake bison flex gnu-sed autoconf-archive libtool gettext lcov openssl create-dmg mono + echo $(brew --prefix bison)/bin >> $GITHUB_PATH + echo $(brew --prefix flex)/bin >> $GITHUB_PATH + echo $(brew --prefix gettext)/bin >> $GITHUB_PATH - name: Install CMake and Ninja uses: lukka/get-cmake@latest with: cmakeVersion: ${{ env.CMAKE_VERSION }} - + + - name: Setup XCode + uses: maxim-lobanov/setup-xcode@v1.6.0 + with: + xcode-version: ${{ env.XC_VERSION }} + - name: Extract Mergin API_KEY env: MERGINSECRETS_DECRYPT_KEY: ${{ secrets.MERGINSECRETS_DECRYPT_KEY }} run: | - cd input/core/ - /usr/local/opt/openssl@1.1/bin/openssl \ + cd mm/core/ + $HOMEBREW_PREFIX/bin/openssl \ aes-256-cbc -d \ -in merginsecrets.cpp.enc \ -out merginsecrets.cpp \ -k "$MERGINSECRETS_DECRYPT_KEY" \ -md md5 - # CCache - - name: Prepare build cache for pull request - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name == 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - key: build-mac-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }} - # The head_ref or source branch of the pull request in a workflow run. - # The base_ref or target branch of the pull request in a workflow run. - restore-keys: | - build-mac-ccache-${{ github.actor }}-${{ github.head_ref }}- - build-mac-ccache-refs/heads/${{ github.base_ref }}- - build-mac-ccache-refs/heads/master- - - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name != 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: build-mac-ccache-${{ github.ref }}-${{ github.sha }} - restore-keys: | - build-mac-ccache-${{ github.ref }}- - build-mac-ccache-refs/heads/master- - - - name: Install ccache - run: | - mkdir -p ${CCACHE_DIR} - ccache --set-config=max_size=2.0G - ccache -s - - # Qt - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - target: desktop - dir: ${{ github.workspace }} - modules: 'qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth' - cache: true - cache-key-prefix: ${{ runner.os }}-QtCache-v0-${{ env.QT_VERSION }}-mac - - # Input SDK - - name: Cache Input-SDK - id: cache-input-sdk - uses: pat-s/always-upload-cache@v3.0.11 + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 with: - path: ${{ github.workspace }}/input-sdk - key: ${{ runner.os }}-input-sdk-v0-${{ env.INPUT_SDK_VERSION }}-${{ env.CACHE_VERSION }} + key: ccache-${{ env.TRIPLET }} + max-size: 200M - - name: Install Input-SDK - if: steps.cache-input-sdk.outputs.cache-hit != 'true' + - name: Install vcpkg + shell: bash run: | - wget -O \ - ${{ github.workspace }}/input-sdk.tar.gz \ - https://github.com/MerginMaps/mobile-sdk/releases/download/${{ env.INPUT_SDK_VERSION }}/mergin-maps-input-sdk-qt-${{ env.QT_VERSION }}-${{ env.INPUT_SDK_VERSION }}.tar.gz - mkdir -p ${{ github.workspace }}/input-sdk/x64-osx - cd ${{ github.workspace }}/input-sdk/x64-osx - tar -xvzf ${{ github.workspace }}/input-sdk.tar.gz - - # Build Input App - - name: Calculate build number + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + VCPKG_TAG=`cat ${{ github.workspace }}/mm/VCPKG_BASELINE` + git checkout ${VCPKG_TAG} + cd "${{ env.VCPKG_ROOT }}" + chmod +x ./bootstrap-vcpkg.sh + ./bootstrap-vcpkg.sh + + - name: Setup NuGet Credentials + shell: bash run: | - BUILD_NUM=$GITHUB_RUN_NUMBER$GITHUB_RUN_ATTEMPT - echo "INPUT_VERSION_CODE=${BUILD_NUM}" >> $GITHUB_ENV - echo "Version code: ${BUILD_NUM}" + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + sources add \ + -source "https://nuget.pkg.github.com/merginmaps/index.json" \ + -storepasswordincleartext \ + -name "GitHub" \ + -username "mergin-maps-bot" \ + -password "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" + + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + setapikey "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" \ + -source "https://nuget.pkg.github.com/merginmaps/index.json" - # Do Tests - - name: build Input (Debug) + - name: Calculate build number run: | - mkdir -p build-Input-db - cd build-Input-db - + BUILD_NUM=$GITHUB_RUN_NUMBER$GITHUB_RUN_ATTEMPT + echo "INPUT_VERSION_CODE=${BUILD_NUM}" >> $GITHUB_ENV + echo "Version code: ${BUILD_NUM}" + - name: build app (debug) + run: | + mkdir -p build-mm-db + cd build-mm-db + cmake \ -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/macos \ - -DUSE_SERVER_API_KEY=TRUE \ + -DVCPKG_TARGET_TRIPLET=${{ env.TRIPLET }} \ + -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake \ + -DUSE_MM_SERVER_API_KEY=TRUE \ + -DHAVE_BLUETOOTH=FALSE \ -DUSE_KEYCHAIN=No \ - -DINPUT_SDK_PATH=${{ github.workspace }}/input-sdk/x64-osx \ - -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/input/app/android/assets/qgis-data \ + -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/build-mm-db/app/android/assets/qgis-data \ -DCOVERAGE=TRUE \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DENABLE_TESTS=TRUE \ -GNinja \ - -S ../input + -S ../mm ninja @@ -158,29 +137,28 @@ jobs: TEST_API_USERNAME: test_mobileapp2 TEST_API_PASSWORD: ${{ secrets.TEST_API_PASSWORD }} run: | - cd build-Input-db/ + cd build-mm-db/ ctest --output-on-failure - # Package - - name: build Input (Release) + - name: build app (release) run: | - mkdir -p install-Input - mkdir -p build-Input-rel - cd build-Input-rel + mkdir -p install-mm + mkdir -p build-mm-rel + cd build-mm-rel cmake \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/${QT_VERSION}/macos \ - -DCMAKE_INSTALL_PREFIX:PATH=../install-Input \ + -DVCPKG_TARGET_TRIPLET=${{ env.TRIPLET }} \ + -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake \ + -DCMAKE_INSTALL_PREFIX:PATH=../install-mm \ -DUSE_SERVER_API_KEY=TRUE \ -DUSE_MM_SERVER_API_KEY=TRUE \ -DUSE_KEYCHAIN=No \ - -DINPUT_SDK_PATH=${{ github.workspace }}/input-sdk/x64-osx \ - -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/input/app/android/assets/qgis-data \ + -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/build-mm-rel/app/android/assets/qgis-data \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -GNinja \ - -S ../input - + -S ../mm + ninja ninja install @@ -190,15 +168,26 @@ jobs: with: format: 'YYYYMMDD' - - name: package Input.app + - name: Create dmg run: | - INPUT_TAR=input-${{ env.INPUT_SDK_VERSION }}-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.tar.gz - echo "INPUT_TAR=${INPUT_TAR}" >> $GITHUB_ENV - cd ${{ github.workspace }}/install-Input - find . - tar -c -z -f ${{ github.workspace }}/${INPUT_TAR} "./Input.app" - - - name: Upload Sdk in Artifacts + if [[ "${{ github.event_name }}" == "release" && "${{ github.ref }}" == refs/tags/v* ]]; then + echo "${{ secrets.APPLE_DEVELOPER_ID_P12_BASE64 }}" | base64 --decode > cert.p12 + export P12_PATH=cert.p12 + export P12_PASSWORD=${{ secrets.APPLE_DEVELOPER_ID_P12_PASSWORD }} + export API_KEY_ID=${{ secrets.IOS_APPSTORE_KEY_ID }} + export API_KEY_ISSUER_ID=${{ secrets.IOS_APPSTORE_ISSUER_ID }} + echo "${{ secrets.IOS_APPSTORE_PRIVATE_KEY }}" > authkey.p8 + export API_KEY_PATH=authkey.p8 + fi + + export APP_PATH=${{ github.workspace }}/install-mm/Input.app + export DMG_PATH=merginmaps-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.dmg + ./mm/scripts/create_dmg.sh + + - name: Upload dmg uses: actions/upload-artifact@v4 + id: artifact-macos with: - path: ${{ github.workspace }}/${{ env.INPUT_TAR }} + name: merginmaps_app.dmg + path: | + *.dmg diff --git a/.github/workflows/macos_arm64.yml b/.github/workflows/macos_arm64.yml deleted file mode 100644 index b5f2cad28..000000000 --- a/.github/workflows/macos_arm64.yml +++ /dev/null @@ -1,174 +0,0 @@ -name: macOS arm64 Build -on: - push: - paths: - - 'app/**' - - 'core/**' - - 'scripts/**' - - 'cmake/**' - - 'cmake_templates/**' - - 'test/**' - - 'CMakeLists.txt' - - '.github/workflows/macos_arm64.yml' - - release: - types: - - published - -env: - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change - INPUT_SDK_VERSION: arm64-osx-20250326-17 - CCACHE_DIR: /Users/runner/work/ccache - CACHE_VERSION: 0 - CMAKE_VERSION: '3.29.0' - XC_VERSION: ${{ '16.4' }} - -concurrency: - group: ci-${{github.ref}}-macos-arm64 - cancel-in-progress: true - -jobs: - macos_arm64_build: - if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) - runs-on: macos-15 - steps: - - name: Checkout Input - uses: actions/checkout@v4 - with: - path: input - - - name: Select latest Xcode - run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" - - - name: install brew deps - run: | - brew install lcov - brew install ccache - brew install ninja - - - name: Install CMake and Ninja - uses: lukka/get-cmake@latest - with: - cmakeVersion: ${{ env.CMAKE_VERSION }} - - - name: Extract Mergin API_KEY - env: - MERGINSECRETS_DECRYPT_KEY: ${{ secrets.MERGINSECRETS_DECRYPT_KEY }} - run: | - cd input/core/ - /opt/homebrew/bin/openssl \ - aes-256-cbc -d \ - -in merginsecrets.cpp.enc \ - -out merginsecrets.cpp \ - -k "$MERGINSECRETS_DECRYPT_KEY" \ - -md md5 - - # CCache - - name: Prepare build cache for pull request - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name == 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - key: build-mac-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }} - # The head_ref or source branch of the pull request in a workflow run. - # The base_ref or target branch of the pull request in a workflow run. - restore-keys: | - build-mac-ccache-${{ github.actor }}-${{ github.head_ref }}- - build-mac-ccache-refs/heads/${{ github.base_ref }}- - build-mac-ccache-refs/heads/master- - - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name != 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: build-mac-ccache-${{ github.ref }}-${{ github.sha }} - restore-keys: | - build-mac-ccache-${{ github.ref }}- - build-mac-ccache-refs/heads/master- - - - name: Install ccache - run: | - mkdir -p ${CCACHE_DIR} - ccache --set-config=max_size=2.0G - ccache -s - - # Qt - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - target: desktop - dir: ${{ github.workspace }} - modules: 'qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth' - cache: true - cache-key-prefix: ${{ runner.os }}-QtCache-v0-${{ env.QT_VERSION }}-mac-arm64 - - # Input SDK - - name: Cache Input-SDK - id: cache-input-sdk - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ github.workspace }}/input-sdk - key: ${{ runner.os }}-input-sdk-v0-${{ env.INPUT_SDK_VERSION }}-${{ env.CACHE_VERSION }} - - - name: Install Input-SDK - if: steps.cache-input-sdk.outputs.cache-hit != 'true' - run: | - wget -O \ - ${{ github.workspace }}/input-sdk.tar.gz \ - https://github.com/MerginMaps/mobile-sdk/releases/download/${{ env.INPUT_SDK_VERSION }}/mergin-maps-input-sdk-qt-${{ env.QT_VERSION }}-${{ env.INPUT_SDK_VERSION }}.tar.gz - mkdir -p ${{ github.workspace }}/input-sdk/arm64-osx - cd ${{ github.workspace }}/input-sdk/arm64-osx - tar -xvzf ${{ github.workspace }}/input-sdk.tar.gz - - # Build Input App - - name: Calculate build number - run: | - BUILD_NUM=$GITHUB_RUN_NUMBER$GITHUB_RUN_ATTEMPT - echo "INPUT_VERSION_CODE=${BUILD_NUM}" >> $GITHUB_ENV - echo "Version code: ${BUILD_NUM}" - - # Package - - name: build Input (Release) - run: | - mkdir -p install-Input - mkdir -p build-Input-rel - cd build-Input-rel - - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/${QT_VERSION}/macos \ - -DCMAKE_INSTALL_PREFIX:PATH=../install-Input \ - -DUSE_SERVER_API_KEY=TRUE \ - -DUSE_MM_SERVER_API_KEY=TRUE \ - -DUSE_KEYCHAIN=No \ - -DINPUT_SDK_PATH=${{ github.workspace }}/input-sdk/arm64-osx \ - -DQGIS_QUICK_DATA_PATH=${{ github.workspace }}/input/app/android/assets/qgis-data \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -GNinja \ - -S ../input - - ninja - ninja install - - - name: Get TimeStamp - id: time - uses: josStorer/get-current-time@v2.0.2 - with: - format: 'YYYYMMDD' - - - name: package Input.app - run: | - INPUT_TAR=input-${{ env.INPUT_SDK_VERSION }}-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.tar.gz - echo "INPUT_TAR=${INPUT_TAR}" >> $GITHUB_ENV - cd ${{ github.workspace }}/install-Input - find . - tar -c -z -f ${{ github.workspace }}/${INPUT_TAR} "./Input.app" - - - name: Upload Sdk in Artifacts - uses: actions/upload-artifact@v4 - with: - path: ${{ github.workspace }}/${{ env.INPUT_TAR }} diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 3f63f7733..6cea6b08e 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -1,8 +1,11 @@ -name: Build win64 +name: win64 Build on: push: paths: + - 'vcpkg/**' + - 'vcpkg.json' + - 'VCPKG_BASELINE' - 'app/**' - 'core/**' - 'scripts/**' @@ -10,34 +13,36 @@ on: - 'cmake_templates/**' - 'CMakeLists.txt' - '.github/workflows/win.yml' - + release: types: - published - + concurrency: group: ci-${{github.ref}}-windows cancel-in-progress: true - + jobs: win64_build: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) runs-on: windows-2022 - + env: - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change - INPUT_SDK_VERSION: x64-windows-20250327-248 - CCACHE_DIR: C:/ccache-cache # https://linux.die.net/man/1/ccache - CACHE_VERSION: 0 VS_VERSION: "2022" - CMAKE_VERSION: '3.29.0' - QT_ARCH: "win64_msvc2022_64" - + # we can't reference other variables within, so make sure the year in path is same as VS_VERSION + VCINSTALLDIR: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/" + CMAKE_VERSION: '3.31.6' + VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' + TRIPLET: x64-windows + CMAKE_GENERATOR: "Visual Studio 17 2022" # see https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md + CMAKE_ARCH: "x64" + VCPKG_ROOT: "C:/vcpkg-root" # Looks like there is more space on C: than on D: drive (~14GB) + steps: - - name: Checkout Input - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: - path: input + path: mm - name: Prepare vars id: vars @@ -55,79 +60,53 @@ jobs: - name: Install ccache shell: cmd run: | - choco install ccache choco install nsis - where ccache - where openssl - where makensis - + - name: Extract Mergin API_KEY shell: cmd env: MERGINSECRETS_DECRYPT_KEY: ${{ secrets.MERGINSECRETS_DECRYPT_KEY }} run: | - cd input/core/ + cd mm/core/ openssl aes-256-cbc -d -in merginsecrets.cpp.enc -out merginsecrets.cpp -k "%MERGINSECRETS_DECRYPT_KEY%" -md md5 - - name: Prepare build cache for pull request - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name == 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - key: build-win64-ccache-${{ github.actor }}-${{ github.head_ref }}-${{ github.sha }} - # The head_ref or source branch of the pull request in a workflow run. - # The base_ref or target branch of the pull request in a workflow run. - restore-keys: | - build-win64-ccache-${{ github.actor }}-${{ github.head_ref }}- - build-win64-ccache-refs/heads/${{ github.base_ref }}- - build-win64-ccache-refs/heads/master- - - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v3.0.11 - if: github.event_name != 'pull_request' - with: - path: ${{ env.CCACHE_DIR }} - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: build-win64-ccache-${{ github.ref }}-${{ github.sha }} - restore-keys: | - build-win64-ccache-${{ github.ref }}- - build-win64-ccache-refs/heads/master- - - - name: Install Qt - uses: jurplel/install-qt-action@v4 + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 with: - version: ${{ env.QT_VERSION }} - target: desktop - arch: ${{ env.QT_ARCH }} - dir: ${{ github.workspace }} - modules: 'qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools qtnetworkauth' - cache: true - cache-key-prefix: ${{ runner.os }}-QtCache-v0-${{ env.QT_VERSION }}-win - - # Input SDK - - name: Cache Input-SDK - id: cache-input-sdk - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ github.workspace }}/input-sdk - key: ${{ runner.os }}-input-sdk-v1-${{ env.INPUT_SDK_VERSION }}-${{ env.CACHE_VERSION }} + key: ccache-${{ env.TRIPLET }} + max-size: 200M - - name: Install Input-SDK + - name: Get vcpkg shell: bash - if: steps.cache-input-sdk.outputs.cache-hit != 'true' run: | - URL="https://github.com/MerginMaps/mobile-sdk/releases/download/${{ env.INPUT_SDK_VERSION }}/mergin-maps-input-sdk-qt-${{ env.QT_VERSION }}-${{ env.INPUT_SDK_VERSION }}.zip" - echo "downloading: $URL" - curl -fsSL --connect-timeout 60 -o \ - input-sdk.tar.gz \ - ${URL} - - mkdir -p input-sdk/x64-windows - cd input-sdk/x64-windows - unzip ${{ steps.vars.outputs.WORKSPACE_DIR }}/input-sdk.tar.gz -d . + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + VCPKG_TAG=`cat ${{ steps.vars.outputs.WORKSPACE_DIR }}/mm/VCPKG_BASELINE` + echo "using VCPKG_TAG ${VCPKG_TAG}" + git checkout ${VCPKG_TAG} + + - name: Install vcpkg + shell: cmd + run: | + CALL "C:\vcpkg-root\bootstrap-vcpkg.bat" + + - name: Setup NuGet Credentials + shell: pwsh + run: | + .$(${{ env.VCPKG_ROOT }}/vcpkg fetch nuget) ` + sources add ` + -Source "https://nuget.pkg.github.com/merginmaps/index.json" ` + -StorePasswordInClearText ` + -Name GitHub ` + -UserName "mergin-maps-bot" ` + -Password "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" + .$(${{ env.VCPKG_ROOT }}/vcpkg fetch nuget) ` + setapikey "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" ` + -Source "https://nuget.pkg.github.com/merginmaps/index.json" - # Build Input App - name: Calculate build number shell: bash run: | @@ -135,57 +114,55 @@ jobs: echo "INPUT_VERSION_CODE=${BUILD_NUM}" >> $GITHUB_ENV echo "Version code: ${BUILD_NUM}" - - name: Developer Command Prompt for Microsoft Visual C++ - uses: ilammy/msvc-dev-cmd@v1 - with: - vsversion: ${{ env.VS_VERSION }} - - - name: Configure Input + - name: Setup compiler shell: cmd run: | - mkdir install-Input -ea 0 - mkdir build-Input -ea 0 - cd build-Input - + CALL "C:\Program Files\Microsoft Visual Studio\${{ env.VS_VERSION }}\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ env.CMAKE_ARCH }} + + - name: Configure app + shell: cmd + run: | + mkdir install-mm -ea 0 + mkdir build-mm -ea 0 + cd build-mm + + set PATH=${{ env.VCPKG_ROOT }};%PATH% + cmake ^ -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH:PATH=${{ env.Qt6_Dir }} ^ - -DCMAKE_INSTALL_PREFIX:PATH=${{ steps.vars.outputs.WORKSPACE_DIR }}/install-Input ^ - -DINPUT_SDK_PATH:PATH=${{ steps.vars.outputs.WORKSPACE_DIR }}/input-sdk/x64-windows ^ + -DCMAKE_INSTALL_PREFIX:PATH=${{ steps.vars.outputs.WORKSPACE_DIR }}/install-mm ^ + -DCMAKE_TOOLCHAIN_FILE:PATH="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" ^ + -G "${{ env.CMAKE_GENERATOR }}" ^ + -A ${{ env.CMAKE_ARCH }} ^ + -DVCPKG_TARGET_TRIPLET=${{ env.TRIPLET }} ^ + -DVCPKG_INSTALL_OPTIONS="--x-buildtrees-root=C:/src" ^ -DUSE_MM_SERVER_API_KEY=TRUE ^ -DUSE_KEYCHAIN=No ^ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^ - -G "NMake Makefiles" ^ - -S ${{ steps.vars.outputs.WORKSPACE_DIR }}/input ^ + -S ${{ steps.vars.outputs.WORKSPACE_DIR }}/mm ^ -B . - - name: Build Input + - name: Build app shell: cmd run: | - cd build-Input - nmake + cd build-mm + + set PATH=${{ env.VCPKG_ROOT }};%PATH% + + cmake --build ${{ github.workspace }}\build-mm --config Release --verbose - IF NOT EXIST Input.exe (echo err_INPUT_BUILD & exit /b 1) + IF NOT EXIST Release\Input.exe (echo err_INPUT_BUILD & exit /b 1) - - name: Install Input + - name: Install app shell: cmd run: | - cd build-Input - nmake install + cd build-mm + cmake --install ${{ github.workspace }}\build-mm --config Release --verbose - mkdir C:\input-package - mkdir C:\input-package\stage - robocopy ${{ steps.vars.outputs.WORKSPACE_DIR }}/install-Input C:\input-package\stage /E /NFL - dir C:\input-package\stage - - - name: Downloading redist - shell: bash - run: | - URL="https://aka.ms/vs/17/release/vc_redist.x64.exe" - echo "downloading: $URL" - curl -fsSL --connect-timeout 60 -o \ - /c/input-package/stage/vc_redist.x64.exe \ - ${URL} + mkdir C:\mm-package + mkdir C:\mm-package\stage + robocopy ${{ steps.vars.outputs.WORKSPACE_DIR }}/install-mm C:\mm-package\stage /E /NFL + dir C:\mm-package\stage - name: Get TimeStamp id: time @@ -193,11 +170,11 @@ jobs: with: format: 'YYYYMMDD' - - name: create package + - name: Create package shell: cmd run: | - makensis.exe input\scripts\input_win.nsi - xcopy C:\input-package\inputapp-win-x86_64.exe mergin-maps-mobile-win64-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.exe* /Y + makensis.exe mm\scripts\MM_win.nsi + xcopy C:\mm-package\merginmaps-app-win-x86_64.exe mergin-maps-mobile-win64-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.exe* /Y - name: Upload Sdk in Artifacts uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore index fc8720a45..afde8b635 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ test/temp_extra_projects/ input.pro.user* app/android/assets/qgis-data/proj_custom/ app/android/assets/qgis-data/projects/ +app/android/assets/qgis-data/proj +app/android/assets/qgis-data/resources app/android/assets/projects/ app/android/AndroidManifest.xml *.gpkg-wal diff --git a/CMakeLists.txt b/CMakeLists.txt index 87a3c674a..0c0eaeac5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,30 +4,43 @@ cmake_minimum_required(VERSION 3.22) # GLOBAL SETTINGS (call before "project()") # ######################################################################################## -# TODO automatically change with the scripts/update version script +# Note: To update version use script/update_all_versions.bash set(MM_VERSION_MAJOR "2025") set(MM_VERSION_MINOR "6") set(MM_VERSION_PATCH "0") -set(QT_VERSION_DEFAULT "6.8.3") + +if (VCPKG_TARGET_TRIPLET MATCHES ".*ios.*") + set(IOS TRUE) +endif () # Note: we cannot set this for non-android build, since CMake will start looking for # Qt6AndroidMacros.cmake -if (DEFINED ENV{INPUT_SDK_ANDROID_BASE}) +if (ANDROID_ABI) # Workaround for bug https://bugreports.qt.io/browse/QTBUG-112885 in Qt6.5.0 - set(QT_NO_COLLECT_IMPORTED_TARGET_APK_DEPS TRUE) + # set(QT_NO_COLLECT_IMPORTED_TARGET_APK_DEPS TRUE) + + set(ANDROIDAPI "28") # when changed change VCPKG_CMAKE_SYSTEM_VERSION in triplets + # *-android.cmake - set(ANDROIDAPI "28") - set(ANDROID_PLATFORM "android-${ANDROIDAPI}") - set(ANDROID_NDK_PLATFORM "android-${ANDROIDAPI}") + set(ANDROID_PLATFORM "android-${ANDROIDAPI}") # when changed change + # VCPKG_CMAKE_SYSTEM_VERSION in triplets + # *-android.cmake + set(ANDROID_NDK_PLATFORM "android-${ANDROIDAPI}") # when changed change + # VCPKG_CMAKE_SYSTEM_VERSION in + # triplets *-android.cmake set(ANDROID_STL "c++_shared") + set(ANDROID_ARM_NEON ON) # Target/Minimum API levels for Android, used as Input target properties set(INPUT_ANDROID_TARGET_SDK_VERSION "35") set(INPUT_ANDROID_MIN_SDK_VERSION "${ANDROIDAPI}") - set(INPUT_ANDROID_NDK_PATH "$ENV{ANDROID_NDK_ROOT}") + set(INPUT_ANDROID_NDK_PATH "$ENV{ANDROID_NDK_HOME}") if (NOT INPUT_ANDROID_NDK_PATH) - message(FATAL_ERROR "Set required environment variable ANDROID_NDK_ROOT.") + message(FATAL_ERROR "Set required environment variable ANDROID_NDK_HOME.") endif () + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE + "${INPUT_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake" + ) endif () if (IOS) @@ -36,22 +49,20 @@ if (IOS) set(PLATFORM "OS") set(ENABLE_ARC FALSE) set(ENABLE_BITCODE FALSE) - set(DEPLOYMENT_TARGET "16.0") + set(CMAKE_OSX_DEPLOYMENT_TARGET "16.0") # when changed change triplets arm64-ios.cmake endif () -if (APPLE - AND NOT IOS - AND NOT DEFINED ENV{INPUT_SDK_ANDROID_BASE} -) - set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15.0") +if (APPLE AND NOT IOS) + set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0") # when changed change also triplets *-osx.cmake endif () # ######################################################################################## # PROJECT SETUP # ######################################################################################## set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) + +# TODO remove this variable set(INPUT_CMAKE_TEMPLATES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_templates) -set(INPUT_SCRIPTS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/scripts) include(VersionDetect) include(PlatformDetect) @@ -60,7 +71,7 @@ mm_detect_platform() project( Input VERSION ${MM_VERSION_MAJOR}.${MM_VERSION_MINOR}.${MM_VERSION_PATCH} - DESCRIPTION "The easiest way to take your QGIS projects into the field" + DESCRIPTION "Collect. Share. Publish." HOMEPAGE_URL "https://merginmaps.com" LANGUAGES CXX ) @@ -81,21 +92,6 @@ else () set(HAVE_BLUETOOTH_DEFAULT TRUE) endif () -# on android in multi-ABI build, command line variables are NOT passed to -# ExternalProject_Add called by QT. Therefore we need to pass the variables through ENV -if (ANDROID) - if (NOT DEFINED ENV{INPUT_SDK_ANDROID_BASE}) - message( - FATAL_ERROR - "On Android, you need to define INPUT_SDK_ANDROID_BASE as environment variable. Clean build directory and run cmake again!" - ) - else () - set(INPUT_SDK_PATH_DEFAULT $ENV{INPUT_SDK_ANDROID_BASE}) - endif () -else () - set(INPUT_SDK_PATH_DEFAULT "") -endif () - if (DEFINED ENV{INPUT_VERSION_CODE}) set(INPUT_VERSION_CODE_DEFAULT "$ENV{INPUT_VERSION_CODE}") else () @@ -128,12 +124,7 @@ set(IOS_USE_PRODUCTION_SIGNING BOOL "Whether to sign the ios build with production certificate. Used in CI, leave false when building locally to automatically manage signing" ) -set(INPUT_SDK_PATH - ${INPUT_SDK_PATH_DEFAULT} - CACHE - PATH - "Path to the Mergin Maps Mobile-SDK on host machine; on android define ENV variable instead and without the ABI suffix (armeabi-v7a, arm64-v8a)" -) + set(ENABLE_TESTS ${ENABLE_TESTS_DEFAULT} CACHE BOOL "Whether to build tests" @@ -150,11 +141,6 @@ set(USE_KEYCHAIN "Whether to use keychains/wallets to store credentials. If false, we use QSettings" ) -set(QT6_VERSION - ${QT_VERSION_DEFAULT} - CACHE STRING "QT6 version to use" -) - set(INPUT_VERSION_CODE "${INPUT_VERSION_CODE_DEFAULT}" CACHE STRING "Build version (for stores)" @@ -167,29 +153,8 @@ message(STATUS "Mergin Maps Mobile ${version_desc} - ${platform_desc}") # FIND PACKAGES # ######################################################################################## -if (ANDROID) - set(INPUT_SDK_PATH_ANDROID_ABI_armeabi-v7a ${INPUT_SDK_PATH}/arm-android) - - if (NOT EXISTS ${INPUT_SDK_PATH_ANDROID_ABI_armeabi-v7a}) - message(WARNING "INPUT_SDK_PATH arm-android directory does not exist!") - endif () - - set(INPUT_SDK_PATH_ANDROID_ABI_arm64-v8a ${INPUT_SDK_PATH}/arm64-android) - if (NOT EXISTS ${INPUT_SDK_PATH_ANDROID_ABI_arm64-v8a}) - message(WARNING "INPUT_SDK_PATH arm64-android directory does not exist!") - endif () - - set(INPUT_SDK_PATH_MULTI ${INPUT_SDK_PATH_ANDROID_ABI_${ANDROID_ABI}}) - # allow libraries outside of SDK/NDK directory - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) -else () - set(INPUT_SDK_PATH_MULTI ${INPUT_SDK_PATH}) -endif () - find_package( - Qt6 ${QT6_VERSION} + Qt6 COMPONENTS Quick Qml Xml @@ -203,61 +168,76 @@ find_package( Sql Core Core5Compat - REQUIRED -) -find_package( - Qt6 ${QT6_VERSION} - COMPONENTS Multimedia Widgets + Multimedia + Widgets REQUIRED ) +# Qt by default assumes that cmake files live in `lib/cmake`. Point to `share` instead. +# See +# https://github.com/qt/qtbase/blob/39290c508e2c7fa816c6f79b3eb284adc0cad3c0/src/corelib/Qt6AndroidMacros.cmake#L1016C16-L1026 +if (ANDROID) + get_filename_component( + QT_ANDROID_PATH_CMAKE_DIR_${ANDROID_ABI} "${Qt6_DIR}/.." ABSOLUTE + ) + message( + STATUS + "QT_ANDROID_PATH_CMAKE_DIR_${ANDROID_ABI}: ${QT_ANDROID_PATH_CMAKE_DIR_${ANDROID_ABI}}" + ) +endif () + if (NOT IOS) # https://doc.qt.io/qt-6/qtprintsupport-index.html Qt Print Support is not available on - # iOS. + # iOS find_package( - Qt6 ${QT6_VERSION} + Qt6 COMPONENTS PrintSupport REQUIRED ) endif () if (NOT LNX) - find_package(Charset REQUIRED) + # find_package(Charset CONFIG REQUIRED) find_package(Iconv REQUIRED) endif () find_package(ZLIB REQUIRED) -find_package(Bz2 REQUIRED) -find_package(Curl REQUIRED) -find_package(Inih REQUIRED) -find_package(Exiv2 REQUIRED) -find_package(Expat REQUIRED) -find_package(Freexl REQUIRED) -find_package(Gdal REQUIRED) -find_package(Geodiff REQUIRED) -find_package(Geos REQUIRED) -find_package(Jpeg REQUIRED) -find_package(Pq REQUIRED) -find_package(Proj REQUIRED) +# find_package(Bz2 CONFIG REQUIRED) find_package(bzip2 CONFIG REQUIRED) +find_package(CURL CONFIG REQUIRED) +# find_package(Inih CONFIG REQUIRED) +find_package(exiv2 CONFIG REQUIRED) +find_package(expat CONFIG REQUIRED) +# find_package(freexl CONFIG REQUIRED) +find_package(GDAL CONFIG REQUIRED) +find_package(Geodiff CONFIG REQUIRED) +find_package(GEOS CONFIG REQUIRED) +# find_package(Jpeg CONFIG REQUIRED) +find_package(PostgreSQL REQUIRED) +find_package(PROJ CONFIG REQUIRED) find_package(Protobuf REQUIRED) find_package(QGIS REQUIRED) -find_package(Qca REQUIRED) -find_package(Qtkeychain REQUIRED) +find_package(Qca CONFIG REQUIRED) +find_package(Qt6Keychain CONFIG REQUIRED) find_package(Spatialindex REQUIRED) find_package(Spatialite REQUIRED) -find_package(Sqlite3 REQUIRED) -find_package(Tiff REQUIRED) -find_package(WebP REQUIRED) -find_package(Xml2 REQUIRED) -find_package(ZXing REQUIRED) -find_package(Zip REQUIRED) -find_package(OpenSSL REQUIRED) -find_package(Geotiff REQUIRED) -find_package(Lzma REQUIRED) -find_package(Zstd REQUIRED) -find_package(MiniZip REQUIRED) -find_package(Utf8 REQUIRED) -find_package(Absl REQUIRED QUIET) +find_package(unofficial-sqlite3 CONFIG REQUIRED) +# find_package(Tiff CONFIG REQUIRED) +find_package(WebP CONFIG REQUIRED) +# find_package(Xml2 CONFIG REQUIRED) +find_package(ZXing CONFIG REQUIRED) +find_package(libzip CONFIG REQUIRED) +find_package(OpenSSL CONFIG REQUIRED) +find_package(GeoTIFF CONFIG REQUIRED) +# find_package(Lzma CONFIG REQUIRED) find_package(Zstd CONFIG REQUIRED) +find_package(unofficial-minizip CONFIG REQUIRED) +# find_package(Utf8 CONFIG REQUIRED) find_package(Absl CONFIG REQUIRED) +find_package(poly2tri CONFIG) +find_package(meshoptimizer CONFIG REQUIRED) + +if (WIN) + find_package(FFmpeg REQUIRED) + find_package(WinLibraries REQUIRED) +endif () if (IOS OR MACOS) find_package(AppleFrameworks REQUIRED) @@ -266,7 +246,7 @@ endif () if (HAVE_BLUETOOTH) find_package( - Qt6 ${QT6_VERSION} + Qt6 COMPONENTS Bluetooth REQUIRED ) @@ -274,7 +254,7 @@ endif () if (ENABLE_TESTS) find_package( - Qt6 ${QT6_VERSION} + Qt6 COMPONENTS Test REQUIRED ) @@ -337,6 +317,8 @@ if (ENABLE_TESTS) set(TEST_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/test/test_data") endif () +set(MM_FORMATS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/docs/supported_formats.txt") + configure_file( ${CMAKE_SOURCE_DIR}/cmake_templates/inputconfig.h.in ${CMAKE_BINARY_DIR}/inputconfig.h ) @@ -375,6 +357,86 @@ if (IOS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-shorten-64-to-32") endif () +if (ANDROID) + if (VCPKG_TARGET_TRIPLET STREQUAL "arm-android") + set(CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} -fPIC -fstack-protector-strong -lunwind -Wl,--exclude-libs=libunwind.a" + ) + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -fPIC -fstack-protector-strong -lunwind -Wl,--exclude-libs=libunwind.a" + ) + else () + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fstack-protector-strong") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fstack-protector-strong") + endif () + + link_libraries("-ljnigraphics") + + # Make sure the generator for android_deployment_settings.json can figure out the + # architecture + list(APPEND CMAKE_FIND_ROOT_PATH /) + + # set(ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_BINARY_DIR}/android-template) +endif () + +if (ANDROID) + if (VCPKG_TARGET_TRIPLET STREQUAL "arm-android") + set(CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} -fPIC -fstack-protector-strong -lunwind -Wl,--exclude-libs=libunwind.a" + ) + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -fPIC -fstack-protector-strong -lunwind -Wl,--exclude-libs=libunwind.a" + ) + else () + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fstack-protector-strong") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fstack-protector-strong") + endif () + + link_libraries("-ljnigraphics") + + # Make sure the generator for android_deployment_settings.json can figure out the + # architecture + list(APPEND CMAKE_FIND_ROOT_PATH /) + + # set(ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_BINARY_DIR}/android-template) +endif () + +# ######################################################################################## +# RESOURCES +# ######################################################################################## +message(STATUS "Copying proj and qgis resources to android/assets/qgis-data") +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/app/android/assets/qgis-data/resources) +file(COPY ${QGIS_RESOURCE_DIR}/qgis.db + DESTINATION ${CMAKE_BINARY_DIR}/app/android/assets/qgis-data/resources/ +) +file(COPY ${QGIS_RESOURCE_DIR}/srs.db + DESTINATION ${CMAKE_BINARY_DIR}/app/android/assets/qgis-data/resources/ +) +file( + COPY ${PROJ_DIR} + DESTINATION ${CMAKE_BINARY_DIR}/app/android/assets/qgis-data/ + PATTERN "*.cmake" EXCLUDE + PATTERN "vcpkg*" EXCLUDE +) + +# ######################################################################################## +# RESOURCES +# ######################################################################################## +message(STATUS "Copying proj and qgis resources to android/assets/qgis-data") +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/app/android/assets/qgis-data/resources) +file(COPY ${QGIS_RESOURCE_DIR}/qgis.db + DESTINATION ${CMAKE_BINARY_DIR}/app/android/assets/qgis-data/resources/ +) +file(COPY ${QGIS_RESOURCE_DIR}/srs.db + DESTINATION ${CMAKE_BINARY_DIR}/app/android/assets/qgis-data/resources/ +) +file( + COPY ${PROJ_DIR} + DESTINATION ${CMAKE_BINARY_DIR}/app/android/assets/qgis-data/ + PATTERN "*.cmake" EXCLUDE + PATTERN "vcpkg*" EXCLUDE +) + # ######################################################################################## # SUBDIRECTORIES # ######################################################################################## @@ -393,7 +455,7 @@ if (WIN OR LNX OR MACOS ) - # qt_add_executable on Android automatically creates target for apk/aab on IOS we use - # xcodebuild to build ipa + # qt_add_executable - on Android automatically creates target for apk/aab - on IOS we + # use xcodebuild to build ipa include(InstallStep) endif () diff --git a/INSTALL.md b/INSTALL.md index 617067b15..eda6b3fa9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -6,7 +6,6 @@ - [2. Overview](#2-overview) - [2.1 Secrets](#21-secrets) - [2.2 Code formatting](#22-code-formatting) - - [2.3 Required Qt packages](#23-required-qt-packages) - [3. Building GNU/Linux](#3-building-gnulinux) - [4. Building Android (on Linux/macOS/Windows)](#4-building-android-on-linuxmacoswindows) - [4.1. Android on Ubuntu](#41-android-on-ubuntu) @@ -42,18 +41,15 @@ place for describing build procedures. Please do not remove this notice. # 2. Overview -Mobile app, like a number of major projects (e.g., KDE 4.0), +Mobile app, like a number of major projects (e.g., KDE), uses [CMake](https://www.cmake.org) for building from source. It is C++ application build on top of [Qt](https://www.qt.io), [QGIS](https://www.qgis.org/en/site/) and many other FOSS libraries. -All required libraries (in release configuration) are packaged in the [Mobile-SDK](https://github.com/MerginMaps/mobile-sdk). -If you need to debug some error in the library, you need to compile Mobile-SDK in debug yourself locally. Otherwise, -it is suggested to download required libraries from [Mobile-SDK tags](https://github.com/MerginMaps/mobile-sdk/tags). -Mobile-SDK uses vcpkg packaging system, so if the SDK for your target system/architecture you can build it yourself. +All required libraries are build with [vcpkg](https://vcpkg.io/en/) C/C++ package manager as part of the CMake's configure step. -Generally, for building setup, you need the same versions of libraries/SDKs/NDKs/compilers as used in the official +Generally, for building setup, we recommend to use the same versions of libraries/SDKs/NDKs/compilers as used in the official [GitHub Actions](https://github.com/MerginMaps/mobile/tree/master/.github/workflows). Open workflow file for your platform/target and see the version of libraries used and replicate it in your setup. @@ -66,7 +62,7 @@ As a developer, if you want to develop against local Mergin Maps server, it is O work with public or dev server, you need to manually decrypt the file. Decrypted file is never pushed to git! -The password for decryption is in our password manager. +The password for decryption is in Lutra's password manager. if you want to change the secrets, decrypt, change and encrypt the file with [openssl](http://stackoverflow.com/questions/16056135/ddg#16056298), also @@ -88,77 +84,108 @@ openssl aes-256-cbc -d -in merginsecrets.cpp.enc -out merginsecrets.cpp -md md5 ## 2.2 Code formatting We use `astyle` to format CPP and Objective-C files. Format is similar to what QGIS has. -For more details about code conventions, please read [our code conventions doc](./docs/code_convention.md). +We use `cmake-format` to format CMake files. -We also use software [pre-commit](https://pre-commit.com/) to automatically check format when doing a commit. -You need to install it via `brew`/`pip`, see [installation details](https://pre-commit.com/#installation). +All the scripts are located in `scripts/format_*` and you can check +[GitHub Actions](https://github.com/MerginMaps/mobile/tree/master/.github/workflows/code_style.yml) to see +their usage -In order to start using the `pre-commit`, run `pre-commit install` in the repository root folder. +For more details about code conventions, please read our [code conventions doc](./docs/code_convention.md). -To manually run the style check, run `pre-commit run --all-files` or optionally run script `format_cpp.sh` (we use this one in CI currently). +## 2.3 Qt packages -In case you want to skip execution of pre-commit hooks, add additional flag `--no-verify` to your commit command, e.g.: `git commit -m "nit" --no-verify` +Mergin Maps Mobile app is built with Qt. Qt is build with vcpkg as part of the configure step, but it is recommended +to install QtCreator and Qt on your host to be able to release translations. -## 2.3 Required Qt packages +## 2.4 Vcpkg -Mergin Maps Mobile app is built with Qt. If you are using Qt's `Maintenance tool`, make sure to install these packages: - - `Android` -> when building for Android - - `iOS` -> when building for iOS - - `macOS` -> or other desktop platform based on your host machine - - `Qt 5 Compatibility Module` - - `Qt Shader Tools` - - `Additional libraries:` - - `Qt Connectivity` -> used for Bluetooth - - `Qt Network Auth` - - `Qt Multimedia` - - `Qt Positioning` - - `Qt Sensors` +Dependencies are build with vcpkg. To fix the version of libraries, you need to download vcpkg and checkout to git commit specified +in the file `VCPKG_BASELINE` in the repository. + ``` + mkdir -p vcpkg + cd vcpkg + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + VCPKG_TAG=`cat VCPKG_BASELINE` + git checkout ${VCPKG_TAG} + cd "${{ env.VCPKG_ROOT }}" + chmod +x ./bootstrap-vcpkg.sh + ./bootstrap-vcpkg.sh + ``` + +## 2.4 ccache + +Install and configure ccache for development. It speeds up the development significantly. + # 3. Building GNU/Linux -This guide is tested with Ubuntu 22.04, on other distros some steps may need some adjustments. +## 3.1 Ubuntu 22.04 Steps to build and run mobile app: 1. Install some dependencies, critically bison and flex. See "Install Build Dependencies" step in `.github/workflows/linux.yml` -2. Get Mobile-SDK - it contains pre-built dependencies of libraries used by mobile app - - - Check what SDK version is currently in use - look for `INPUT_SDK_VERSION` in `.github/workflows/linux.yml` - - Download Mobile-SDK for Linux - go to https://github.com/merginmaps/mobile-sdk/releases and download the built SDK. - - Unpack the downloaded .tar.gz to `~/mobile-sdk/x64-linux` - -3. Get Qt libraries - currently Mobile-SDK does not include Qt SDK. - - - Ubuntu's system libraries are too old, and we recommend to use Qt's online installer - - Check what Qt version is currently in use - look for `QT_VERSION` in `.github/workflows/linux.yml` - - Download Qt online installer from https://www.qt.io/download-open-source - - Use the online installer to install Qt to `~/Qt` - - Fedora and any more recent distribution can probably use the system packages - - Check what Qt version is currently in use - look for `QT_VERSION` in `.github/workflows/linux.yml` - - If the system package version is same or higher use it - -4. Build mobile app (update CMake command with the correct Qt version) - - If you are using system packages drop `-DCMAKE_PREFIX_PATH=~/Qt//gcc_64` from the command + ``` + sudo apt-get install -y \ + gperf autopoint '^libxcb.*-dev' libx11-xcb-dev libegl1-mesa libegl1-mesa-dev \ + libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev \ + autoconf-archive libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libfuse2 \ + bison flex lcov nasm libxrandr-dev xvfb + ``` + + Also install CMake 3.x, Ninja and ccache +2. Install vcpkg and checkout to correct version from file `VCPKG_BASELINE` + Read [vcpkg](#vcpkg) section. + + +3. Configure mobile app + We assume the structure on the system: ``` - mkdir build + mm1/ + build/ + vcpkg/ + mobile/ + ``` + + This is command line to setup build system. As part of the cmake configure step it will compile all the deps (Qt, GDAL, QGIS), so it + can take considerable time (e.g. an hour). Subsequent runs will be faster as the libraries without change will be taken from local + binary vcpkg cache. + + Alternatively you can open QtCreator and add cmake defines to the QtCreator Project setup table and configure from QtCreator (recommended for + development and debugging) + + To use USE_MM_SERVER_API_KEY read [Secrets](#Secrets) section. + + ``` + mkdir -p build cd build - cmake -G Ninja \ - -DCMAKE_PREFIX_PATH=~/Qt//gcc_64 \ - -DINPUT_SDK_PATH=~/mobile-sdk/x64-linux \ - -DQGIS_QUICK_DATA_PATH=../app/android/assets/qgis-data \ - -DUSE_MM_SERVER_API_KEY=FALSE \ - .. + cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DVCPKG_TARGET_TRIPLET=x64-linux \ + -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DQGIS_QUICK_DATA_PATH=/build/app/android/assets/qgis-data \ + -DUSE_MM_SERVER_API_KEY=FALSE \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DENABLE_TESTS=TRUE \ + -GNinja \ + -S ../mobile + ``` +4. Build application + + ``` ninja ``` - + 5. Run mobile app ``` ./app/Input ``` - + + For testing read [Auto Testing](#AutoTesting) section. # 4. Building Android (on Linux/macOS/Windows) @@ -174,114 +201,182 @@ For building ABIs see https://www.qt.io/blog/android-multi-abi-builds-are-back - See current versions of build tools (`SDK_BUILD_TOOLS`), ndk (`NDK_VERSION`) and platform (`SDK_PLATFORM`) in `.github/workflows/android.yml` - `./cmdline-tools/bin/sdkmanager --sdk_root=./ "build-tools;" "ndk;" "platforms;" platform-tools tools` - flex and bison + - set up your own developer keystore. Creating the key(store) can be done either with Android studio or on command line + with `keytool -genkeypair`. -2. Get Mobile-SDK - it contains pre-built dependencies of libraries used by mobile app +2. Build mobile app (update CMake command with the correct Qt and Android NDK versions) - - Check what SDK version is currently in use - look for `INPUT_SDK_VERSION` in `.github/workflows/android.yml` - - Download **TWO** Mobile-SDKs for android - go to https://github.com/merginmaps/mobile-sdk/releases and download the built SDK. - - Unpack the downloaded .tar.gz to `~/mobile-sdk/arm-android` and `~/mobile-sdk/arm64-android` - - WARNING!! It is super important to have both SDKs in same subfolder (e.g. `~/mobile-sdk`) and have folder name `arm64-android` and `arm-android` + We recommended to have **RelWithDebInfo** builds, which requires signing the APK with your key. -3. Get Qt libraries - currently Mobile-SDK does not include Qt SDK. - - - Ubuntu's system libraries are too old, and usually system packages don't contain android Qt packages - - Either use online installer: - - You need both linux and android Qt installed! - - Check what Qt version is currently in use - look for `QT_VERSION` in `.github/workflows/android.yml` - - Download Qt online installer from https://www.qt.io/download-open-source - - Use the online installer to install Qt to `~/Qt` - - Or cross-compile Qt for android - -4. Build mobile app (update CMake command with the correct Qt and Android NDK versions) -``` - mkdir build - cd build + We assume the structure on the system: - export ANDROID_SDK_ROOT=~/android; - export ANDROID_NDK_ROOT=~/android/ndk/; - export QT_BASE=~/Qt/; - export INPUT_SDK_ANDROID_BASE=~/mobile-sdk; + ``` + mm1/ + build/ + vcpkg/ + mobile/ + ``` + + This is command line to setup build system. As part of the cmake configure step it will compile all the deps (Qt, GDAL, QGIS), so it + can take considerable time (e.g. an hour). Subsequent runs will be faster as the libraries without change will be taken from local + binary vcpkg cache. + + ``` + export ANDROID_NDK_HOME=/home//android/ndk/ + export ANDROID_SDK_ROOT=/home//android + export QT_ANDROID_KEYSTORE_ALIAS= + export QT_ANDROID_KEYSTORE_KEY_PASS= + export QT_ANDROID_KEYSTORE_STORE_PASS= + export QT_ANDROID_KEYSTORE_PATH= + + cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DANDROID_ABI=arm64-v8a \ + -DQT_ANDROID_ABIS=arm64-v8a \ + -DVCPKG_HOST_TRIPLET=x64-linux \ + -DVCPKG_TARGET_TRIPLET=arm64-android \ + -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_INSTALL_OPTIONS="--allow-unsupported" \ + -DUSE_MM_SERVER_API_KEY=TRUE \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DANDROID_SDK_ROOT=/home//android \ + -DQT_ANDROID_SIGN_APK=Yes + -GNinja \ + -S ../mobile \ + -B ./ + ``` + + Alternatively you can open QtCreator and add cmake defines to the QtCreator Project setup table and configure from QtCreator (recommended for + development and debugging) + + + Add this to build env. + + ``` + PATH=+/Users//Projects/quick/build/vcpkg + ANDROID_NDK_HOME=/Users//android/ndk/ + ANDROID_SDK_ROOT=/Users//android + QT_ANDROID_KEYSTORE_ALIAS= + QT_ANDROID_KEYSTORE_KEY_PASS= + QT_ANDROID_KEYSTORE_STORE_PASS= + QT_ANDROID_KEYSTORE_PATH= + ``` + And this to cmake options + + ``` + ANDROID_ABI=arm64-v8a + QT_ANDROID_ABIS=arm64-v8a + VCPKG_HOST_TRIPLET=x64-linux + VCPKG_TARGET_TRIPLET=arm64-android + CMAKE_TOOLCHAIN_FILE="../vcpkg/scripts/buildsystems/vcpkg.cmake" + VCPKG_INSTALL_OPTIONS="--allow-unsupported" + CMAKE_CXX_COMPILER_LAUNCHER=ccache + ANDROID_SDK_ROOT=/Users//android + QT_ANDROID_SIGN_APK=Yes + ``` - cmake \ - -DCMAKE_BUILD_TYPE=Debug \ - -DQT_ANDROID_ABIS="arm64-v8a" \ - -DQT_HOST_PATH=$QT_BASE/gcc_64 \ - -DCMAKE_TOOLCHAIN_FILE=$QT_BASE/android_arm64_v8a/lib/cmake/Qt6/qt.toolchain.cmake \ - -DUSE_MM_SERVER_API_KEY=FALSE \ - -GNinja \ - ../input/ - ninja apk -``` + To use USE_MM_SERVER_API_KEY read [Secrets](#Secrets) section. -## 4.2. Android on macOS -1. Get Qt libraries - - - You need both macOS and android Qt installed! - - Check what Qt version is currently in use - look for `QT_VERSION` in `.github/workflows/android.yml` - - Download Qt online installer from https://www.qt.io/download-open-source - - Use the online installer to install Qt to `~/Qt` - - Needed packages can be found in the [section 2.3](#23-required-qt-packages) - -2. Install Java +## 4.2. Android on macOS +1. Install Java - `brew install openjdk@17`, then make this java version default ``export JAVA_HOME=`usr/libexec/java_home -v 17` ``. Check if it's default by executing `java --version` -3. Setup Android SDK & NDK [Automatic, via QtCreator] +2. Setup Android SDK & NDK - This step can now be performed via QtCreator, if it for some reason fails/does not work, skip this step and continue with manual setup - Open QtCreator and navigate to `settings -> devices -> Android`, here: - - JDK location: Add Path to Java version, e.g. `/opt/homebrew/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home` + - JDK location: Add Path to Java version, e.g. `/opt/homebrew/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home` (or /opt/homebrew/Cellar/openjdk@17/17.0.15/libexec/openjdk.jdk/Contents/Home/) - Android SDK location: set path to some empty writeable directory, e.g. `~/android` - Hit `Set up SDK` and install the current SDK version (find the correct version in `.github/workflows/android.yml`) - Let QtCreator install NDK - Let QtCreator install openssl - QtCreator should now say `Android settings are OK.` -4. Setup Android SDK & NDK [Manual, via sdkmanager] - - Proceed with this step only if the previous automatic step did not work for you or you do not want to use QtCreator + - If the previous automatic step did not work for you or you do not want to use QtCreator + - Get Android `sdkmanager` by following these steps https://developer.android.com/tools/sdkmanager + - See current versions of build tools (`SDK_BUILD_TOOLS`), ndk (`NDK_VERSION`) and platform (`SDK_PLATFORM`) in `.github/workflows/android.yml` + - Now perform `./cmdline-tools/bin/sdkmanager --sdk_root=./ "build-tools;" "ndk;" "platforms;" platform-tools tools` to install all needed Android tools, make sure to double-check if the version numbers are correct - - Get Android `sdkmanager` by following these steps https://developer.android.com/tools/sdkmanager - - See current versions of build tools (`SDK_BUILD_TOOLS`), ndk (`NDK_VERSION`) and platform (`SDK_PLATFORM`) in `.github/workflows/android.yml` - - Now perform `./cmdline-tools/bin/sdkmanager --sdk_root=./ "build-tools;" "ndk;" "platforms;" platform-tools tools` to install all needed Android tools, make sure to double-check if the version numbers are correct - -5. Get Mobile-SDK - it contains pre-built dependencies of used libraries (QGIS, etc..) - - - Check what SDK version is currently in use - look for `INPUT_SDK_VERSION` in `.github/workflows/android.yml` - - Download **TWO** SDKs for android (arm and arm64) - go to https://github.com/merginmaps/mobile-sdk/releases and download the built SDK. - - Unpack the downloaded .tar.gz to `~/mobile-sdk/arm-android` and `~/mobile-sdk/arm64-android` - - WARNING!! It is super important to have both SDKs in same subfolder (e.g. `~/mobile-sdk`) and have folder name `arm64-android` and `arm-android` +3. Configure + + We recommended to have **RelWithDebInfo** builds -6. Build (update CMake command with the correct Qt and SDK versions) + We assume the structure on the system: + + ``` + mm1/ + build/ + vcpkg/ + mobile/ + ``` + + This is command line to setup build system. As part of the cmake configure step it will compile all the deps (Qt, GDAL, QGIS), so it + can take considerable time (e.g. an hour). Subsequent runs will be faster as the libraries without change will be taken from local + binary vcpkg cache. + + ``` + export ANDROID_NDK_HOME=/Users//android/ndk/ + export ANDROID_SDK_ROOT=/Users//android + export QT_ANDROID_KEYSTORE_ALIAS= + export QT_ANDROID_KEYSTORE_KEY_PASS= + export QT_ANDROID_KEYSTORE_STORE_PASS= + export QT_ANDROID_KEYSTORE_PATH= + + cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DANDROID_ABI=arm64-v8a \ + -DQT_ANDROID_ABIS=arm64-v8a \ + -DVCPKG_HOST_TRIPLET=arm64-osx \ + -DVCPKG_TARGET_TRIPLET=arm64-android \ + -DCMAKE_TOOLCHAIN_FILE="../vcpkg/scripts/buildsystems/vcpkg.cmake" \ + -DVCPKG_INSTALL_OPTIONS="--allow-unsupported" \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DANDROID_SDK_ROOT=/Users//android \ + -DQT_ANDROID_SIGN_APK=Yes \ + -GNinja \ + -S ../mobile \ + -B ./ + ``` + + Alternatively you can open QtCreator and add cmake defines to the QtCreator Project setup table and configure from QtCreator (recommended for + development and debugging) + -``` - # Needed Android variables - export ANDROID_SDK_ROOT=~/android; - export ANDROID_NDK_ROOT=~/android/ndk/; - - # INPUT_SDK_ANDROID_BASE is a path where you stored the two SDKs from the mobile-sdk repo - export INPUT_SDK_ANDROID_BASE=~/mobile-sdk; - - # (optional, not needed often) add Java to PATH if you need to use other Java version than your default one - export PATH=/opt/homebrew/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home/bin:$PATH; - - cmake \ - -DCMAKE_BUILD_TYPE=Debug \ - -DQT_ANDROID_ABIS=arm64-v8a \ - -DQT_HOST_PATH=/opt/Qt//macos \ - -DCMAKE_TOOLCHAIN_FILE=/opt/Qt//android_arm64_v8a/lib/cmake/Qt6/qt.toolchain.cmake \ - -DUSE_MM_SERVER_API_KEY=FALSE \ - -GNinja \ - ../input/ - - # If you need to build both ABIS, use -DQT_ANDROID_ABIS="arm64-v8a;armeabi-v7a" -``` + Add this to build env. + ``` + PATH=+/opt/homebrew/bin + PATH=+/opt/homebrew/Cellar/flex/2.6.4_2/bin + PATH=+/opt/homebrew/Cellar/bison/3.8.2/bin + PATH=+/Users//Projects/quick/build/vcpkg + ANDROID_NDK_HOME=/Users//android/ndk/ + ANDROID_SDK_ROOT=/Users//android + QT_ANDROID_KEYSTORE_ALIAS= + QT_ANDROID_KEYSTORE_KEY_PASS= + QT_ANDROID_KEYSTORE_STORE_PASS= + QT_ANDROID_KEYSTORE_PATH= + ``` + And this to cmake options + ``` + ANDROID_ABI=arm64-v8a + QT_ANDROID_ABIS=arm64-v8a + VCPKG_HOST_TRIPLET=arm64-osx + VCPKG_TARGET_TRIPLET=arm64-android + CMAKE_TOOLCHAIN_FILE="../vcpkg/scripts/buildsystems/vcpkg.cmake" + VCPKG_INSTALL_OPTIONS="--allow-unsupported" + CMAKE_CXX_COMPILER_LAUNCHER=ccache + ANDROID_SDK_ROOT=/Users//android + QT_ANDROID_SIGN_APK=Yes + ``` + + + To use USE_MM_SERVER_API_KEY read [Secrets](#Secrets) section. + ## 4.3. Android on Windows -**Note to document writers:**: This section needs a proper rewrite - Even technically it should be possible, we haven't tried this setup yet. If you managed to compile mobile app for Android on Windows, please help us to update this section. @@ -292,135 +387,204 @@ mobile app for Android on Windows, please help us to update this section. 1. Setup development environment - XCode - - build tools, see requirements in `.github/workflows/ios.yml` + - install deps, see requirements in `.github/workflows/ios.yml`. Most specifically cmake 3.x, ninja, bison and flex (on PATH) - if you want to build for production, you need development certificates. These are not needed for local development, signing is handled automatically (see IOS_USE_PRODUCTION_SIGNING cmake variable for more info). You can get the certificates by following: - Get device UDID: either iTunes or about this mac->system report->USB->find iPAD (Serial Number) - Create dev iOS certificate for development - Create provisioning profile for mobile app + your certificate + your device (for this ask Lutra Apple development team) - - ios-toolchain - - download ios.toolchain.cmake from https://github.com/leetal/ios-cmake to `~/mobile-sdk/ios.toolchain.cmake` - - version from `.github/workflows/ios.yml` - -2. Get Mobile-SDK - it contains pre-built dependencies of libraries used by mobile app - - Check what SDK version is currently in use - look for `INPUT_SDK_VERSION` in `.github/workflows/ios.yml` - - Download Mobile-SDKs for ios - go to https://github.com/merginmaps/mobile-sdk/releases and download the built SDK. - - Unpack the downloaded .tar.gz to `~/mobile-sdk/arm64-ios` - -3. Get Qt libraries +2. Install vcpkg and checkout to correct version from file `VCPKG_BASELINE` + Read [vcpkg](#vcpkg) section. - - You need both macOS and ios Qt installed! - - Check what Qt version is currently in use - look for `QT_VERSION` in `.github/workflows/ios.yml` - - Download Qt online installer from https://www.qt.io/download-open-source - - Use the online installer to install Qt to `/opt/Qt` +3. Configure mobile app + We assume the structure on the system: + + ``` + mm1/ + build/ + vcpkg/ + mobile/ + ``` + + This is command line to setup build system. As part of the cmake configure step it will compile all the deps (Qt, GDAL, QGIS), so it can take considerable time (e.g. an hour). Subsequent runs will be faster as the libraries without change will be taken from local binary vcpkg cache. + + Alternatively you can open QtCreator and add cmake defines to the QtCreator Project setup table and configure from QtCreator (recommended for development and debugging) + + To use USE_MM_SERVER_API_KEY read [Secrets](#Secrets) section. + + Note: make sure you adjust VCPKG_HOST_TRIPLET and CMAKE_SYSTEM_PROCESSOR if you use x64-osx host machine. + + ``` + cd build + + export PATH=$(brew --prefix flex)/bin:$(brew --prefix bison)/bin:$(brew --prefix gettext)/bin:$PATH;\ + export PATH=${PWD}/../vcpkg:$PATH;\ + PATH=/Applications/CMake.app/Contents/bin/:$PATH + + cmake \ + -DVCPKG_HOST_TRIPLET=arm64-osx \ + -DCMAKE_SYSTEM_PROCESSOR=aarch64 \ + -DVCPKG_TARGET_TRIPLET=arm64-ios \ + -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake \ + -D ENABLE_BITCODE=OFF \ + -D ENABLE_ARC=ON \ + -D CMAKE_CXX_VISIBILITY_PRESET=hidden \ + -D CMAKE_SYSTEM_NAME=iOS \ + -DIOS=TRUE \ + -DUSE_MM_SERVER_API_KEY=FALSE \ + -G "Xcode" \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -S ../mobile \ + -B ./ + ``` -4. Build mobile app (update CMake command with the correct Qt and Mobile-SDK versions) +4. Build mobile app Now you can create a build (either on command line or by setting these variables in Qt Creator) ``` - mkdir build - mkdir install cd build - cmake \ - -DIOS=TRUE \ - -DCMAKE_PREFIX_PATH=/opt/Qt//ios \ - -DQT_HOST_PATH=/opt/Qt//macos \ - -DCMAKE_TOOLCHAIN_FILE:PATH="~/mobile-sdk/ios.toolchain.cmake" \ - -DCMAKE_INSTALL_PREFIX:PATH="../install" \ - -DUSE_SERVER_API_KEY=FALSE \ - -DINPUT_SDK_PATH=~/mobile-sdk/arm64-ios \ - -G "Xcode" \ - ../input + xcodebuild \ + -project Input.xcodeproj/ \ + -scheme Input \ + -sdk iphoneos \ + -configuration Release \ + archive -archivePath Input.xcarchive ``` # 6. Building macOS 1. Install some dependencies, critically XCode, bison and flex. See "Install Build Dependencies" step in `.github/workflows/macos.yml` - -2. Get Mobile-SDK - it contains pre-built dependencies of used libraries - - - Check what SDK version is currently in use - look for `INPUT_SDK_VERSION` in `.github/workflows/macos.yml` - - Download Mobile-SDK for `osx` - go to https://github.com/merginmaps/mobile-sdk/releases and download the built SDK. - - Unpack the downloaded .tar.gz to `~/mobile-sdk/x64-osx` or `~/mobile-sdk/arm64-osx` - -3. Get Qt libraries - Mobile-SDK does not include Qt SDK - - - Check what Qt version is currently in use - look for `QT_VERSION` in `.github/workflows/macos.yml` - - Download Qt online installer from https://www.qt.io/download-open-source - - Use the online installer to install Qt to `/opt/Qt` - -4. Build (update CMake command with the correct Qt and paths) - - ``` - mkdir build-desktop - cd build-desktop +``` + brew install cmake automake bison flex gnu-sed autoconf-archive libtool ninja pkg-config +``` + install cmake 3.x + + Note: + - cmake 4.0.1 is broken (empty -isysroot) + - TODO test with cmake 4.0.3 which is today's + +2. Install vcpkg and checkout to correct version from file `VCPKG_BASELINE` + Read [vcpkg](#vcpkg) section. + +3. Configure mobile app + We assume the structure on the system: + + ``` + mm1/ + build/ + vcpkg/ + mobile/ + ``` + + This is command line to setup build system. As part of the cmake configure step it will compile all the deps (Qt, GDAL, QGIS), so it can take considerable time (e.g. an hour). Subsequent runs will be faster as the libraries without change will be taken from local binary vcpkg cache. + + Alternatively you can open QtCreator and add cmake defines to the QtCreator Project setup table and configure from QtCreator (recommended for development and debugging) + + To use USE_MM_SERVER_API_KEY read [Secrets](#Secrets) section. - cmake \ + Note: for x64-osx (intel laptops) build use VCPKG_TARGET_TRIPLET instead of arm64-osx (Mx laptops) + + ``` + cd build + + export PATH=$(brew --prefix flex)/bin:$(brew --prefix bison)/bin:$(brew --prefix gettext)/bin:$PATH;\ + export PATH=${PWD}/../vcpkg:$PATH;\ + PATH=/Applications/CMake.app/Contents/bin/:$PATH + + cmake \ -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_PREFIX_PATH=/opt/Qt//macos \ - -DINPUT_SDK_PATH= \ - -DQGIS_QUICK_DATA_PATH=/app/android/assets/qgis-data \ + -DVCPKG_TARGET_TRIPLET=arm64-osx \ + -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DUSE_MM_SERVER_API_KEY=FALSE \ + -DQGIS_QUICK_DATA_PATH=app/android/assets/qgis-data \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DENABLE_TESTS=TRUE \ -GNinja \ - .. - - ninja - ``` + -DCMAKE_MAKE_PROGRAM=ninja \ + -S ../mobile + ``` + +4. Build application + + ``` + ninja + ``` 5. Run the mobile app - ``` - ./app/Input.app/Contents/MacOS/Input - ``` + ``` + ./app/Input.app/Contents/MacOS/Input + ``` # 7. Building Windows -For version of the tools used, see `.github/workflows/win.yml` +1. Install some dependencies. See `.github/workflows/win.yml` + Critically Visual Studio, cmake, bison and flex. Setup build VS environment (adjust to your version) + ``` + "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64 + ``` -- download Mobile-SDK for win, extract to C:\projects\mobile-sdk\win-sdk -- download and install Qt -- download and install QtCreator for debugging executable -- download and install Visual Studio, SDK, Python, Cmake -- (optional) install ccache and add to PATH -- open cmd -- setup build environment -``` -set ROOT_DIR=C:\Users\\Projects -set Qt6_DIR=C:\Qt\\msvc2019_64 -set PATH=%QT_ROOT%\bin;C:\Program Files\CMake\bin\;%PATH% -"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=x64 -``` +2. Install vcpkg and checkout to correct version from file `VCPKG_BASELINE` + Read [vcpkg](#vcpkg) section. -- configure -``` -cd %ROOT_DIR%\build\input - -cmake ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_PREFIX_PATH:PATH=%Qt6_Dir%^ - -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\install\input ^ - -DINPUT_SDK_PATH:PATH=%ROOT_DIR%\mobile-sdk\x64-windows ^ - -G "NMake Makefiles" ^ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^ - -S %ROOT_DIR%\input ^ - -B . -``` +3. Configure mobile app + We assume the structure on the system: + + ``` + mm1/ + build/ + vcpkg/ + mobile/ + ``` + + This is command line to setup build system. As part of the cmake configure step it will compile all the deps (Qt, GDAL, QGIS), so it + can take considerable time (e.g. an hour). Subsequent runs will be faster as the libraries without change will be taken from local + binary vcpkg cache. + + Alternatively you can open QtCreator and add cmake defines to the QtCreator Project setup table and configure from QtCreator (recommended for + development and debugging) + + To use USE_MM_SERVER_API_KEY read [Secrets](#Secrets) section. + + ``` + mkdir build + cd build -- build -``` -set CL=/MP -nmake -``` + cmake ^ + -DCMAKE_BUILD_TYPE=Debug ^ + -DCMAKE_TOOLCHAIN_FILE:PATH="../vcpkg/scripts/buildsystems/vcpkg.cmake" ^ + -G "Visual Studio 17 2022" ^ + -A x64 ^ + -DVCPKG_TARGET_TRIPLET=x64-windows ^ + -DUSE_MM_SERVER_API_KEY=FALSE ^ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^ + -S ../mobile ^ + -B . + ``` + +4. Build application + + ``` + cd build + cmake --build . --config Release --verbose + ``` + +5. Run the mobile app + ``` + ./app/input.exe + ``` # 8. Common problems - If you have "error: undefined reference to 'stdout'" or so, make sure that in BUILD ENV you have ANDROID_NDK_PLATFORM=android-24 or later! - ![image](https://user-images.githubusercontent.com/22449698/166630970-a776576f-c505-4265-b4c8-ffbe212c6745.png) - If for all projects the OSM layer fails to load the `QGIS_QUICK_DATA_PATH` is probably wrong - Check where the projects are getting created - - Either change the path to point to `app/android/assets/qgis-data` of the project directory or copy the `proj` directory - from project directory to the same directory in the build directory + - And change the path to point to `app/android/assets/qgis-data` of the build directory +- If images in feature forms are not getting loaded it's again probably problem with `QGIS_QUICK_DATA_PATH` + - Use absolute path instead of relative path + - Make sure it's targeting **build** directory # 9. Auto Testing @@ -438,4 +602,4 @@ TEST_API_PASSWORD= ``` Build binary, and you can run tests either with `ctest` or you can run individual tests by adding `--test` -e.g. ` ./input --testMerginApi` +e.g. ` ./input --testMerginApi` \ No newline at end of file diff --git a/README.md b/README.md index fdd1ab707..9e20b8a02 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ Platform builds: [![iOS Build](https://github.com/MerginMaps/mobile/workflows/iOS%20Build/badge.svg)](https://github.com/MerginMaps/mobile/actions?query=workflow%3A%22iOS+Build%22) [![win64 Build](https://github.com/MerginMaps/mobile/actions/workflows/win.yml/badge.svg)](https://github.com/MerginMaps/mobile/actions/workflows/win.yml) [![macOS Build](https://github.com/MerginMaps/mobile/actions/workflows/macos.yml/badge.svg)](https://github.com/MerginMaps/mobile/actions/workflows/macos.yml) -[![macOS (arm64) Build](https://github.com/MerginMaps/mobile/actions/workflows/macos_arm64.yml/badge.svg)](https://github.com/MerginMaps/mobile/actions/workflows/macos_arm64.yml) [![linux Build](https://github.com/MerginMaps/mobile/actions/workflows/linux.yml/badge.svg)](https://github.com/MerginMaps/mobile/actions/workflows/linux.yml) Other Checks: diff --git a/VCPKG_BASELINE b/VCPKG_BASELINE new file mode 100644 index 000000000..6e42e8238 --- /dev/null +++ b/VCPKG_BASELINE @@ -0,0 +1 @@ +d6995a0cf3cafda5e9e52749fad075dd62bfd90c \ No newline at end of file diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 4d63c7b2d..67df0008d 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -303,10 +303,11 @@ qt_add_executable( Input ${MM_SRCS} ${MM_HDRS} - $ main.cpp ) +set_target_properties(Input PROPERTIES WIN32_EXECUTABLE TRUE) + target_include_directories( Input PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ @@ -361,14 +362,14 @@ endif () if (IOS) # qgis resources - set(IOS_CRS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android/assets/qgis-data/resources) + set(IOS_CRS_DIR ${CMAKE_CURRENT_BINARY_DIR}/android/assets/qgis-data/resources) target_sources(Input PRIVATE ${IOS_CRS_DIR}) set_source_files_properties( ${IOS_CRS_DIR} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/qgis-data ) # proj - set(IOS_PROJ_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android/assets/qgis-data/proj) + set(IOS_PROJ_DIR ${CMAKE_CURRENT_BINARY_DIR}/android/assets/qgis-data/proj) target_sources(Input PRIVATE ${IOS_PROJ_DIR}) set_source_files_properties( ${IOS_PROJ_DIR} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/qgis-data @@ -438,6 +439,8 @@ endif () # LINKING Mergin Maps Target # ######################################################################################## +target_link_libraries(Input PUBLIC mm_core) + # at least on Linux qgis_core needs to be linked before Qt libs, otherwise one gets "DSO # missing from command line" linker error about missing symbol from qt6::core5compat # library - probably if our code does not use anything from that library, it is not added @@ -476,9 +479,9 @@ endif () target_link_libraries( Input - PUBLIC mm_core - Geodiff::Geodiff - Proj::Proj + PUBLIC Geodiff::Geodiff + PROJ::proj + ZXing::Core ZXing::ZXing ) @@ -509,55 +512,41 @@ endif () target_link_libraries( Input - PUBLIC Qtkeychain::Qtkeychain - Qca::Qca - Gdal::Gdal - Pq::Pq - Pq::Pgcommon - Pq::Pgport + PUBLIC Qt6Keychain::Qt6Keychain + qca + GDAL::GDAL + PostgreSQL::PostgreSQL Spatialite::Spatialite ) -if (NOT LNX) - target_link_libraries(Input PUBLIC Charset::Charset Iconv::Iconv) -endif () +# if (NOT LNX) target_link_libraries(Input PUBLIC Charset::Charset Iconv::Iconv) endif () -target_link_libraries(Input PUBLIC Xml2::Xml2) +# target_link_libraries(Input PUBLIC Xml2::Xml2) target_link_libraries( Input PUBLIC Spatialindex::Spatialindex - Geos::Geos-c - Geos::Geos - Protobuf::Protobuf-lite - Utf8::utf8_range - Utf8::utf8_validity - Expat::Expat - Freexl::Freexl - Exiv2::Exiv2 - Inih::Inireader - Inih::Inih - Tiff::Tiff - Sqlite3::Sqlite3 - MiniZip::MiniZip + GEOS::geos_c + # Geos::Geos + protobuf::libprotobuf-lite + # Utf8::utf8_range Utf8::utf8_validity Expat::Expat Freexl::Freexl + Exiv2::exiv2lib + # Inih::Inireader Inih::Inih Tiff::Tiff + unofficial::sqlite3::sqlite3 + unofficial::minizip::minizip ZLIB::ZLIB - Zip::Zip - WebP::WebP - WebP::Sharpyuv - Curl::Curl - Jpeg::Jpeg - Geotiff::Geotiff - Lzma::Lzma - Zstd::Zstd - Bz2::Bz2 - Absl::Absl + libzip::zip + # WebP::WebP WebP::Sharpyuv Curl::Curl Jpeg::Jpeg Geotiff::Geotiff Lzma::Lzma + # Zstd::Zstd Bz2::Bz2 Absl::Absl + poly2tri::poly2tri + meshoptimizer::meshoptimizer ) if (IOS OR MACOS) target_link_libraries(Input PUBLIC Tasn1::Tasn1) endif () -target_link_libraries(Input PUBLIC OpenSSL::OpenSSL OpenSSL::Crypto) +# target_link_libraries(Input PUBLIC OpenSSL::OpenSSL OpenSSL::Crypto) if (ANDROID) set_property( TARGET Input PROPERTY QT_ANDROID_EXTRA_LIBS ${KDAB_OpenSSL_CRYPTO_LIBRARY} @@ -576,7 +565,22 @@ if (IOS) target_link_libraries( Input PUBLIC AppleFrameworks::CoreLocation AppleFrameworks::CoreHaptics ) - qt_add_ios_ffmpeg_libraries(Input) # Qt Multimedia + # TODO is this needed? qt_add_ios_ffmpeg_libraries(Input) # Qt Multimedia +endif () + +if (WIN) + target_link_libraries( + Input + PUBLIC WinLibraries::avcodec + WinLibraries::avdevice + WinLibraries::avformat + WinLibraries::avutil + WinLibraries::swresample + WinLibraries::swscale + WinLibraries::openh264 + ) + + target_link_libraries(Input PUBLIC expat::expat) endif () if (ENABLE_TESTS) diff --git a/app/android/assets/qgis-data/.directory b/app/android/assets/qgis-data/.directory deleted file mode 100644 index 2bb42ec61..000000000 --- a/app/android/assets/qgis-data/.directory +++ /dev/null @@ -1,4 +0,0 @@ -[Dolphin] -PreviewsShown=true -Timestamp=2017,11,22,13,1,25 -Version=3 diff --git a/app/android/assets/qgis-data/keepme b/app/android/assets/qgis-data/keepme deleted file mode 100644 index 40cf708a8..000000000 --- a/app/android/assets/qgis-data/keepme +++ /dev/null @@ -1,3 +0,0 @@ -Do not delete this file - it is here to have at least one file in the folder -in order to work around a Qt6 bug related to support of Android assets: -https://bugreports.qt.io/browse/QTBUG-107627 diff --git a/app/android/assets/qgis-data/proj/CH b/app/android/assets/qgis-data/proj/CH deleted file mode 100644 index 725328f40..000000000 --- a/app/android/assets/qgis-data/proj/CH +++ /dev/null @@ -1,22 +0,0 @@ -# This init file provides definitions for CH1903 and CH1903/LV03 -# projections using the distortion grids developed by Swisstopo. -# See: https://shop.swisstopo.admin.ch/en/products/geo_software/GIS_info -# -# You'll need to download the grids separately and put in a directory -# scanned by libproj. -# -# Note that an independent effort was made to derive an usable grid -# from the CH1903->CH1903+ grid initially available from the Swisstopo -# website. You can read about this other effort here: -# http://lists.maptools.org/pipermail/proj/2012-February/006093.html -# It may be of interest because the latter was by some reported as being -# more accurate than the former: -# http://lists.maptools.org/pipermail/proj/2012-February/006119.html -# -# This init file uses the official one -# - +origin=Swisstopo +lastupdate=2012-02-27 -# CH1903/LV03 -<1903_LV03> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +units=m +nadgrids=CHENyx06_ETRS.gsb +no_defs -# CH1903 -<1903> +proj=longlat +ellps=bessel +nadgrids=CHENyx06_ETRS.gsb +no_defs <> diff --git a/app/android/assets/qgis-data/proj/GL27 b/app/android/assets/qgis-data/proj/GL27 deleted file mode 100644 index 73fa9754a..000000000 --- a/app/android/assets/qgis-data/proj/GL27 +++ /dev/null @@ -1,23 +0,0 @@ -# SCCSID @(#)GL27 1.1 93/08/25 GIE REL -# Great Lakes Grids - +lastupdate=1993-08-25 - # Lake Erie, Ontario and St. Lawrence River. - proj=omerc ellps=clrk66 k_0=0.9999 - lonc=78d00'W lat_0=44d00'N alpha=55d40' - x_0=-3950000 y_0=-3430000 - no_defs <> - # Lake Huron - proj=omerc ellps=clrk66 k_0=0.9999 - lonc=82d00'W lat_0=43d00'N alpha=350d37' - x_0=1200000 y_0=-3500000 - no_defs <> - # Lake Michigan - proj=omerc ellps=clrk66 k_0=0.9999 - lonc=87d00'W lat_0=44d00'N alpha=15d00' - x_0=-1000000 y_0=-4300000 - no_defs <> - # Lake Superior, Lake of the Woods - proj=omerc ellps=clrk66 k_0=0.9999 - lonc=88d50'0.256"W lat_0=47d12'21.554"N alpha=285d41'42.593" - x_0=9000000 y_0=-1600000 - no_defs <> diff --git a/app/android/assets/qgis-data/proj/ITRF2000 b/app/android/assets/qgis-data/proj/ITRF2000 deleted file mode 100644 index 439d19702..000000000 --- a/app/android/assets/qgis-data/proj/ITRF2000 +++ /dev/null @@ -1,24 +0,0 @@ -# ITRF2000 params are in cm/year, PJ_helmert uses m/year - +version=1.0.0 +origin=ftp://itrf.ensg.ign.fr/pub/itrf/ITRF.TP +lastupdate=2017-07-25 - -# ITRF2000 -> ITRF2005 is only defined the opposite way, so we flip the sign on all -# parameters to get the opposite transformation. Parameters from http://itrf.ign.fr/ITRF_solutions/2005/tp_05-00.php - +proj=helmert +x=-0.0001 +y=0.0008 +z=0.0058 +s=-0.0004 +dx=0.0002 +dy=-0.0001 +dz=0.0018 +ds=-0.00008 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +convention=position_vector - - +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +convention=position_vector - - +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +convention=position_vector - - +proj=helmert +x=0.0127 +y=0.0065 +z=-0.0209 +s=0.00195 +rx=-0.00039 +ry=0.00080 +rz=-0.00114 +dx=-0.0029 +dy=-0.0002 +dz=-0.0006 +ds=0.00001 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=1988.0 +convention=position_vector - - +proj=helmert +x=0.0147 +y=0.0135 +z=-0.0139 +s=0.00075 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +convention=position_vector - - +proj=helmert +x=0.0267 +y=0.0275 +z=-0.0199 +s=0.00215 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +convention=position_vector - - +proj=helmert +x=0.0247 +y=0.0235 +z=-0.0359 +s=0.00245 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +convention=position_vector - - +proj=helmert +x=0.0297 +y=0.0475 +z=-0.0739 +s=0.00585 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +convention=position_vector - - +proj=helmert +x=0.0247 +y=0.0115 +z=-0.0979 +s=0.00895 +rx=0.0001 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +convention=position_vector diff --git a/app/android/assets/qgis-data/proj/ITRF2008 b/app/android/assets/qgis-data/proj/ITRF2008 deleted file mode 100644 index bd5f7cee5..000000000 --- a/app/android/assets/qgis-data/proj/ITRF2008 +++ /dev/null @@ -1,94 +0,0 @@ -# ITRF2008 params are in mm/year, PJ_helmert uses m/year - +version=1.0.0 +origin=http://itrf.ign.fr/doc_ITRF/Transfo-ITRF2008_ITRFs.txt +lastupdate=2017-07-26 - - +proj=helmert +x=-0.002 +y=-0.0009 +z=-0.0047 +s=0.00094 +dx=0.0003 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=-0.0019 +y=-0.0017 +z=-0.0105 +s=0.00134 +dx=0.0001 +dy=0.0001 +dz=-0.0018 +ds=0.00008 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=-0.024 +y=0.0024 +z=-0.00386 +s=0.00341 +rx=-0.00171 +ry=-0.00148 +rz=-0.0003 +dx=-0.0028 +dy=-0.0001 +dz=-0.0024 +ds=0.00009 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0128 +y=0.0046 +z=-0.0412 +s=0.00221 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0248 +y=0.0186 +z=-0.0472 +s=0.00361 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0228 +y=0.0146 +z=-0.0632 +s=0.00391 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0278 +y=0.0386 +z=-0.1012 +s=0.00731 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +convention=position_vector - - +proj=helmert +x=0.0228 +y=0.0026 +z=-0.1252 +s=0.01041 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +convention=position_vector - - -# ITRF2008 Plate Motion Model parameters -# -# As described in -# -# Altamimi, Z., L. Métivier, and X. Collilieux (2012), ITRF2008 plate motion model, -# J. Geophys. Res., 117, B07402, doi:10.1029/2011JB008930. - - - +proj=helmert +drx=-0.000190 +dry=-0.000442 +drz=0.000915 +convention=position_vector - - +proj=helmert +drx=-0.000252 +dry=-0.000302 +drz=0.000643 +convention=position_vector - - +proj=helmert +drx=0.001202 +dry=-0.000054 +drz=0.001485 +convention=position_vector - - +proj=helmert +drx=0.001504 +dry=0.001172 +drz=0.001228 +convention=position_vector - - +proj=helmert +drx=0.000049 +dry=-0.001088 +drz=0.000664 +convention=position_vector - - +proj=helmert +drx=-0.000083 +dry=-0.000534 +drz=0.000750 +convention=position_vector - - +proj=helmert +drx=0.001232 +dry=0.000303 +drz=0.001540 +convention=position_vector - - +proj=helmert +drx=-0.000330 +dry=-0.001551 +drz=0.001625 +convention=position_vector - - +proj=helmert +drx=0.000035 +dry=-0.000662 +drz=-0.0001 +convention=position_vector - - +proj=helmert +drx=0.000095 +dry=-0.000598 +drz=0.000723 +convention=position_vector - - +proj=helmert +drx=-0.000411 +dry=0.001036 +drz=-0.002166 +convention=position_vector - - +proj=helmert +drx=-0.000243 +dry=-0.000311 +drz=-0.000154 +convention=position_vector - - +proj=helmert +drx=-0.000080 +dry=-0.000745 +drz=0.000897 +convention=position_vector - - +proj=helmert +drx=0.000047 +dry=-0.001 +drz=0.000975 +convention=position_vector - - -# Plate names suffixed by _T (for Translation) that includes the translation -# rates +dx=0.00041 +dy=0.00022 +dz=0.00041 given by Table 2 of the ITRF2008 plate motion model -# paper - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=-0.000190 +dry=-0.000442 +drz=0.000915 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=-0.000252 +dry=-0.000302 +drz=0.000643 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=0.001202 +dry=-0.000054 +drz=0.001485 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=0.001504 +dry=0.001172 +drz=0.001228 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=0.000049 +dry=-0.001088 +drz=0.000664 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=-0.000083 +dry=-0.000534 +drz=0.000750 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=0.001232 +dry=0.000303 +drz=0.001540 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=-0.000330 +dry=-0.001551 +drz=0.001625 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=0.000035 +dry=-0.000662 +drz=-0.0001 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=0.000095 +dry=-0.000598 +drz=0.000723 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=-0.000411 +dry=0.001036 +drz=-0.002166 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=-0.000243 +dry=-0.000311 +drz=-0.000154 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=-0.000080 +dry=-0.000745 +drz=0.000897 +convention=position_vector - - +proj=helmert +dx=0.00041 +dy=0.00022 +dz=0.00041 +drx=0.000047 +dry=-0.001 +drz=0.000975 +convention=position_vector diff --git a/app/android/assets/qgis-data/proj/ITRF2014 b/app/android/assets/qgis-data/proj/ITRF2014 deleted file mode 100644 index e16fb88cf..000000000 --- a/app/android/assets/qgis-data/proj/ITRF2014 +++ /dev/null @@ -1,55 +0,0 @@ -# ITRF2014 params are in mm/year, PJ_helmert uses m/year - +version=1.0.0 +origin=http://itrf.ign.fr/doc_ITRF/Transfo-ITRF2014_ITRFs.txt +lastupdate=2017-07-26 - - +proj=helmert +x=0.0016 +y=0.0019 +z=0.0024 +s=-0.00002 +dz=-0.0001 +ds=0.00003 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0026 +y=0.001 +z=-0.0023 +s=0.00092 +dx=0.0003 +dz=-0.0001 +ds=0.00003 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0007 +y=0.0012 +z=-0.0261 +s=0.00212 +dx=0.0001 +dy=0.0001 +dz=-0.0019 +ds=0.00011 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +d=0.0038 +rz=0.00026 +dx0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=-0.0504 +y=0.0033 +z=-0.0602 +s=0.00429 +rx=-0.00281 +ry=-0.00338 +rz=0.0004 +dx=-0.0028 +dy=-0.0001 +dz=-0.0025 +ds=0.00012 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0154 +y=0.0015 +z=-0.0708 +s=0.00309 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0274 +y=0.0155 +z=-0.0768 +s=0.00449 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0254 +y=0.0115 +z=-0.0928 +s=0.00479 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0304 +y=0.0355 +z=-0.1308 +s=0.00819 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector - - +proj=helmert +x=0.0254 +y=-0.0005 +z=-0.1548 +s=0.01129 +rx=0.0001 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +convention=position_vector - -# ITRF2014 Plate Motion Model parameters -# -# As described in -# -# Z. Altamimi et al, 2017, ITRF2014 plate motion model, -# doi: 10.1093/gji/ggx136 - - +proj=helmert +drx=-0.000248 +dry=-0.000324 +drz=0.000675 +convention=position_vector - - +proj=helmert +drx=0.001154 +dry=-0.000136 +drz=0.001444 +convention=position_vector - - +proj=helmert +drx=0.001510 +dry=0.001182 +drz=0.001215 +convention=position_vector - - +proj=helmert +drx=-0.000085 +dry=-0.000531 +drz=0.000770 +convention=position_vector - - +proj=helmert +drx=0.001154 +dry=-0.000005 +drz=0.001454 +convention=position_vector - - +proj=helmert +drx=-0.000333 +dry=-0.001544 +drz=0.001623 +convention=position_vector - - +proj=helmert +drx=0.000024 +dry=-0.000694 +drz=-0.000063 +convention=position_vector - - +proj=helmert +drx=0.000099 +dry=-0.000614 +drz=0.000733 +convention=position_vector - - +proj=helmert +drx=-0.000409 +dry=0.001047 +drz=-0.002169 +convention=position_vector - - +proj=helmert +drx=-0.000270 +dry=-0.000301 +drz=-0.000140 +convention=position_vector - - +proj=helmert +drx=-0.000121 +dry=-0.000794 +drz=0.000884 +convention=position_vector diff --git a/app/android/assets/qgis-data/proj/ITRF2020 b/app/android/assets/qgis-data/proj/ITRF2020 deleted file mode 100644 index 45aaa5687..000000000 --- a/app/android/assets/qgis-data/proj/ITRF2020 +++ /dev/null @@ -1,91 +0,0 @@ -# ITRF2020 params are in mm/year, PJ_helmert uses m/year - -# Generated with generate_itrf2020.py from EPSG database - - +proj=helmert +x=-0.0014 +y=-0.0009 +z=0.0014 +s=-0.00042 +dy=-0.0001 +dz=0.0002 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0002 +y=0.001 +z=0.0033 +s=-0.00029 +dy=-0.0001 +dz=0.0001 +ds=3e-05 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0027 +y=0.0001 +z=-0.0014 +s=0.00065 +dx=0.0003 +dy=-0.0001 +dz=0.0001 +ds=3e-05 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=-0.0002 +y=0.0008 +z=-0.0342 +s=0.00225 +dx=0.0001 +dz=-0.0017 +ds=0.00011 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0065 +y=-0.0039 +z=-0.0779 +rz=0.00036 +s=0.00398 +dx=0.0001 +dy=-0.0006 +dz=-0.0031 +drz=2e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0065 +y=-0.0039 +z=-0.0779 +rz=0.00036 +s=0.00398 +dx=0.0001 +dy=-0.0006 +dz=-0.0031 +drz=2e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0065 +y=-0.0039 +z=-0.0779 +rz=0.00036 +s=0.00398 +dx=0.0001 +dy=-0.0006 +dz=-0.0031 +drz=2e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=-0.0658 +y=0.0019 +z=-0.0713 +rx=-0.00336 +ry=-0.00433 +rz=0.00075 +s=0.00447 +dx=-0.0028 +dy=-0.0002 +dz=-0.0023 +drx=-0.00011 +dry=-0.00019 +drz=7e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0145 +y=-0.0019 +z=-0.0859 +rz=0.00036 +s=0.00327 +dx=0.0001 +dy=-0.0006 +dz=-0.0031 +drz=2e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0265 +y=0.0121 +z=-0.0919 +rz=0.00036 +s=0.00467 +dx=0.0001 +dy=-0.0006 +dz=-0.0031 +drz=2e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0245 +y=0.0081 +z=-0.1079 +rz=0.00036 +s=0.00497 +dx=0.0001 +dy=-0.0006 +dz=-0.0031 +drz=2e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0295 +y=0.0321 +z=-0.1459 +rz=0.00036 +s=0.00837 +dx=0.0001 +dy=-0.0006 +dz=-0.0031 +drz=2e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - - +proj=helmert +x=0.0245 +y=-0.0039 +z=-0.1699 +rx=0.0001 +rz=0.00036 +s=0.01147 +dx=0.0001 +dy=-0.0006 +dz=-0.0031 +drz=2e-05 +ds=0.00012 +t_epoch=2015 +convention=position_vector - -# ITRF2020 Plate Motion Model parameters -# -# As described in https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2023GL106373 -# (and also in https://itrf.ign.fr/docs/solutions/itrf2020/ITRF2020-PMM.dat, but with -# different units) - - +proj=helmert +drx=-0.000131 +dry=-0.000551 +drz=0.000837 +convention=position_vector - - +proj=helmert +drx=-0.000269 +dry=-0.000312 +drz=0.000678 +convention=position_vector - - +proj=helmert +drx=0.001129 +dry=-0.000146 +drz=0.001438 +convention=position_vector - - +proj=helmert +drx=0.001487 +dry=0.001175 +drz=0.001223 +convention=position_vector - - +proj=helmert +drx=0.000207 +dry=-0.001422 +drz=0.000726 +convention=position_vector - - +proj=helmert +drx=-0.000085 +dry=-0.000519 +drz=0.000753 +convention=position_vector - - +proj=helmert +drx=0.001137 +dry=0.000013 +drz=0.001444 +convention=position_vector - - +proj=helmert +drx=-0.000327 +dry=-0.001561 +drz=0.001605 +convention=position_vector - - +proj=helmert +drx=0.000045 +dry=-0.000666 +drz=-0.000098 +convention=position_vector - - +proj=helmert +drx=0.000090 +dry=-0.000585 +drz=0.000717 +convention=position_vector - - +proj=helmert +drx=-0.000404 +dry=0.001021 +drz=-0.002154 +convention=position_vector - - +proj=helmert +drx=-0.000261 +dry=-0.000282 +drz=-0.000157 +convention=position_vector - - +proj=helmert +drx=-0.000081 +dry=-0.000719 +drz=0.000864 +convention=position_vector - -# Plate names suffixed by _T (for Translation) that includes the translation -# rates +dx=0.00037 +dy=0.00035 +dz=0.00074 given by Table 2 of the ITRF2020 plate motion model -# paper - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=-0.000131 +dry=-0.000551 +drz=0.000837 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=-0.000269 +dry=-0.000312 +drz=0.000678 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=0.001129 +dry=-0.000146 +drz=0.001438 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=0.001487 +dry=0.001175 +drz=0.001223 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=0.000207 +dry=-0.001422 +drz=0.000726 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=-0.000085 +dry=-0.000519 +drz=0.000753 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=0.001137 +dry=0.000013 +drz=0.001444 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=-0.000327 +dry=-0.001561 +drz=0.001605 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=0.000045 +dry=-0.000666 +drz=-0.000098 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=0.000090 +dry=-0.000585 +drz=0.000717 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=-0.000404 +dry=0.001021 +drz=-0.002154 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=-0.000261 +dry=-0.000282 +drz=-0.000157 +convention=position_vector - - +proj=helmert +dx=0.00037 +dy=0.00035 +dz=0.00074 +drx=-0.000081 +dry=-0.000719 +drz=0.000864 +convention=position_vector diff --git a/app/android/assets/qgis-data/proj/deformation_model.schema.json b/app/android/assets/qgis-data/proj/deformation_model.schema.json deleted file mode 100644 index d7a6d162c..000000000 --- a/app/android/assets/qgis-data/proj/deformation_model.schema.json +++ /dev/null @@ -1,582 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Schema for deformation models", - "type": "object", - "properties": { - "file_type": { - "type": "string", - "enum": [ - "deformation_model_master_file" - ], - "description": "File type. Always \"deformation_model_master_file\"" - }, - "format_version": { - "type": "string", - "enum": [ - "1.0" - ] - }, - "name": { - "type": "string", - "description": "A brief descriptive name of the deformation model" - }, - "version": { - "type": "string", - "description": "A string identifying the version of the deformation model. The format for specifying version will be defined by the agency responsible for the deformation model" - }, - "publication_date": { - "$ref": "#/definitions/datetime", - "description": "The date on which this version of the deformation model was published (or possibly the date on which it takes effect?)" - }, - "license": { - "type": "string", - "description": "License under which the model is published" - }, - "description": { - "type": "string", - "description": "A text description of the model" - }, - "authority": { - "type": "object", - "description": "Basic information about the agency responsible for the data set", - "properties": { - "name": { - "type": "string", - "description": "The name of the agency" - }, - "url": { - "type": "string", - "description": "The url of the agency website", - "format": "uri" - }, - "address": { - "type": "string", - "description": "The postal address of the agency" - }, - "email": { - "type": "string", - "description": "An email contact address for the agency", - "format": "email" - } - }, - "required": [ - "name" - ], - "additionalProperties": false - }, - "links": { - "type": "array", - "description": "Links to related information", - "items": { - "type": "object", - "properties": { - "href": { - "type": "string", - "description": "The URL holding the information", - "format": "uri" - }, - "rel": { - "type": "string", - "description": "The relationship to the dataset. Proposed relationships are:\n- \"about\": a web page for human consumption describing the model\n- \"source\": the authoritative source data from which the deformation model is built.\n- \"metadata\": ISO 19115 XML metadata regarding the deformation model." - }, - "type": { - "type": "string", - "description": "MIME type" - }, - "title": { - "type": "string", - "description": "Description of the link" - } - }, - "required": [ - "href" - ], - "additionalProperties": false - } - }, - "source_crs": { - "$ref": "#/definitions/crs", - "description": "The coordinate reference system to which the deformation model applies" - }, - "target_crs": { - "$ref": "#/definitions/crs", - "description": "For a time dependent coordinate transformation the coordinate reference system resulting from applying the deformation" - }, - "definition_crs": { - "$ref": "#/definitions/crs", - "description": "The coordinate reference system used to define the component spatial models. This proposal only supports using the same value for the source and definition coordinate reference system." - }, - "reference_epoch": { - "$ref": "#/definitions/datetime", - "description": "A nominal reference epoch of the deformation model. This is not necessarily used to calculate the deformation model - each component defines its own time function." - }, - "uncertainty_reference_epoch": { - "$ref": "#/definitions/datetime", - "description": "The uncertainties of the deformation model are calculated in terms of this epoch. This is described below in the Time functions section." - }, - "horizontal_offset_unit": { - "type": "string", - "enum": [ - "metre", - "degree" - ] - }, - "vertical_offset_unit": { - "type": "string", - "enum": [ - "metre" - ] - }, - "horizontal_uncertainty_type": { - "type": "string", - "enum": [ - "circular 95% confidence limit" - ] - }, - "horizontal_uncertainty_unit": { - "type": "string", - "enum": [ - "metre" - ] - }, - "vertical_uncertainty_type": { - "type": "string", - "enum": [ - "95% confidence limit" - ] - }, - "vertical_uncertainty_unit": { - "type": "string", - "enum": [ - "metre" - ] - }, - "horizontal_offset_method": { - "type": "string", - "description": "Defines how the horizontal offsets are applied to geographic coordinates", - "enum": [ - "addition", - "geocentric" - ] - }, - "extent": { - "$ref": "#/definitions/extent", - "description": "Defines the region within which the deformation model is defined. It cannot be calculated outside this region. The region is specified by a type and value. This proposal only supports using a bounding box as an array of [west,south,east,north] coordinate values" - }, - "time_extent": { - "type": "object", - "description": "Defines the range of times for which the model is valid, specified by a first and a last value. The deformation model is undefined for dates outside this range.", - "properties": { - "first": { - "$ref": "#/definitions/datetime" - }, - "last": { - "$ref": "#/definitions/datetime" - } - }, - "required": [ - "first", - "last" - ], - "additionalProperties": false - }, - "components": { - "type": "array", - "items": { - "$ref": "#/definitions/component" - } - } - }, - "required": [ - "file_type", - "format_version", - "source_crs", - "target_crs", - "definition_crs", - "extent", - "time_extent", - "components" - ], - "additionalProperties": false, - "definitions": { - "component": { - "type": "object", - "definition": "A component describes an aspect of the deformation, such as glacial isostatic adjustment, secular deformation, earthquakes, etc.", - "properties": { - "description": { - "type": "string", - "description": "A text description of this component of the model" - }, - "extent": { - "$ref": "#/definitions/extent", - "description": "The region within the component is defined. Outside this region the component evaluates to 0. The region is specified by a type and value. This proposal only supports using a bounding box as an array of [west,south,east,north] coordinate values" - }, - "displacement_type": { - "type": "string", - "description": "The displacement parameters defined by the model. The \"none\" option allows for a component which defines uncertainty with different grids to those defining displacement", - "enum": [ - "none", - "horizontal", - "vertical", - "3d" - ] - }, - "uncertainty_type": { - "type": "string", - "description": "The uncertainty parameters defined by the model", - "enum": [ - "none", - "horizontal", - "vertical", - "3d" - ] - }, - "horizontal_uncertainty": { - "type": "number", - "description": "The horizontal uncertainty to use if it is not defined explicitly in the spatial model" - }, - "vertical_uncertainty": { - "type": "number", - "description": "The vertical uncertainty to use if it is not defined explicitly in the spatial model" - }, - "spatial_model": { - "type": "object", - "description": "Defines the spatial model", - "properties": { - "type": { - "type": "string", - "description": "Specifies the type of the spatial model data file. Initially it is proposed that only GeoTIFF is supported", - "enum": [ - "GeoTIFF" - ] - }, - "interpolation_method": { - "type": "string", - "description": "Interpolation method", - "enum": [ - "bilinear", - "geocentric_bilinear" - ] - }, - "filename": { - "type": "string", - "description": "Specifies location of the spatial model GeoTIFF file relative to this JSON file" - }, - "md5_checksum": { - "type": "string", - "description": "A hex encoded MD5 checksum of the grid file that can be used to validate that it is the correct version of the file" - } - }, - "required": [ - "type", - "interpolation_method", - "filename" - ], - "additionalProperties": false - }, - "time_function": { - "$ref": "#/definitions/time_function" - } - }, - "required": [ - "description", - "extent", - "displacement_type", - "spatial_model", - "time_function" - ], - "additionalProperties": false - }, - "crs": { - "type": "string", - "pattern": "^[a-zA-Z]+:[a-zA-Z0-9]+$" - }, - "datetime": { - "type": "string", - "format": "date-time", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$" - }, - "extent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "bbox" - ] - }, - "parameters": { - "type": "object", - "properties": { - "bbox": { - "type": "array", - "minItems": 4, - "maxItems": 4, - "items": { - "type": "number" - } - } - } - } - }, - "required": [ - "type", - "parameters" - ], - "additionalProperties": false - }, - "time_function": { - "description": "Function describing a multiplicative factor to apply to the spatial_model depending on the time", - "oneOf": [ - { - "$ref": "#/definitions/time_function_constant" - }, - { - "$ref": "#/definitions/time_function_velocity" - }, - { - "$ref": "#/definitions/time_function_step" - }, - { - "$ref": "#/definitions/time_function_reverse_step" - }, - { - "$ref": "#/definitions/time_function_piecewise" - }, - { - "$ref": "#/definitions/time_function_exponential" - } - ] - }, - "time_function_constant": { - "description": "The valuation of this function is 1 at any epoch", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "constant" - ] - }, - "parameters": { - "type": "object", - "properties": { - }, - "additionalProperties": false - } - }, - "required": [ - "type" - ], - "additionalProperties": false - }, - "time_function_velocity": { - "description": "The valuation of this function is 0 at reference_epoch, and proportional to the time difference to it at other times", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "velocity" - ] - }, - "parameters": { - "type": "object", - "properties": { - "reference_epoch": { - "$ref": "#/definitions/datetime" - } - }, - "required": [ - "reference_epoch" - ], - "additionalProperties": false - } - }, - "required": [ - "type", - "parameters" - ], - "additionalProperties": false - }, - "time_function_step": { - "description": "The valuation of this function is 0 before step_epoch, and 1 starting from it", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "step" - ] - }, - "parameters": { - "type": "object", - "properties": { - "step_epoch": { - "$ref": "#/definitions/datetime" - } - }, - "required": [ - "step_epoch" - ], - "additionalProperties": false - } - }, - "required": [ - "type", - "parameters" - ], - "additionalProperties": false - }, - "time_function_reverse_step": { - "description": "The valuation of this function is 1 before step_epoch, and 0 starting from it", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "reverse_step" - ] - }, - "parameters": { - "type": "object", - "properties": { - "step_epoch": { - "$ref": "#/definitions/datetime" - } - }, - "required": [ - "step_epoch" - ], - "additionalProperties": false - } - }, - "required": [ - "type", - "parameters" - ], - "additionalProperties": false - }, - "time_function_piecewise": { - "description": "Piecewise time function", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "piecewise" - ] - }, - "parameters": { - "type": "object", - "properties": { - "before_first": { - "type": "string", - "description": "Defines the behaviour of the function before the first defined epoch", - "enum": [ - "zero", - "constant", - "linear" - ] - }, - "after_last": { - "type": "string", - "description": "Defines the behaviour of the function after the last defined epoch", - "enum": [ - "zero", - "constant", - "linear" - ] - }, - "model": { - "type": "array", - "description": "A sorted array data points each defined by two elements, \"epoch\" defines the date/time of the data point, and \"scale_factor\" is the corresponding function value. The array is sorted in order of increasing epoch. Note: where the time function includes a step it is represented by two consecutive data points with the same epoch. The first defines the scale factor that applies before the epoch and the second the scale factor that applies after the epoch", - "items": { - "type": "object", - "properties": { - "epoch": { - "$ref": "#/definitions/datetime" - }, - "scale_factor": { - "type": "number" - } - }, - "required": [ - "epoch", - "scale_factor" - ], - "additionalProperties": false - }, - "minItems": 2 - } - }, - "required": [ - "before_first", - "after_last", - "model" - ], - "additionalProperties": false - } - }, - "required": [ - "type", - "parameters" - ], - "additionalProperties": false - }, - "time_function_exponential": { - "description": "The valuation of this function is an exponential function with a time-based relaxation constant", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "exponential" - ] - }, - "parameters": { - "type": "object", - "properties": { - "reference_epoch": { - "$ref": "#/definitions/datetime", - "description": "The date/time at which the exponential decay starts" - }, - "end_epoch": { - "$ref": "#/definitions/datetime", - "description": "The date/time at which the exponential decay ends (optional)" - }, - "relaxation_constant": { - "type": "number", - "description": "Relaxation constant in years" - }, - "before_scale_factor": { - "type": "number", - "description": "The scale factor that applies before the reference epoch" - }, - "initial_scale_factor": { - "type": "number", - "description": "The initial scale factor" - }, - "final_scale_factor": { - "type": "number", - "description": "The scale factor the exponential function approaches" - } - }, - "required": [ - "reference_epoch", - "relaxation_constant", - "before_scale_factor", - "initial_scale_factor", - "final_scale_factor" - ], - "additionalProperties": false - } - }, - "required": [ - "type", - "parameters" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/app/android/assets/qgis-data/proj/nad.lst b/app/android/assets/qgis-data/proj/nad.lst deleted file mode 100644 index cc4277220..000000000 --- a/app/android/assets/qgis-data/proj/nad.lst +++ /dev/null @@ -1,142 +0,0 @@ - Listing of State Plane North American Datum Zones - - NGS zone number - State and zone 1927 1983 - -Alabama east .................. 101 101 -Alabama west .................. 102 102 -Alaska zone no. 1 ............. 5001 5001 -Alaska zone no. 2 ............. 5002 5002 -Alaska zone no. 3 ............. 5003 5003 -Alaska zone no. 4 ............. 5004 5004 -Alaska zone no. 5 ............. 5005 5005 -Alaska zone no. 6 ............. 5006 5006 -Alaska zone no. 7 ............. 5007 5007 -Alaska zone no. 8 ............. 5008 5008 -Alaska zone no. 9 ............. 5009 5009 -Alaska zone no. 10 ............ 5010 5010 -American Samoa ................ 5300 -Arizona central ............... 202 202 -Arizona east .................. 201 201 -Arizona west .................. 203 203 -Arkansas north ................ 301 301 -Arkansas south ................ 302 302 -California I .................. 401 401 -California II ................. 402 402 -California III ................ 403 403 -California IV ................. 404 404 -California V .................. 405 405 -California VI ................. 406 406 -California VII ................ 407 -Colorado central .............. 502 502 -Colorado north ................ 501 501 -Colorado south ................ 503 503 -Connecticut ................... 600 600 -Delaware ...................... 700 700 -Florida east .................. 901 901 -Florida north ................. 903 903 -Florida west .................. 902 902 -Georgia east .................. 1001 1001 -Georgia west .................. 1002 1002 -Guam Island ................... 5400 -Hawaii 1 ...................... 5101 5101 -Hawaii 2 ...................... 5102 5102 -Hawaii 3 ...................... 5103 5103 -Hawaii 4 ...................... 5104 5104 -Hawaii 5 ...................... 5105 5105 -Idaho central ................. 1102 1102 -Idaho east .................... 1101 1101 -Idaho west .................... 1103 1103 -Illinois east ................. 1201 1201 -Illinois west ................. 1202 1202 -Indiana east .................. 1301 1301 -Indiana west .................. 1302 1302 -Iowa north .................... 1401 1401 -Iowa south .................... 1402 1402 -Kansas north .................. 1501 1501 -Kansas south .................. 1502 1502 -Kentucky north ................ 1601 1601 -Kentucky south ................ 1602 1602 -Louisiana north ............... 1701 1701 -Louisiana offshore ............ 1703 1703 -Louisiana south ............... 1702 1702 -Maine east .................... 1801 1801 -Maine west .................... 1802 1802 -Maryland ...................... 1900 1900 -Massachusetts island .......... 2002 2002 -Massachusetts mainland ........ 2001 2001 -Michigan central/l ............ 2112 2112 current -Michigan central/m ............ 2102 old -Michigan east ................. 2101 old -Michigan north ................ 2111 2111 current -Michigan south ................ 2113 2113 current -Michigan west ................. 2103 old -Minnesota central ............. 2202 2202 -Minnesota north ............... 2201 2201 -Minnesota south ............... 2203 2203 -Mississippi east .............. 2301 2301 -Mississippi west .............. 2302 2302 -Missouri central .............. 2402 2402 -Missouri east ................. 2401 2401 -Missouri west ................. 2403 2403 -Montana ....................... 2500 -Montana central ............... 2502 -Montana north ................. 2501 -Montana south ................. 2503 -Nebraska ...................... 2600 -Nebraska north ................ 2601 -Nebraska south ................ 2602 -Nevada central ................ 2702 2702 -Nevada east ................... 2701 2701 -Nevada west ................... 2703 2703 -New hampshire ................. 2800 2800 -New jersey .................... 2900 2900 -New mexico central ............ 3002 3002 -New mexico east ............... 3001 3001 -New mexico west ............... 3003 3003 -New york central .............. 3102 3102 -New york east ................. 3101 3101 -New york long island .......... 3104 3104 -New york west ................. 3103 3103 -North carolina ................ 3200 3200 -North dakota north ............ 3301 3301 -North dakota south ............ 3302 3302 -Ohio north .................... 3401 3401 -Ohio south .................... 3402 3402 -Oklahoma north ................ 3501 3501 -Oklahoma south ................ 3502 3502 -Oregon north .................. 3601 3601 -Oregon south .................. 3602 3602 -Pennsylvania north ............ 3701 3701 -Pennsylvania south ............ 3702 3702 -Puerto Rico, Virgin Islands ... 5201 5200 -Rhode Island .................. 3800 3800 -South Carolina ................ 3900 -South Carolina north .......... 3901 -South Carolina south .......... 3902 -South Dakota north ............ 4001 4001 -South Dakota south ............ 4002 4002 -Tennessee ..................... 4100 4100 -Texas central ................. 4203 4203 -Texas north ................... 4201 4201 -Texas north central ........... 4202 4202 -Texas south ................... 4205 4205 -Texas south central ........... 4204 4204 -Utah central .................. 4302 4302 -Utah north .................... 4301 4301 -Utah south .................... 4303 4303 -Vermont ....................... 4400 4400 -Virgin Islands, St. Croix ..... 5202 -Virginia north ................ 4501 4501 -Virginia south ................ 4502 4502 -Washington north .............. 4601 4601 -Washington south .............. 4602 4602 -West Virginia north ........... 4701 4701 -West Virginia south ........... 4702 4702 -Wisconsin central ............. 4802 4802 -Wisconsin north ............... 4801 4801 -Wisconsin south ............... 4803 4803 -Wyoming east .................. 4901 4901 -Wyoming east central .......... 4902 4902 -Wyoming west .................. 4904 4904 -Wyoming west central .......... 4903 4903 diff --git a/app/android/assets/qgis-data/proj/nad27 b/app/android/assets/qgis-data/proj/nad27 deleted file mode 100644 index c5e439621..000000000 --- a/app/android/assets/qgis-data/proj/nad27 +++ /dev/null @@ -1,810 +0,0 @@ -# SCCSID @(#)nad27 4.1 92/12/20 GIE -# proj +init files for: -# -# State Plane Coordinate Systems, -# North American Datum 1927 - - +lastupdate=1992-12-20 -# 101: alabama east: nad27 -<101> proj=tmerc datum=NAD27 -lon_0=-85d50 lat_0=30d30 k=.99996 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 102: alabama west: nad27 -<102> proj=tmerc datum=NAD27 -lon_0=-87d30 lat_0=30 k=.9999333333333333 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5010: alaska zone no. 10: nad27 -<5010> proj=lcc datum=NAD27 -lon_0=-176 lat_1=53d50 lat_2=51d50 lat_0=51 -x_0=914401.8288036576 y_0=0 -no_defs <> - -# 5300: american samoa: nad27 -<5300> proj=lcc datum=NAD27 -lon_0=-170 lat_1=-14d16 lat_2=-14d16 lat_0=-14d16 -x_0=152400.3048006096 y_0=95169.31165862332 -no_defs <> - -# 201: arizona east: nad27 -<201> proj=tmerc datum=NAD27 -lon_0=-110d10 lat_0=31 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 202: arizona central: nad27 -<202> proj=tmerc datum=NAD27 -lon_0=-111d55 lat_0=31 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 203: arizona west: nad27 -<203> proj=tmerc datum=NAD27 -lon_0=-113d45 lat_0=31 k=.9999333333333333 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 301: arkansas north: nad27 -<301> proj=lcc datum=NAD27 -lon_0=-92 lat_1=36d14 lat_2=34d56 lat_0=34d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 302: arkansas south: nad27 -<302> proj=lcc datum=NAD27 -lon_0=-92 lat_1=34d46 lat_2=33d18 lat_0=32d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 401: california i: nad27 -<401> proj=lcc datum=NAD27 -lon_0=-122 lat_1=41d40 lat_2=40 lat_0=39d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 402: california ii: nad27 -<402> proj=lcc datum=NAD27 -lon_0=-122 lat_1=39d50 lat_2=38d20 lat_0=37d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 403: california iii: nad27 -<403> proj=lcc datum=NAD27 -lon_0=-120d30 lat_1=38d26 lat_2=37d4 lat_0=36d30 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 404: california iv: nad27 -<404> proj=lcc datum=NAD27 -lon_0=-119 lat_1=37d15 lat_2=36 lat_0=35d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 405: california v: nad27 -<405> proj=lcc datum=NAD27 -lon_0=-118 lat_1=35d28 lat_2=34d2 lat_0=33d30 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 406: california vi: nad27 -<406> proj=lcc datum=NAD27 -lon_0=-116d15 lat_1=33d53 lat_2=32d47 lat_0=32d10 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 407: california vii: nad27 -<407> proj=lcc datum=NAD27 -lon_0=-118d20 lat_1=34d25 lat_2=33d52 lat_0=34d8 -x_0=1276106.450596901 y_0=1268253.006858014 -no_defs <> - -# 501: colorado north: nad27 -<501> proj=lcc datum=NAD27 -lon_0=-105d30 lat_1=40d47 lat_2=39d43 lat_0=39d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 502: colorado central: nad27 -<502> proj=lcc datum=NAD27 -lon_0=-105d30 lat_1=39d45 lat_2=38d27 lat_0=37d50 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 503: colorado south: nad27 -<503> proj=lcc datum=NAD27 -lon_0=-105d30 lat_1=38d26 lat_2=37d14 lat_0=36d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 600: connecticut ---: nad27 -<600> proj=lcc datum=NAD27 -lon_0=-72d45 lat_1=41d52 lat_2=41d12 lat_0=40d50 -x_0=182880.3657607315 y_0=0 -no_defs <> - -# 700: delaware ---: nad27 -<700> proj=tmerc datum=NAD27 -lon_0=-75d25 lat_0=38 k=.999995 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 901: florida east: nad27 -<901> proj=tmerc datum=NAD27 -lon_0=-81 lat_0=24d20 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 902: florida west: nad27 -<902> proj=tmerc datum=NAD27 -lon_0=-82 lat_0=24d20 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 903: florida north: nad27 -<903> proj=lcc datum=NAD27 -lon_0=-84d30 lat_1=30d45 lat_2=29d35 lat_0=29 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1001: georgia east: nad27 -<1001> proj=tmerc datum=NAD27 -lon_0=-82d10 lat_0=30 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1002: georgia west: nad27 -<1002> proj=tmerc datum=NAD27 -lon_0=-84d10 lat_0=30 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5101: hawaii 1: nad27 -<5101> proj=tmerc datum=NAD27 -lon_0=-155d30 lat_0=18d50 k=.9999666666666667 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5102: hawaii 2: nad27 -<5102> proj=tmerc datum=NAD27 -lon_0=-156d40 lat_0=20d20 k=.9999666666666667 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5103: hawaii 3: nad27 -<5103> proj=tmerc datum=NAD27 -lon_0=-158 lat_0=21d10 k=.99999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5104: hawaii 4: nad27 -<5104> proj=tmerc datum=NAD27 -lon_0=-159d30 lat_0=21d50 k=.99999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5105: hawaii 5: nad27 -<5105> proj=tmerc datum=NAD27 -lon_0=-160d10 lat_0=21d40 k=1 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1101: idaho east: nad27 -<1101> proj=tmerc datum=NAD27 -lon_0=-112d10 lat_0=41d40 k=.9999473684210526 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1102: idaho central: nad27 -<1102> proj=tmerc datum=NAD27 -lon_0=-114 lat_0=41d40 k=.9999473684210526 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1103: idaho west: nad27 -<1103> proj=tmerc datum=NAD27 -lon_0=-115d45 lat_0=41d40 k=.9999333333333333 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1201: illinois east: nad27 -<1201> proj=tmerc datum=NAD27 -lon_0=-88d20 lat_0=36d40 k=.999975 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1202: illinois west: nad27 -<1202> proj=tmerc datum=NAD27 -lon_0=-90d10 lat_0=36d40 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1301: indiana east: nad27 -<1301> proj=tmerc datum=NAD27 -lon_0=-85d40 lat_0=37d30 k=.9999666666666667 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1302: indiana west: nad27 -<1302> proj=tmerc datum=NAD27 -lon_0=-87d5 lat_0=37d30 k=.9999666666666667 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1401: iowa north: nad27 -<1401> proj=lcc datum=NAD27 -lon_0=-93d30 lat_1=43d16 lat_2=42d4 lat_0=41d30 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1402: iowa south: nad27 -<1402> proj=lcc datum=NAD27 -lon_0=-93d30 lat_1=41d47 lat_2=40d37 lat_0=40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1501: kansas north: nad27 -<1501> proj=lcc datum=NAD27 -lon_0=-98 lat_1=39d47 lat_2=38d43 lat_0=38d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1502: kansas south: nad27 -<1502> proj=lcc datum=NAD27 -lon_0=-98d30 lat_1=38d34 lat_2=37d16 lat_0=36d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1601: kentucky north: nad27 -<1601> proj=lcc datum=NAD27 -lon_0=-84d15 lat_1=38d58 lat_2=37d58 lat_0=37d30 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1602: kentucky south: nad27 -<1602> proj=lcc datum=NAD27 -lon_0=-85d45 lat_1=37d56 lat_2=36d44 lat_0=36d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1701: louisiana north: nad27 -<1701> proj=lcc datum=NAD27 -lon_0=-92d30 lat_1=32d40 lat_2=31d10 lat_0=30d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1702: louisiana south: nad27 -<1702> proj=lcc datum=NAD27 -lon_0=-91d20 lat_1=30d42 lat_2=29d18 lat_0=28d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1703: louisiana offshore: nad27 -<1703> proj=lcc datum=NAD27 -lon_0=-91d20 lat_1=27d50 lat_2=26d10 lat_0=25d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 1801: maine east: nad27 -<1801> proj=tmerc datum=NAD27 -lon_0=-68d30 lat_0=43d50 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1802: maine west: nad27 -<1802> proj=tmerc datum=NAD27 -lon_0=-70d10 lat_0=42d50 k=.9999666666666667 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 1900: maryland ---: nad27 -<1900> proj=lcc datum=NAD27 -lon_0=-77 lat_1=39d27 lat_2=38d18 lat_0=37d50 -x_0=243840.4876809754 y_0=0 -no_defs <> - -# 2001: massachusetts mainland: nad27 -<2001> proj=lcc datum=NAD27 -lon_0=-71d30 lat_1=42d41 lat_2=41d43 lat_0=41 -x_0=182880.3657607315 y_0=0 -no_defs <> - -# 2002: massachusetts island: nad27 -<2002> proj=lcc datum=NAD27 -lon_0=-70d30 lat_1=41d29 lat_2=41d17 lat_0=41 -x_0=60960.12192024384 y_0=0 -no_defs <> - -# 2101: michigan east: nad27 -<2101> proj=tmerc datum=NAD27 -lon_0=-83d40 lat_0=41d30 k=.9999428571428571 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2102: michigan central/m: nad27 -<2102> proj=tmerc datum=NAD27 -lon_0=-85d45 lat_0=41d30 k=.9999090909090909 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2103: michigan west: nad27 -<2103> proj=tmerc datum=NAD27 -lon_0=-88d45 lat_0=41d30 k=.9999090909090909 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2111: michigan north: nad27 -<2111> proj=lcc a=6378450.047 es=.006768657997291094 -lon_0=-87 lat_1=47d5 lat_2=45d29 lat_0=44d47 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2112: michigan central/l: nad27 -<2112> proj=lcc a=6378450.047 es=.006768657997291094 -lon_0=-84d20 lat_1=45d42 lat_2=44d11 lat_0=43d19 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2113: michigan south: nad27 -<2113> proj=lcc a=6378450.047 es=.006768657997291094 -lon_0=-84d20 lat_1=43d40 lat_2=42d6 lat_0=41d30 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2201: minnesota north: nad27 -<2201> proj=lcc datum=NAD27 -lon_0=-93d6 lat_1=48d38 lat_2=47d2 lat_0=46d30 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2202: minnesota central: nad27 -<2202> proj=lcc datum=NAD27 -lon_0=-94d15 lat_1=47d3 lat_2=45d37 lat_0=45 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2203: minnesota south: nad27 -<2203> proj=lcc datum=NAD27 -lon_0=-94 lat_1=45d13 lat_2=43d47 lat_0=43 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2301: mississippi east: nad27 -<2301> proj=tmerc datum=NAD27 -lon_0=-88d50 lat_0=29d40 k=.99996 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2302: mississippi west: nad27 -<2302> proj=tmerc datum=NAD27 -lon_0=-90d20 lat_0=30d30 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2401: missouri east: nad27 -<2401> proj=tmerc datum=NAD27 -lon_0=-90d30 lat_0=35d50 k=.9999333333333333 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2402: missouri central: nad27 -<2402> proj=tmerc datum=NAD27 -lon_0=-92d30 lat_0=35d50 k=.9999333333333333 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2403: missouri west: nad27 -<2403> proj=tmerc datum=NAD27 -lon_0=-94d30 lat_0=36d10 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2501: montana north: nad27 -<2501> proj=lcc datum=NAD27 -lon_0=-109d30 lat_1=48d43 lat_2=47d51 lat_0=47 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2502: montana central: nad27 -<2502> proj=lcc datum=NAD27 -lon_0=-109d30 lat_1=47d53 lat_2=46d27 lat_0=45d50 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2503: montana south: nad27 -<2503> proj=lcc datum=NAD27 -lon_0=-109d30 lat_1=46d24 lat_2=44d52 lat_0=44 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2601: nebraska north: nad27 -<2601> proj=lcc datum=NAD27 -lon_0=-100 lat_1=42d49 lat_2=41d51 lat_0=41d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2602: nebraska south: nad27 -<2602> proj=lcc datum=NAD27 -lon_0=-99d30 lat_1=41d43 lat_2=40d17 lat_0=39d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 2701: nevada east: nad27 -<2701> proj=tmerc datum=NAD27 -lon_0=-115d35 lat_0=34d45 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2702: nevada central: nad27 -<2702> proj=tmerc datum=NAD27 -lon_0=-116d40 lat_0=34d45 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2703: nevada west: nad27 -<2703> proj=tmerc datum=NAD27 -lon_0=-118d35 lat_0=34d45 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2800: new hampshire ---: nad27 -<2800> proj=tmerc datum=NAD27 -lon_0=-71d40 lat_0=42d30 k=.9999666666666667 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 2900: new jersey ---: nad27 -<2900> proj=tmerc datum=NAD27 -lon_0=-74d40 lat_0=38d50 k=.999975 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3001: new mexico east: nad27 -<3001> proj=tmerc datum=NAD27 -lon_0=-104d20 lat_0=31 k=.9999090909090909 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 3002: new mexico central: nad27 -<3002> proj=tmerc datum=NAD27 -lon_0=-106d15 lat_0=31 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 3003: new mexico west: nad27 -<3003> proj=tmerc datum=NAD27 -lon_0=-107d50 lat_0=31 k=.9999166666666667 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 3101: new york east: nad27 -<3101> proj=tmerc datum=NAD27 -lon_0=-74d20 lat_0=40 k=.9999666666666667 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 3102: new york central: nad27 -<3102> proj=tmerc datum=NAD27 -lon_0=-76d35 lat_0=40 k=.9999375 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 3103: new york west: nad27 -<3103> proj=tmerc datum=NAD27 -lon_0=-78d35 lat_0=40 k=.9999375 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 3104: new york long island: nad27 -<3104> proj=lcc datum=NAD27 -lon_0=-74 lat_1=41d2 lat_2=40d40 lat_0=40d30 -x_0=609601.2192024384 y_0=30480.06096012192 -no_defs <> - -# 3200: north carolina ---: nad27 -<3200> proj=lcc datum=NAD27 -lon_0=-79 lat_1=36d10 lat_2=34d20 lat_0=33d45 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3301: north dakota north: nad27 -<3301> proj=lcc datum=NAD27 -lon_0=-100d30 lat_1=48d44 lat_2=47d26 lat_0=47 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3302: north dakota south: nad27 -<3302> proj=lcc datum=NAD27 -lon_0=-100d30 lat_1=47d29 lat_2=46d11 lat_0=45d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3401: ohio north: nad27 -<3401> proj=lcc datum=NAD27 -lon_0=-82d30 lat_1=41d42 lat_2=40d26 lat_0=39d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3402: ohio south: nad27 -<3402> proj=lcc datum=NAD27 -lon_0=-82d30 lat_1=40d2 lat_2=38d44 lat_0=38 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3501: oklahoma north: nad27 -<3501> proj=lcc datum=NAD27 -lon_0=-98 lat_1=36d46 lat_2=35d34 lat_0=35 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3502: oklahoma south: nad27 -<3502> proj=lcc datum=NAD27 -lon_0=-98 lat_1=35d14 lat_2=33d56 lat_0=33d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3601: oregon north: nad27 -<3601> proj=lcc datum=NAD27 -lon_0=-120d30 lat_1=46 lat_2=44d20 lat_0=43d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3602: oregon south: nad27 -<3602> proj=lcc datum=NAD27 -lon_0=-120d30 lat_1=44 lat_2=42d20 lat_0=41d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3701: pennsylvania north: nad27 -<3701> proj=lcc datum=NAD27 -lon_0=-77d45 lat_1=41d57 lat_2=40d53 lat_0=40d10 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3702: pennsylvania south: nad27 -<3702> proj=lcc datum=NAD27 -lon_0=-77d45 lat_1=40d58 lat_2=39d56 lat_0=39d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3800: rhode island ---: nad27 -<3800> proj=tmerc datum=NAD27 -lon_0=-71d30 lat_0=41d5 k=.99999375 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 3901: south carolina north: nad27 -<3901> proj=lcc datum=NAD27 -lon_0=-81 lat_1=34d58 lat_2=33d46 lat_0=33 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 3902: south carolina south: nad27 -<3902> proj=lcc datum=NAD27 -lon_0=-81 lat_1=33d40 lat_2=32d20 lat_0=31d50 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4001: south dakota north: nad27 -<4001> proj=lcc datum=NAD27 -lon_0=-100 lat_1=45d41 lat_2=44d25 lat_0=43d50 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4002: south dakota south: nad27 -<4002> proj=lcc datum=NAD27 -lon_0=-100d20 lat_1=44d24 lat_2=42d50 lat_0=42d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4100: tennessee ---: nad27 -<4100> proj=lcc datum=NAD27 -lon_0=-86 lat_1=36d25 lat_2=35d15 lat_0=34d40 -x_0=609601.2192024384 y_0=30480.06096012192 -no_defs <> - -# 4201: texas north: nad27 -<4201> proj=lcc datum=NAD27 -lon_0=-101d30 lat_1=36d11 lat_2=34d39 lat_0=34 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4202: texas north central: nad27 -<4202> proj=lcc datum=NAD27 -lon_0=-97d30 lat_1=33d58 lat_2=32d8 lat_0=31d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4203: texas central: nad27 -<4203> proj=lcc datum=NAD27 -lon_0=-100d20 lat_1=31d53 lat_2=30d7 lat_0=29d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4204: texas south central: nad27 -<4204> proj=lcc datum=NAD27 -lon_0=-99 lat_1=30d17 lat_2=28d23 lat_0=27d50 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4205: texas south: nad27 -<4205> proj=lcc datum=NAD27 -lon_0=-98d30 lat_1=27d50 lat_2=26d10 lat_0=25d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4301: utah north: nad27 -<4301> proj=lcc datum=NAD27 -lon_0=-111d30 lat_1=41d47 lat_2=40d43 lat_0=40d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4302: utah central: nad27 -<4302> proj=lcc datum=NAD27 -lon_0=-111d30 lat_1=40d39 lat_2=39d1 lat_0=38d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4303: utah south: nad27 -<4303> proj=lcc datum=NAD27 -lon_0=-111d30 lat_1=38d21 lat_2=37d13 lat_0=36d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4400: vermont ---: nad27 -<4400> proj=tmerc datum=NAD27 -lon_0=-72d30 lat_0=42d30 k=.9999642857142857 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 4501: virginia north: nad27 -<4501> proj=lcc datum=NAD27 -lon_0=-78d30 lat_1=39d12 lat_2=38d2 lat_0=37d40 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4502: virginia south: nad27 -<4502> proj=lcc datum=NAD27 -lon_0=-78d30 lat_1=37d58 lat_2=36d46 lat_0=36d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4601: washington north: nad27 -<4601> proj=lcc datum=NAD27 -lon_0=-120d50 lat_1=48d44 lat_2=47d30 lat_0=47 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4602: washington south: nad27 -<4602> proj=lcc datum=NAD27 -lon_0=-120d30 lat_1=47d20 lat_2=45d50 lat_0=45d20 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4701: west virginia north: nad27 -<4701> proj=lcc datum=NAD27 -lon_0=-79d30 lat_1=40d15 lat_2=39 lat_0=38d30 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4702: west virginia south: nad27 -<4702> proj=lcc datum=NAD27 -lon_0=-81 lat_1=38d53 lat_2=37d29 lat_0=37 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4801: wisconsin north: nad27 -<4801> proj=lcc datum=NAD27 -lon_0=-90 lat_1=46d46 lat_2=45d34 lat_0=45d10 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4802: wisconsin central: nad27 -<4802> proj=lcc datum=NAD27 -lon_0=-90 lat_1=45d30 lat_2=44d15 lat_0=43d50 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4803: wisconsin south: nad27 -<4803> proj=lcc datum=NAD27 -lon_0=-90 lat_1=44d4 lat_2=42d44 lat_0=42 -x_0=609601.2192024384 y_0=0 -no_defs <> - -# 4901: wyoming east: nad27 -<4901> proj=tmerc datum=NAD27 -lon_0=-105d10 lat_0=40d40 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 4902: wyoming east central: nad27 -<4902> proj=tmerc datum=NAD27 -lon_0=-107d20 lat_0=40d40 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 4903: wyoming west central: nad27 -<4903> proj=tmerc datum=NAD27 -lon_0=-108d45 lat_0=40d40 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 4904: wyoming west: nad27 -<4904> proj=tmerc datum=NAD27 -lon_0=-110d5 lat_0=40d40 k=.9999411764705882 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5001: alaska zone no. 1: nad27 -<5001> proj=omerc datum=NAD27 -k=.9999 lonc=-133d40 lat_0=57 alpha=-36d52'11.6315 -x_0=818585.5672270928 y_0=575219.2451072642 -no_defs <> - -# 5002: alaska zone no. 2: nad27 -<5002> proj=tmerc datum=NAD27 -lon_0=-142 lat_0=54 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5003: alaska zone no. 3: nad27 -<5003> proj=tmerc datum=NAD27 -lon_0=-146 lat_0=54 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5004: alaska zone no. 4: nad27 -<5004> proj=tmerc datum=NAD27 -lon_0=-150 lat_0=54 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5005: alaska zone no. 5: nad27 -<5005> proj=tmerc datum=NAD27 -lon_0=-154 lat_0=54 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5006: alaska zone no. 6: nad27 -<5006> proj=tmerc datum=NAD27 -lon_0=-158 lat_0=54 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5007: alaska zone no. 7: nad27 -<5007> proj=tmerc datum=NAD27 -lon_0=-162 lat_0=54 k=.9999 -x_0=213360.4267208534 y_0=0 -no_defs <> - -# 5008: alaska zone no. 8: nad27 -<5008> proj=tmerc datum=NAD27 -lon_0=-166 lat_0=54 k=.9999 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5009: alaska zone no. 9: nad27 -<5009> proj=tmerc datum=NAD27 -lon_0=-170 lat_0=54 k=.9999 -x_0=182880.3657607315 y_0=0 -no_defs <> - -# 5201: puerto rico and virgin islands: nad27 -<5201> proj=lcc datum=NAD27 -lon_0=-66d26 lat_1=18d26 lat_2=18d2 lat_0=17d50 -x_0=152400.3048006096 y_0=0 -no_defs <> - -# 5202: virgin islands st. croix: nad27 -<5202> proj=lcc datum=NAD27 -lon_0=-66d26 lat_1=18d26 lat_2=18d2 lat_0=17d50 -x_0=152400.3048006096 y_0=30480.06096012192 -no_defs <> - -# 5400: guam island: nad27 -<5400> proj=poly datum=NAD27 -x_0=50000 y_0=50000 lon_0=144d44'55.50254 lat_0=13d28'20.87887 -no_defs <> - diff --git a/app/android/assets/qgis-data/proj/nad83 b/app/android/assets/qgis-data/proj/nad83 deleted file mode 100644 index 1b65f5196..000000000 --- a/app/android/assets/qgis-data/proj/nad83 +++ /dev/null @@ -1,745 +0,0 @@ -# SCCSID @(#)nad83 4.1 92/12/20 GIE -# proj +init files for: -# -# State Plane Coordinate Systems, -# North American Datum 1983 - - +lastupdate=1992-12-20 -# 101: alabama east: nad83 -<101> proj=tmerc datum=NAD83 -lon_0=-85d50 lat_0=30d30 k=.99996 -x_0=200000 y_0=0 -no_defs <> - -# 102: alabama west: nad83 -<102> proj=tmerc datum=NAD83 -lon_0=-87d30 lat_0=30 k=.9999333333333333 -x_0=600000 y_0=0 -no_defs <> - -# 5010: alaska zone no. 10: nad83 -<5010> proj=lcc datum=NAD83 -lon_0=-176 lat_1=53d50 lat_2=51d50 lat_0=51 -x_0=1000000 y_0=0 -no_defs <> - -# 201: arizona east: nad83 -<201> proj=tmerc datum=NAD83 -lon_0=-110d10 lat_0=31 k=.9999 -x_0=213360 y_0=0 -no_defs <> - -# 202: arizona central: nad83 -<202> proj=tmerc datum=NAD83 -lon_0=-111d55 lat_0=31 k=.9999 -x_0=213360 y_0=0 -no_defs <> - -# 203: arizona west: nad83 -<203> proj=tmerc datum=NAD83 -lon_0=-113d45 lat_0=31 k=.9999333333333333 -x_0=213360 y_0=0 -no_defs <> - -# 301: arkansas north: nad83 -<301> proj=lcc datum=NAD83 -lon_0=-92 lat_1=36d14 lat_2=34d56 lat_0=34d20 -x_0=400000 y_0=0 -no_defs <> - -# 302: arkansas south: nad83 -<302> proj=lcc datum=NAD83 -lon_0=-92 lat_1=34d46 lat_2=33d18 lat_0=32d40 -x_0=400000 y_0=400000 -no_defs <> - -# 401: california i: nad83 -<401> proj=lcc datum=NAD83 -lon_0=-122 lat_1=41d40 lat_2=40 lat_0=39d20 -x_0=2000000 y_0=500000 -no_defs <> - -# 402: california ii: nad83 -<402> proj=lcc datum=NAD83 -lon_0=-122 lat_1=39d50 lat_2=38d20 lat_0=37d40 -x_0=2000000 y_0=500000 -no_defs <> - -# 403: california iii: nad83 -<403> proj=lcc datum=NAD83 -lon_0=-120d30 lat_1=38d26 lat_2=37d4 lat_0=36d30 -x_0=2000000 y_0=500000 -no_defs <> - -# 404: california iv: nad83 -<404> proj=lcc datum=NAD83 -lon_0=-119 lat_1=37d15 lat_2=36 lat_0=35d20 -x_0=2000000 y_0=500000 -no_defs <> - -# 405: california v: nad83 -<405> proj=lcc datum=NAD83 -lon_0=-118 lat_1=35d28 lat_2=34d2 lat_0=33d30 -x_0=2000000 y_0=500000 -no_defs <> - -# 406: california vi: nad83 -<406> proj=lcc datum=NAD83 -lon_0=-116d15 lat_1=33d53 lat_2=32d47 lat_0=32d10 -x_0=2000000 y_0=500000 -no_defs <> - -# 501: colorado north: nad83 -<501> proj=lcc datum=NAD83 -lon_0=-105d30 lat_1=40d47 lat_2=39d43 lat_0=39d20 -x_0=914401.8289 y_0=304800.6096 -no_defs <> - -# 502: colorado central: nad83 -<502> proj=lcc datum=NAD83 -lon_0=-105d30 lat_1=39d45 lat_2=38d27 lat_0=37d50 -x_0=914401.8289 y_0=304800.6096 -no_defs <> - -# 503: colorado south: nad83 -<503> proj=lcc datum=NAD83 -lon_0=-105d30 lat_1=38d26 lat_2=37d14 lat_0=36d40 -x_0=914401.8289 y_0=304800.6096 -no_defs <> - -# 600: connecticut ---: nad83 -<600> proj=lcc datum=NAD83 -lon_0=-72d45 lat_1=41d52 lat_2=41d12 lat_0=40d50 -x_0=304800.6096 y_0=152400.3048 -no_defs <> - -# 700: delaware ---: nad83 -<700> proj=tmerc datum=NAD83 -lon_0=-75d25 lat_0=38 k=.999995 -x_0=200000 y_0=0 -no_defs <> - -# 901: florida east: nad83 -<901> proj=tmerc datum=NAD83 -lon_0=-81 lat_0=24d20 k=.9999411764705882 -x_0=200000 y_0=0 -no_defs <> - -# 902: florida west: nad83 -<902> proj=tmerc datum=NAD83 -lon_0=-82 lat_0=24d20 k=.9999411764705882 -x_0=200000 y_0=0 -no_defs <> - -# 903: florida north: nad83 -<903> proj=lcc datum=NAD83 -lon_0=-84d30 lat_1=30d45 lat_2=29d35 lat_0=29 -x_0=600000 y_0=0 -no_defs <> - -# 1001: georgia east: nad83 -<1001> proj=tmerc datum=NAD83 -lon_0=-82d10 lat_0=30 k=.9999 -x_0=200000 y_0=0 -no_defs <> - -# 1002: georgia west: nad83 -<1002> proj=tmerc datum=NAD83 -lon_0=-84d10 lat_0=30 k=.9999 -x_0=700000 y_0=0 -no_defs <> - -# 5101: hawaii 1: nad83 -<5101> proj=tmerc datum=NAD83 -lon_0=-155d30 lat_0=18d50 k=.9999666666666667 -x_0=500000 y_0=0 -no_defs <> - -# 5102: hawaii 2: nad83 -<5102> proj=tmerc datum=NAD83 -lon_0=-156d40 lat_0=20d20 k=.9999666666666667 -x_0=500000 y_0=0 -no_defs <> - -# 5103: hawaii 3: nad83 -<5103> proj=tmerc datum=NAD83 -lon_0=-158 lat_0=21d10 k=.99999 -x_0=500000 y_0=0 -no_defs <> - -# 5104: hawaii 4: nad83 -<5104> proj=tmerc datum=NAD83 -lon_0=-159d30 lat_0=21d50 k=.99999 -x_0=500000 y_0=0 -no_defs <> - -# 5105: hawaii 5: nad83 -<5105> proj=tmerc datum=NAD83 -lon_0=-160d10 lat_0=21d40 k=1 -x_0=500000 y_0=0 -no_defs <> - -# 1101: idaho east: nad83 -<1101> proj=tmerc datum=NAD83 -lon_0=-112d10 lat_0=41d40 k=.9999473684210526 -x_0=200000 y_0=0 -no_defs <> - -# 1102: idaho central: nad83 -<1102> proj=tmerc datum=NAD83 -lon_0=-114 lat_0=41d40 k=.9999473684210526 -x_0=500000 y_0=0 -no_defs <> - -# 1103: idaho west: nad83 -<1103> proj=tmerc datum=NAD83 -lon_0=-115d45 lat_0=41d40 k=.9999333333333333 -x_0=800000 y_0=0 -no_defs <> - -# 1201: illinois east: nad83 -<1201> proj=tmerc datum=NAD83 -lon_0=-88d20 lat_0=36d40 k=.999975 -x_0=300000 y_0=0 -no_defs <> - -# 1202: illinois west: nad83 -<1202> proj=tmerc datum=NAD83 -lon_0=-90d10 lat_0=36d40 k=.9999411764705882 -x_0=700000 y_0=0 -no_defs <> - -# 1301: indiana east: nad83 -<1301> proj=tmerc datum=NAD83 -lon_0=-85d40 lat_0=37d30 k=.9999666666666667 -x_0=100000 y_0=250000 -no_defs <> - -# 1302: indiana west: nad83 -<1302> proj=tmerc datum=NAD83 -lon_0=-87d5 lat_0=37d30 k=.9999666666666667 -x_0=900000 y_0=250000 -no_defs <> - -# 1401: iowa north: nad83 -<1401> proj=lcc datum=NAD83 -lon_0=-93d30 lat_1=43d16 lat_2=42d4 lat_0=41d30 -x_0=1500000 y_0=1000000 -no_defs <> - -# 1402: iowa south: nad83 -<1402> proj=lcc datum=NAD83 -lon_0=-93d30 lat_1=41d47 lat_2=40d37 lat_0=40 -x_0=500000 y_0=0 -no_defs <> - -# 1501: kansas north: nad83 -<1501> proj=lcc datum=NAD83 -lon_0=-98 lat_1=39d47 lat_2=38d43 lat_0=38d20 -x_0=400000 y_0=0 -no_defs <> - -# 1502: kansas south: nad83 -<1502> proj=lcc datum=NAD83 -lon_0=-98d30 lat_1=38d34 lat_2=37d16 lat_0=36d40 -x_0=400000 y_0=400000 -no_defs <> - -# 1601: kentucky north: nad83 -<1601> proj=lcc datum=NAD83 -lon_0=-84d15 lat_1=38d58 lat_2=37d58 lat_0=37d30 -x_0=500000 y_0=0 -no_defs <> - -# 1602: kentucky south: nad83 -<1602> proj=lcc datum=NAD83 -lon_0=-85d45 lat_1=37d56 lat_2=36d44 lat_0=36d20 -x_0=500000 y_0=500000 -no_defs <> - -# 1701: louisiana north: nad83 -<1701> proj=lcc datum=NAD83 -lon_0=-92d30 lat_1=32d40 lat_2=31d10 lat_0=30d30 -x_0=1000000 y_0=0 -no_defs <> - -# 1702: louisiana south: nad83 -<1702> proj=lcc datum=NAD83 -lon_0=-91d20 lat_1=30d42 lat_2=29d18 lat_0=28d30 -x_0=1000000 y_0=0 -no_defs <> - -# 1703: louisiana offshore: nad83 -<1703> proj=lcc datum=NAD83 -lon_0=-91d20 lat_1=27d50 lat_2=26d10 lat_0=25d30 -x_0=1000000 y_0=0 -no_defs <> - -# 1801: maine east: nad83 -<1801> proj=tmerc datum=NAD83 -lon_0=-68d30 lat_0=43d40 k=.9999 -x_0=300000 y_0=0 -no_defs <> - -# 1802: maine west: nad83 -<1802> proj=tmerc datum=NAD83 -lon_0=-70d10 lat_0=42d50 k=.9999666666666667 -x_0=900000 y_0=0 -no_defs <> - -# 1900: maryland ---: nad83 -<1900> proj=lcc datum=NAD83 -lon_0=-77 lat_1=39d27 lat_2=38d18 lat_0=37d40 -x_0=400000 y_0=0 -no_defs <> - -# 2001: massachusetts mainland: nad83 -<2001> proj=lcc datum=NAD83 -lon_0=-71d30 lat_1=42d41 lat_2=41d43 lat_0=41 -x_0=200000 y_0=750000 -no_defs <> - -# 2002: massachusetts island: nad83 -<2002> proj=lcc datum=NAD83 -lon_0=-70d30 lat_1=41d29 lat_2=41d17 lat_0=41 -x_0=500000 y_0=0 -no_defs <> - -# 2111: michigan north: nad83 -<2111> proj=lcc datum=NAD83 -lon_0=-87 lat_1=47d5 lat_2=45d29 lat_0=44d47 -x_0=8000000 y_0=0 -no_defs <> - -# 2112: michigan central/l: nad83 -<2112> proj=lcc datum=NAD83 -lon_0=-84d22 lat_1=45d42 lat_2=44d11 lat_0=43d19 -x_0=6000000 y_0=0 -no_defs <> - -# 2113: michigan south: nad83 -<2113> proj=lcc datum=NAD83 -lon_0=-84d22 lat_1=43d40 lat_2=42d6 lat_0=41d30 -x_0=4000000 y_0=0 -no_defs <> - -# 2201: minnesota north: nad83 -<2201> proj=lcc datum=NAD83 -lon_0=-93d6 lat_1=48d38 lat_2=47d2 lat_0=46d30 -x_0=800000 y_0=100000 -no_defs <> - -# 2202: minnesota central: nad83 -<2202> proj=lcc datum=NAD83 -lon_0=-94d15 lat_1=47d3 lat_2=45d37 lat_0=45 -x_0=800000 y_0=100000 -no_defs <> - -# 2203: minnesota south: nad83 -<2203> proj=lcc datum=NAD83 -lon_0=-94 lat_1=45d13 lat_2=43d47 lat_0=43 -x_0=800000 y_0=100000 -no_defs <> - -# 2301: mississippi east: nad83 -<2301> proj=tmerc datum=NAD83 -lon_0=-88d50 lat_0=29d30 k=.99995 -x_0=300000 y_0=0 -no_defs <> - -# 2302: mississippi west: nad83 -<2302> proj=tmerc datum=NAD83 -lon_0=-90d20 lat_0=29d30 k=.99995 -x_0=700000 y_0=0 -no_defs <> - -# 2401: missouri east: nad83 -<2401> proj=tmerc datum=NAD83 -lon_0=-90d30 lat_0=35d50 k=.9999333333333333 -x_0=250000 y_0=0 -no_defs <> - -# 2402: missouri central: nad83 -<2402> proj=tmerc datum=NAD83 -lon_0=-92d30 lat_0=35d50 k=.9999333333333333 -x_0=500000 y_0=0 -no_defs <> - -# 2403: missouri west: nad83 -<2403> proj=tmerc datum=NAD83 -lon_0=-94d30 lat_0=36d10 k=.9999411764705882 -x_0=850000 y_0=0 -no_defs <> - -# 2500: montana: nad83 -<2500> proj=lcc datum=NAD83 -lon_0=-109d30 lat_1=49 lat_2=45 lat_0=44d15 -x_0=600000 y_0=0 -no_defs <> - -# 2600: nebraska: nad83 -<2600> proj=lcc datum=NAD83 -lon_0=-100 lat_1=43 lat_2=40 lat_0=39d50 -x_0=500000 y_0=0 -no_defs <> - -# 2701: nevada east: nad83 -<2701> proj=tmerc datum=NAD83 -lon_0=-115d35 lat_0=34d45 k=.9999 -x_0=200000 y_0=8000000 -no_defs <> - -# 2702: nevada central: nad83 -<2702> proj=tmerc datum=NAD83 -lon_0=-116d40 lat_0=34d45 k=.9999 -x_0=500000 y_0=6000000 -no_defs <> - -# 2703: nevada west: nad83 -<2703> proj=tmerc datum=NAD83 -lon_0=-118d35 lat_0=34d45 k=.9999 -x_0=800000 y_0=4000000 -no_defs <> - -# 2800: new hampshire ---: nad83 -<2800> proj=tmerc datum=NAD83 -lon_0=-71d40 lat_0=42d30 k=.9999666666666667 -x_0=300000 y_0=0 -no_defs <> - -# 2900: new jersey ---: nad83 -<2900> proj=tmerc datum=NAD83 -lon_0=-74d30 lat_0=38d50 k=.9999 -x_0=150000 y_0=0 -no_defs <> - -# 3001: new mexico east: nad83 -<3001> proj=tmerc datum=NAD83 -lon_0=-104d20 lat_0=31 k=.9999090909090909 -x_0=165000 y_0=0 -no_defs <> - -# 3002: new mexico central: nad83 -<3002> proj=tmerc datum=NAD83 -lon_0=-106d15 lat_0=31 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 3003: new mexico west: nad83 -<3003> proj=tmerc datum=NAD83 -lon_0=-107d50 lat_0=31 k=.9999166666666667 -x_0=830000 y_0=0 -no_defs <> - -# 3101: new york east: nad83 -<3101> proj=tmerc datum=NAD83 -lon_0=-74d30 lat_0=38d50 k=.9999 -x_0=150000 y_0=0 -no_defs <> - -# 3102: new york central: nad83 -<3102> proj=tmerc datum=NAD83 -lon_0=-76d35 lat_0=40 k=.9999375 -x_0=250000 y_0=0 -no_defs <> - -# 3103: new york west: nad83 -<3103> proj=tmerc datum=NAD83 -lon_0=-78d35 lat_0=40 k=.9999375 -x_0=350000 y_0=0 -no_defs <> - -# 3104: new york long island: nad83 -<3104> proj=lcc datum=NAD83 -lon_0=-74 lat_1=41d2 lat_2=40d40 lat_0=40d10 -x_0=300000 y_0=0 -no_defs <> - -# 3200: north carolina ---: nad83 -<3200> proj=lcc datum=NAD83 -lon_0=-79 lat_1=36d10 lat_2=34d20 lat_0=33d45 -x_0=609601.22 y_0=0 -no_defs <> - -# 3301: north dakota north: nad83 -<3301> proj=lcc datum=NAD83 -lon_0=-100d30 lat_1=48d44 lat_2=47d26 lat_0=47 -x_0=600000 y_0=0 -no_defs <> - -# 3302: north dakota south: nad83 -<3302> proj=lcc datum=NAD83 -lon_0=-100d30 lat_1=47d29 lat_2=46d11 lat_0=45d40 -x_0=600000 y_0=0 -no_defs <> - -# 3401: ohio north: nad83 -<3401> proj=lcc datum=NAD83 -lon_0=-82d30 lat_1=41d42 lat_2=40d26 lat_0=39d40 -x_0=600000 y_0=0 -no_defs <> - -# 3402: ohio south: nad83 -<3402> proj=lcc datum=NAD83 -lon_0=-82d30 lat_1=40d2 lat_2=38d44 lat_0=38 -x_0=600000 y_0=0 -no_defs <> - -# 3501: oklahoma north: nad83 -<3501> proj=lcc datum=NAD83 -lon_0=-98 lat_1=36d46 lat_2=35d34 lat_0=35 -x_0=600000 y_0=0 -no_defs <> - -# 3502: oklahoma south: nad83 -<3502> proj=lcc datum=NAD83 -lon_0=-98 lat_1=35d14 lat_2=33d56 lat_0=33d20 -x_0=600000 y_0=0 -no_defs <> - -# 3601: oregon north: nad83 -<3601> proj=lcc datum=NAD83 -lon_0=-120d30 lat_1=46 lat_2=44d20 lat_0=43d40 -x_0=2500000 y_0=0 -no_defs <> - -# 3602: oregon south: nad83 -<3602> proj=lcc datum=NAD83 -lon_0=-120d30 lat_1=44 lat_2=42d20 lat_0=41d40 -x_0=1500000 y_0=0 -no_defs <> - -# 3701: pennsylvania north: nad83 -<3701> proj=lcc datum=NAD83 -lon_0=-77d45 lat_1=41d57 lat_2=40d53 lat_0=40d10 -x_0=600000 y_0=0 -no_defs <> - -# 3702: pennsylvania south: nad83 -<3702> proj=lcc datum=NAD83 -lon_0=-77d45 lat_1=40d58 lat_2=39d56 lat_0=39d20 -x_0=600000 y_0=0 -no_defs <> - -# 3800: rhode island ---: nad83 -<3800> proj=tmerc datum=NAD83 -lon_0=-71d30 lat_0=41d5 k=.99999375 -x_0=100000 y_0=0 -no_defs <> - -# 3900: south carolina: nad83 -<3900> proj=lcc datum=NAD83 -lon_0=-81 lat_1=34d50 lat_2=32d30 lat_0=31d50 -x_0=609600 y_0=0 -no_defs <> - -# 4001: south dakota north: nad83 -<4001> proj=lcc datum=NAD83 -lon_0=-100 lat_1=45d41 lat_2=44d25 lat_0=43d50 -x_0=600000 y_0=0 -no_defs <> - -# 4002: south dakota south: nad83 -<4002> proj=lcc datum=NAD83 -lon_0=-100d20 lat_1=44d24 lat_2=42d50 lat_0=42d20 -x_0=600000 y_0=0 -no_defs <> - -# 4100: tennessee ---: nad83 -<4100> proj=lcc datum=NAD83 -lon_0=-86 lat_1=36d25 lat_2=35d15 lat_0=34d20 -x_0=600000 y_0=0 -no_defs <> - -# 4201: texas north: nad83 -<4201> proj=lcc datum=NAD83 -lon_0=-101d30 lat_1=36d11 lat_2=34d39 lat_0=34 -x_0=200000 y_0=1000000 -no_defs <> - -# 4202: texas north central: nad83 -<4202> proj=lcc datum=NAD83 -lon_0=-98d30 lat_1=33d58 lat_2=32d8 lat_0=31d40 -x_0=600000 y_0=2000000 -no_defs <> - -# 4203: texas central: nad83 -<4203> proj=lcc datum=NAD83 -lon_0=-100d20 lat_1=31d53 lat_2=30d7 lat_0=29d40 -x_0=700000 y_0=3000000 -no_defs <> - -# 4204: texas south central: nad83 -<4204> proj=lcc datum=NAD83 -lon_0=-99 lat_1=30d17 lat_2=28d23 lat_0=27d50 -x_0=600000 y_0=4000000 -no_defs <> - -# 4205: texas south: nad83 -<4205> proj=lcc datum=NAD83 -lon_0=-98d30 lat_1=27d50 lat_2=26d10 lat_0=25d40 -x_0=300000 y_0=5000000 -no_defs <> - -# 4301: utah north: nad83 -<4301> proj=lcc datum=NAD83 -lon_0=-111d30 lat_1=41d47 lat_2=40d43 lat_0=40d20 -x_0=500000 y_0=1000000 -no_defs <> - -# 4302: utah central: nad83 -<4302> proj=lcc datum=NAD83 -lon_0=-111d30 lat_1=40d39 lat_2=39d1 lat_0=38d20 -x_0=500000 y_0=2000000 -no_defs <> - -# 4303: utah south: nad83 -<4303> proj=lcc datum=NAD83 -lon_0=-111d30 lat_1=38d21 lat_2=37d13 lat_0=36d40 -x_0=500000 y_0=3000000 -no_defs <> - -# 4400: vermont ---: nad83 -<4400> proj=tmerc datum=NAD83 -lon_0=-72d30 lat_0=42d30 k=.9999642857142857 -x_0=500000 y_0=0 -no_defs <> - -# 4501: virginia north: nad83 -<4501> proj=lcc datum=NAD83 -lon_0=-78d30 lat_1=39d12 lat_2=38d2 lat_0=37d40 -x_0=3500000 y_0=2000000 -no_defs <> - -# 4502: virginia south: nad83 -<4502> proj=lcc datum=NAD83 -lon_0=-78d30 lat_1=37d58 lat_2=36d46 lat_0=36d20 -x_0=3500000 y_0=1000000 -no_defs <> - -# 4601: washington north: nad83 -<4601> proj=lcc datum=NAD83 -lon_0=-120d50 lat_1=48d44 lat_2=47d30 lat_0=47 -x_0=500000 y_0=0 -no_defs <> - -# 4602: washington south: nad83 -<4602> proj=lcc datum=NAD83 -lon_0=-120d30 lat_1=47d20 lat_2=45d50 lat_0=45d20 -x_0=500000 y_0=0 -no_defs <> - -# 4701: west virginia north: nad83 -<4701> proj=lcc datum=NAD83 -lon_0=-79d30 lat_1=40d15 lat_2=39 lat_0=38d30 -x_0=600000 y_0=0 -no_defs <> - -# 4702: west virginia south: nad83 -<4702> proj=lcc datum=NAD83 -lon_0=-81 lat_1=38d53 lat_2=37d29 lat_0=37 -x_0=600000 y_0=0 -no_defs <> - -# 4801: wisconsin north: nad83 -<4801> proj=lcc datum=NAD83 -lon_0=-90 lat_1=46d46 lat_2=45d34 lat_0=45d10 -x_0=600000 y_0=0 -no_defs <> - -# 4802: wisconsin central: nad83 -<4802> proj=lcc datum=NAD83 -lon_0=-90 lat_1=45d30 lat_2=44d15 lat_0=43d50 -x_0=600000 y_0=0 -no_defs <> - -# 4803: wisconsin south: nad83 -<4803> proj=lcc datum=NAD83 -lon_0=-90 lat_1=44d4 lat_2=42d44 lat_0=42 -x_0=600000 y_0=0 -no_defs <> - -# 4901: wyoming east: nad83 -<4901> proj=tmerc datum=NAD83 -lon_0=-105d10 lat_0=40d30 k=.9999375 -x_0=200000 y_0=0 -no_defs <> - -# 4902: wyoming east central: nad83 -<4902> proj=tmerc datum=NAD83 -lon_0=-107d20 lat_0=40d30 k=.9999375 -x_0=400000 y_0=100000 -no_defs <> - -# 4903: wyoming west central: nad83 -<4903> proj=tmerc datum=NAD83 -lon_0=-108d45 lat_0=40d30 k=.9999375 -x_0=600000 y_0=0 -no_defs <> - -# 4904: wyoming west: nad83 -<4904> proj=tmerc datum=NAD83 -lon_0=-110d5 lat_0=40d30 k=.9999375 -x_0=800000 y_0=100000 -no_defs <> - -# 5001: alaska zone no. 1: nad83 -<5001> proj=omerc datum=NAD83 -k=.9999 lonc=-133d40 lat_0=57 alpha=-36d52'11.6315 -x_0=818676.7344011233 y_0=575097.6888751927 -no_defs <> - -# 5002: alaska zone no. 2: nad83 -<5002> proj=tmerc datum=NAD83 -lon_0=-142 lat_0=54 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 5003: alaska zone no. 3: nad83 -<5003> proj=tmerc datum=NAD83 -lon_0=-146 lat_0=54 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 5004: alaska zone no. 4: nad83 -<5004> proj=tmerc datum=NAD83 -lon_0=-150 lat_0=54 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 5005: alaska zone no. 5: nad83 -<5005> proj=tmerc datum=NAD83 -lon_0=-154 lat_0=54 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 5006: alaska zone no. 6: nad83 -<5006> proj=tmerc datum=NAD83 -lon_0=-158 lat_0=54 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 5007: alaska zone no. 7: nad83 -<5007> proj=tmerc datum=NAD83 -lon_0=-162 lat_0=54 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 5008: alaska zone no. 8: nad83 -<5008> proj=tmerc datum=NAD83 -lon_0=-166 lat_0=54 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 5009: alaska zone no. 9: nad83 -<5009> proj=tmerc datum=NAD83 -lon_0=-170 lat_0=54 k=.9999 -x_0=500000 y_0=0 -no_defs <> - -# 5200: puerto rico and virgin islands: nad83 -<5200> proj=lcc datum=NAD83 -lon_0=-66d26 lat_1=18d26 lat_2=18d2 lat_0=17d50 -x_0=200000 y_0=200000 -no_defs <> - diff --git a/app/android/assets/qgis-data/proj/other.extra b/app/android/assets/qgis-data/proj/other.extra deleted file mode 100644 index 4b5797e9a..000000000 --- a/app/android/assets/qgis-data/proj/other.extra +++ /dev/null @@ -1,53 +0,0 @@ -## NAD83 / BC Albers (this has been superseded but is kept for compatibility) -<42102> +proj=aea +ellps=GRS80 +lat_0=45 +lon_0=-126.0 +lat_1=50.0 +lat_2=58.5 +x_0=1000000.0 +y_0=0 +datum=NAD83 +units=m no_defs <> - - -# -# OGC-defined extended codes (41000--41999) -# see http://www.digitalearth.gov/wmt/auto.html -# -# WGS84 / Simple Mercator -<41001> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs no_defs <> -# -# CubeWerx-defined extended codes (42100--42199) -# -# WGS 84 / LCC Canada -<42101> +proj=lcc +lat_1=49 +lat_2=77 +lat_0=0 +lon_0=-95 +x_0=0 +y_0=-8000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs no_defs <> -#EPSG:42102,"PROJCS[\"NAD83 / BC Albers\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS_1980\",6378137,298.257222101]],PRIMEM[\"Greenwich\",0],UNIT[\"Decimal_Degree\",0.0174532925199433]],PROJECTION[\"Albers_conic_equal_area\"],PARAMETER[\"central_meridian\",-126.0],PARAMETER[\"latitude_of_origin\",45],PARAMETER[\"standard_parallel_1\",50.0],PARAMETER[\"standard_parallel_2\",58.5],PARAMETER[\"false_easting\",1000000.0],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]" -# WGS 84 / LCC USA -<42103> +proj=lcc +lat_1=33 +lat_2=45 +lat_0=0 +lon_0=-100 +x_0=0 +y_0=0 +ellps=WGS72 +datum=WGS84 +units=m +no_defs no_defs <> -# NAD83 / MTM zone 8 Québec -<42104> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs no_defs <> -# WGS84 / Merc NorthAm -<42105> +proj=merc +lat_ts=0 +lon_0=-96 +k=1.000000 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs no_defs <> -# WGS84 / Lambert Azim Mozambique -<42106> +proj=laea +lat_0=5 +lon_0=20 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +datum=WGS84 +units=m +no_defs no_defs <> -# -# CubeWerx-customer definitions (42300--42399) -# -# NAD27 / Polar Stereographic / CM=-98 -<42301> +proj=stere +lat_0=90 +lon_0=-98 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs no_defs <> -# JapanOrtho.09 09 -<42302> +proj=tmerc +lat_0=36 +lon_0=139.833333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs no_defs <> -# NAD83 / Albers NorthAm -<42303> +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs no_defs <> -# NAD83 / NRCan LCC Canada -<42304> +proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs no_defs <> -# France_II -<42305> +proj=lcc +lat_1=45.898918964419 +lat_2=47.696014502038 +lat_0=46.8 +lon_0=2.337229166666667 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356514.999904194 +pm=2.337229166666667 +units=m +no_defs no_defs <> -# NAD83/QC_LCC -<42306> +proj=lcc +lat_1=46 +lat_2=60 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs no_defs <> -# NAD83 / Texas Central - feet -<42307> +proj=lcc +lat_1=31.8833333333333 +lat_2=30.1166666666667 +lat_0=29.6666666666667 +lon_0=-100.333333333333 +x_0=700000.0000000001 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs no_defs <> -# NAD27 / California Albers -<42308> +proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=clrk66 +datum=NAD27 +units=m +no_defs no_defs <> -# NAD 83 / LCC Canada AVHRR-2 -<42309> +proj=lcc +lat_1=49 +lat_2=77 +lat_0=0 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs no_defs <> -# WGS84+GRS80 / Mercator -<42310> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0 +ellps=GRS80 +datum=WGS84 +units=m +no_defs no_defs <> -# NAD83 / LCC Statcan -<42311> +proj=lcc +lat_1=49 +lat_2=77 +lat_0=63.390675 +lon_0=-91.86666700000001 +x_0=6200000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs no_defs <> -# -# Funny epsgish code for google mercator - you should really use EPSG:3857 -# -<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs <> diff --git a/app/android/assets/qgis-data/proj/proj.db b/app/android/assets/qgis-data/proj/proj.db deleted file mode 100644 index a6eeae97f..000000000 Binary files a/app/android/assets/qgis-data/proj/proj.db and /dev/null differ diff --git a/app/android/assets/qgis-data/proj/proj.ini b/app/android/assets/qgis-data/proj/proj.ini deleted file mode 100644 index 144562cf6..000000000 --- a/app/android/assets/qgis-data/proj/proj.ini +++ /dev/null @@ -1,51 +0,0 @@ -[general] -; Lines starting by ; are commented lines. -; - -; Network capabilities disabled by default. -; Can be overridden with the PROJ_NETWORK=ON environment variable. -; Cf https://proj.org/en/latest/usage/network.html -; Valid values = on, off -network = off - -; Endpoint of the Content Delivery Network where remote resources might -; be accessed. Only used if network access is allowed (cf above "network" -; option) -; Can be overridden with the PROJ_NETWORK_ENDPOINT environment variable. -cdn_endpoint = https://cdn.proj.org - -; Whether to enable a cache of remote resources that are accessed, on the -; local file system -; Valid values = on, off -cache_enabled = on - -; Size of the cache in megabytes -cache_size_MB = 300 - -; Time-to-live delay in seconds before already accessed remote resources are -; acessed again to check if they have been updated. -cache_ttl_sec = 86400 - -; Can be set to on so that by default the lack of a known resource files needed -; for the best transformation PROJ would normally use causes an error, or off -; to accept missing resource files without errors or warnings. -; This default value itself is overriden by the PROJ_ONLY_BEST_DEFAULT environment -; variable if set, and then by the ONLY_BEST setting that can be -; passed to the proj_create_crs_to_crs() method, or with the --only-best -; option of the cs2cs program. -; (added in PROJ 9.2) -; Valid values = on, off -only_best_default = off - -; Filename of the Certificate Authority (CA) bundle. -; Can be overriden with the PROJ_CURL_CA_BUNDLE / CURL_CA_BUNDLE environment variable. -; (added in PROJ 9.0) -; ca_bundle_path = /path/to/cabundle.pem - -; Transverse Mercator (and UTM) default algorithm: auto, evenden_snyder or poder_engsager -; * evenden_snyder is the fastest, but less accurate far from central meridian -; * poder_engsager is slower, but more accurate far from central meridian -; * default will auto-select between the two above depending on the coordinate -; to transform and will use evenden_snyder if the error in doing so is below -; 0.1 mm (for an ellipsoid of the size of Earth) -tmerc_default_algo = poder_engsager diff --git a/app/android/assets/qgis-data/proj/projjson.schema.json b/app/android/assets/qgis-data/proj/projjson.schema.json deleted file mode 100644 index a8578c81e..000000000 --- a/app/android/assets/qgis-data/proj/projjson.schema.json +++ /dev/null @@ -1,1174 +0,0 @@ -{ - "$id": "https://proj.org/schemas/v0.7/projjson.schema.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Schema for PROJJSON (v0.7)", - "$comment": "This document is copyright Even Rouault and PROJ contributors, 2019-2023, and subject to the MIT license. This file exists both in data/ and in schemas/vXXX/. Keep both in sync. And if changing the value of $id, change PROJJSON_DEFAULT_VERSION accordingly in io.cpp", - - "oneOf": [ - { "$ref": "#/definitions/crs" }, - { "$ref": "#/definitions/datum" }, - { "$ref": "#/definitions/datum_ensemble" }, - { "$ref": "#/definitions/ellipsoid" }, - { "$ref": "#/definitions/prime_meridian" }, - { "$ref": "#/definitions/single_operation" }, - { "$ref": "#/definitions/concatenated_operation" }, - { "$ref": "#/definitions/coordinate_metadata" } - ], - - "definitions": { - - "abridged_transformation": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["AbridgedTransformation"] }, - "name": { "type": "string" }, - "source_crs": { - "$ref": "#/definitions/crs", - "$comment": "Only present when the source_crs of the bound_crs does not match the source_crs of the AbridgedTransformation. No equivalent in WKT" - }, - "method": { "$ref": "#/definitions/method" }, - "parameters": { - "type": "array", - "items": { "$ref": "#/definitions/parameter_value" } - }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name", "method", "parameters" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "axis": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["Axis"] }, - "name": { "type": "string" }, - "abbreviation": { "type": "string" }, - "direction": { "type": "string", - "enum": [ "north", - "northNorthEast", - "northEast", - "eastNorthEast", - "east", - "eastSouthEast", - "southEast", - "southSouthEast", - "south", - "southSouthWest", - "southWest", - "westSouthWest", - "west", - "westNorthWest", - "northWest", - "northNorthWest", - "up", - "down", - "geocentricX", - "geocentricY", - "geocentricZ", - "columnPositive", - "columnNegative", - "rowPositive", - "rowNegative", - "displayRight", - "displayLeft", - "displayUp", - "displayDown", - "forward", - "aft", - "port", - "starboard", - "clockwise", - "counterClockwise", - "towards", - "awayFrom", - "future", - "past", - "unspecified" ] }, - "meridian": { "$ref": "#/definitions/meridian" }, - "unit": { "$ref": "#/definitions/unit" }, - "minimum_value": { "type": "number" }, - "maximum_value": { "type": "number" }, - "range_meaning": { "type": "string", "enum": [ "exact", "wraparound"] }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name", "abbreviation", "direction" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "bbox": { - "type": "object", - "properties": { - "east_longitude": { "type": "number" }, - "west_longitude": { "type": "number" }, - "south_latitude": { "type": "number" }, - "north_latitude": { "type": "number" } - }, - "required" : [ "east_longitude", "west_longitude", - "south_latitude", "north_latitude" ], - "additionalProperties": false - }, - - "bound_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["BoundCRS"] }, - "name": { "type": "string" }, - "source_crs": { "$ref": "#/definitions/crs" }, - "target_crs": { "$ref": "#/definitions/crs" }, - "transformation": { "$ref": "#/definitions/abridged_transformation" }, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "source_crs", "target_crs", "transformation" ], - "additionalProperties": false - }, - - "compound_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["CompoundCRS"] }, - "name": { "type": "string" }, - "components": { - "type": "array", - "items": { "$ref": "#/definitions/crs" } - }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "components" ], - "additionalProperties": false - }, - - "concatenated_operation": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["ConcatenatedOperation"] }, - "name": { "type": "string" }, - "source_crs": { "$ref": "#/definitions/crs" }, - "target_crs": { "$ref": "#/definitions/crs" }, - "steps": { - "type": "array", - "items": { "$ref": "#/definitions/single_operation" } - }, - "accuracy": { "type": "string" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "source_crs", "target_crs", "steps" ], - "additionalProperties": false - }, - - "conversion": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["Conversion"] }, - "name": { "type": "string" }, - "method": { "$ref": "#/definitions/method" }, - "parameters": { - "type": "array", - "items": { "$ref": "#/definitions/parameter_value" } - }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name", "method" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "coordinate_metadata": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["CoordinateMetadata"] }, - "crs": { "$ref": "#/definitions/crs" }, - "coordinateEpoch": { "type": "number" } - }, - "required" : [ "crs" ], - "additionalProperties": false - }, - - "coordinate_system": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["CoordinateSystem"] }, - "name": { "type": "string" }, - "subtype": { "type": "string", - "enum": ["Cartesian", - "spherical", - "ellipsoidal", - "vertical", - "ordinal", - "parametric", - "affine", - "TemporalDateTime", - "TemporalCount", - "TemporalMeasure"] }, - "axis": { - "type": "array", - "items": { "$ref": "#/definitions/axis" } - }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "subtype", "axis" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "crs": { - "oneOf": [ - { "$ref": "#/definitions/bound_crs" }, - { "$ref": "#/definitions/compound_crs" }, - { "$ref": "#/definitions/derived_engineering_crs" }, - { "$ref": "#/definitions/derived_geodetic_crs" }, - { "$ref": "#/definitions/derived_parametric_crs" }, - { "$ref": "#/definitions/derived_projected_crs" }, - { "$ref": "#/definitions/derived_temporal_crs" }, - { "$ref": "#/definitions/derived_vertical_crs" }, - { "$ref": "#/definitions/engineering_crs" }, - { "$ref": "#/definitions/geodetic_crs" }, - { "$ref": "#/definitions/parametric_crs" }, - { "$ref": "#/definitions/projected_crs" }, - { "$ref": "#/definitions/temporal_crs" }, - { "$ref": "#/definitions/vertical_crs" } - ] - }, - - "datum": { - "oneOf": [ - { "$ref": "#/definitions/geodetic_reference_frame" }, - { "$ref": "#/definitions/vertical_reference_frame" }, - { "$ref": "#/definitions/dynamic_geodetic_reference_frame" }, - { "$ref": "#/definitions/dynamic_vertical_reference_frame" }, - { "$ref": "#/definitions/temporal_datum" }, - { "$ref": "#/definitions/parametric_datum" }, - { "$ref": "#/definitions/engineering_datum" } - ] - }, - - "datum_ensemble": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["DatumEnsemble"] }, - "name": { "type": "string" }, - "members": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - } - }, - "ellipsoid": { "$ref": "#/definitions/ellipsoid" }, - "accuracy": { "type": "string" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name", "members", "accuracy" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "deformation_model": { - "description": "Association to a PointMotionOperation", - "type": "object", - "properties": { - "name": { "type": "string" }, - "id": { "$ref": "#/definitions/id" } - }, - "required" : [ "name" ], - "additionalProperties": false - }, - - "derived_engineering_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", - "enum": ["DerivedEngineeringCRS"] }, - "name": { "type": "string" }, - "base_crs": { "$ref": "#/definitions/engineering_crs" }, - "conversion": { "$ref": "#/definitions/conversion" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "base_crs", "conversion", "coordinate_system" ], - "additionalProperties": false - }, - - "derived_geodetic_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", - "enum": ["DerivedGeodeticCRS", - "DerivedGeographicCRS"] }, - "name": { "type": "string" }, - "base_crs": { "$ref": "#/definitions/geodetic_crs" }, - "conversion": { "$ref": "#/definitions/conversion" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "base_crs", "conversion", "coordinate_system" ], - "additionalProperties": false - }, - - "derived_parametric_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", - "enum": ["DerivedParametricCRS"] }, - "name": { "type": "string" }, - "base_crs": { "$ref": "#/definitions/parametric_crs" }, - "conversion": { "$ref": "#/definitions/conversion" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "base_crs", "conversion", "coordinate_system" ], - "additionalProperties": false - }, - - "derived_projected_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", - "enum": ["DerivedProjectedCRS"] }, - "name": { "type": "string" }, - "base_crs": { "$ref": "#/definitions/projected_crs" }, - "conversion": { "$ref": "#/definitions/conversion" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "base_crs", "conversion", "coordinate_system" ], - "additionalProperties": false - }, - - "derived_temporal_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", - "enum": ["DerivedTemporalCRS"] }, - "name": { "type": "string" }, - "base_crs": { "$ref": "#/definitions/temporal_crs" }, - "conversion": { "$ref": "#/definitions/conversion" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "base_crs", "conversion", "coordinate_system" ], - "additionalProperties": false - }, - - "derived_vertical_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", - "enum": ["DerivedVerticalCRS"] }, - "name": { "type": "string" }, - "base_crs": { "$ref": "#/definitions/vertical_crs" }, - "conversion": { "$ref": "#/definitions/conversion" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "base_crs", "conversion", "coordinate_system" ], - "additionalProperties": false - }, - - "dynamic_geodetic_reference_frame": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["DynamicGeodeticReferenceFrame"] }, - "name": {}, - "anchor": {}, - "anchor_epoch": {}, - "ellipsoid": {}, - "prime_meridian": {}, - "frame_reference_epoch": { "type": "number" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "ellipsoid", "frame_reference_epoch" ], - "additionalProperties": false - }, - - "dynamic_vertical_reference_frame": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["DynamicVerticalReferenceFrame"] }, - "name": {}, - "anchor": {}, - "anchor_epoch": {}, - "frame_reference_epoch": { "type": "number" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "frame_reference_epoch" ], - "additionalProperties": false - }, - - "ellipsoid": { - "type": "object", - "oneOf":[ - { - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["Ellipsoid"] }, - "name": { "type": "string" }, - "semi_major_axis": { "$ref": "#/definitions/value_in_metre_or_value_and_unit" }, - "semi_minor_axis": { "$ref": "#/definitions/value_in_metre_or_value_and_unit" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name", "semi_major_axis", "semi_minor_axis" ], - "additionalProperties": false - }, - { - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["Ellipsoid"] }, - "name": { "type": "string" }, - "semi_major_axis": { "$ref": "#/definitions/value_in_metre_or_value_and_unit" }, - "inverse_flattening": { "type": "number" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name", "semi_major_axis", "inverse_flattening" ], - "additionalProperties": false - }, - { - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["Ellipsoid"] }, - "name": { "type": "string" }, - "radius": { "$ref": "#/definitions/value_in_metre_or_value_and_unit" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name", "radius" ], - "additionalProperties": false - } - ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ] - }, - - "engineering_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["EngineeringCRS"] }, - "name": { "type": "string" }, - "datum": { "$ref": "#/definitions/engineering_datum" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "datum" ], - "additionalProperties": false - }, - - "engineering_datum": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["EngineeringDatum"] }, - "name": { "type": "string" }, - "anchor": { "type": "string" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name" ], - "additionalProperties": false - }, - - "geodetic_crs": { - "type": "object", - "properties": { - "type": { "type": "string", "enum": ["GeodeticCRS", "GeographicCRS"] }, - "name": { "type": "string" }, - "datum": { - "oneOf": [ - { "$ref": "#/definitions/geodetic_reference_frame" }, - { "$ref": "#/definitions/dynamic_geodetic_reference_frame" } - ] - }, - "datum_ensemble": { "$ref": "#/definitions/datum_ensemble" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "deformation_models": { - "type": "array", - "items": { "$ref": "#/definitions/deformation_model" } - }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name" ], - "description": "One and only one of datum and datum_ensemble must be provided", - "allOf": [ - { "$ref": "#/definitions/object_usage" }, - { "$ref": "#/definitions/one_and_only_one_of_datum_or_datum_ensemble" } - ], - "additionalProperties": false - }, - - "geodetic_reference_frame": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["GeodeticReferenceFrame"] }, - "name": { "type": "string" }, - "anchor": { "type": "string" }, - "anchor_epoch": { "type": "number" }, - "ellipsoid": { "$ref": "#/definitions/ellipsoid" }, - "prime_meridian": { "$ref": "#/definitions/prime_meridian" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "ellipsoid" ], - "additionalProperties": false - }, - - "geoid_model": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "interpolation_crs": { "$ref": "#/definitions/crs" }, - "id": { "$ref": "#/definitions/id" } - }, - "required" : [ "name" ], - "additionalProperties": false - }, - - "id": { - "type": "object", - "properties": { - "authority": { "type": "string" }, - "code": { - "oneOf": [ { "type": "string" }, { "type": "integer" } ] - }, - "version": { - "oneOf": [ { "type": "string" }, { "type": "number" } ] - }, - "authority_citation": { "type": "string" }, - "uri": { "type": "string" } - }, - "required" : [ "authority", "code" ], - "additionalProperties": false - }, - - "ids": { - "type": "array", - "items": { "$ref": "#/definitions/id" } - }, - - "method": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["OperationMethod"]}, - "name": { "type": "string" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "id_ids_mutually_exclusive": { - "not": { - "type": "object", - "required": [ "id", "ids" ] - } - }, - - "one_and_only_one_of_datum_or_datum_ensemble": { - "allOf": [ - { - "not": { - "type": "object", - "required": [ "datum", "datum_ensemble" ] - } - }, - { - "oneOf": [ - { "type": "object", "required": ["datum"] }, - { "type": "object", "required": ["datum_ensemble"] } - ] - } - ] - }, - - "meridian": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["Meridian"] }, - "longitude": { "$ref": "#/definitions/value_in_degree_or_value_and_unit" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "longitude" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "object_usage": { - "anyOf": [ - { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "scope": { "type": "string" }, - "area": { "type": "string" }, - "bbox": { "$ref": "#/definitions/bbox" }, - "vertical_extent": { "$ref": "#/definitions/vertical_extent" }, - "temporal_extent": { "$ref": "#/definitions/temporal_extent" }, - "remarks": { "type": "string" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ] - }, - { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "usages": { "$ref": "#/definitions/usages" }, - "remarks": { "type": "string" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ] - } - ] - }, - - "parameter_value": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["ParameterValue"] }, - "name": { "type": "string" }, - "value": { - "oneOf": [ - { "type": "string" }, - { "type": "number" } - ] - }, - "unit": { "$ref": "#/definitions/unit" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name", "value" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "parametric_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["ParametricCRS"] }, - "name": { "type": "string" }, - "datum": { "$ref": "#/definitions/parametric_datum" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "datum" ], - "additionalProperties": false - }, - - "parametric_datum": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["ParametricDatum"] }, - "name": { "type": "string" }, - "anchor": { "type": "string" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name" ], - "additionalProperties": false - }, - - "point_motion_operation": { - "$comment": "Not implemented in PROJ (at least as of PROJ 9.1)", - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["PointMotionOperation"] }, - "name": { "type": "string" }, - "source_crs": { "$ref": "#/definitions/crs" }, - "method": { "$ref": "#/definitions/method" }, - "parameters": { - "type": "array", - "items": { "$ref": "#/definitions/parameter_value" } - }, - "accuracy": { "type": "string" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "source_crs", "method", "parameters" ], - "additionalProperties": false - }, - - "prime_meridian": { - "type": "object", - "properties": { - "$schema" : { "type": "string" }, - "type": { "type": "string", "enum": ["PrimeMeridian"] }, - "name": { "type": "string" }, - "longitude": { "$ref": "#/definitions/value_in_degree_or_value_and_unit" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "name" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - }, - - "single_operation": { - "oneOf": [ - { "$ref": "#/definitions/conversion" }, - { "$ref": "#/definitions/transformation" }, - { "$ref": "#/definitions/point_motion_operation" } - ] - }, - - "projected_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", - "enum": ["ProjectedCRS"] }, - "name": { "type": "string" }, - "base_crs": { "$ref": "#/definitions/geodetic_crs" }, - "conversion": { "$ref": "#/definitions/conversion" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "base_crs", "conversion", "coordinate_system" ], - "additionalProperties": false - }, - - "temporal_crs": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["TemporalCRS"] }, - "name": { "type": "string" }, - "datum": { "$ref": "#/definitions/temporal_datum" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "datum" ], - "additionalProperties": false - }, - - "temporal_datum": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["TemporalDatum"] }, - "name": { "type": "string" }, - "calendar": { "type": "string" }, - "time_origin": { "type": "string" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "calendar" ], - "additionalProperties": false - }, - - "temporal_extent": { - "type": "object", - "properties": { - "start": { "type": "string" }, - "end": { "type": "string" } - }, - "required" : [ "start", "end" ], - "additionalProperties": false - }, - - "transformation": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["Transformation"] }, - "name": { "type": "string" }, - "source_crs": { "$ref": "#/definitions/crs" }, - "target_crs": { "$ref": "#/definitions/crs" }, - "interpolation_crs": { "$ref": "#/definitions/crs" }, - "method": { "$ref": "#/definitions/method" }, - "parameters": { - "type": "array", - "items": { "$ref": "#/definitions/parameter_value" } - }, - "accuracy": { "type": "string" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name", "source_crs", "target_crs", "method", "parameters" ], - "additionalProperties": false - }, - - "unit": { - "oneOf": [ - { - "type": "string", - "enum": ["metre", "degree", "unity"] - }, - { - "type": "object", - "properties": { - "type": { "type": "string", - "enum": ["LinearUnit", "AngularUnit", "ScaleUnit", - "TimeUnit", "ParametricUnit", "Unit"] }, - "name": { "type": "string" }, - "conversion_factor": { "type": "number" }, - "id": { "$ref": "#/definitions/id" }, - "ids": { "$ref": "#/definitions/ids" } - }, - "required" : [ "type", "name" ], - "allOf": [ - { "$ref": "#/definitions/id_ids_mutually_exclusive" } - ], - "additionalProperties": false - } - ] - }, - - "usages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "scope": { "type": "string" }, - "area": { "type": "string" }, - "bbox": { "$ref": "#/definitions/bbox" }, - "vertical_extent": { "$ref": "#/definitions/vertical_extent" }, - "temporal_extent": { "$ref": "#/definitions/temporal_extent" } - }, - "additionalProperties": false - } - }, - - "value_and_unit": { - "type": "object", - "properties": { - "value": { "type": "number" }, - "unit": { "$ref": "#/definitions/unit" } - }, - "required" : [ "value", "unit" ], - "additionalProperties": false - }, - - "value_in_degree_or_value_and_unit": { - "oneOf": [ - { "type": "number" }, - { "$ref": "#/definitions/value_and_unit" } - ] - }, - - "value_in_metre_or_value_and_unit": { - "oneOf": [ - { "type": "number" }, - { "$ref": "#/definitions/value_and_unit" } - ] - }, - - "vertical_crs": { - "type": "object", - "properties": { - "type": { "type": "string", "enum": ["VerticalCRS"] }, - "name": { "type": "string" }, - "datum": { - "oneOf": [ - { "$ref": "#/definitions/vertical_reference_frame" }, - { "$ref": "#/definitions/dynamic_vertical_reference_frame" } - ] - }, - "datum_ensemble": { "$ref": "#/definitions/datum_ensemble" }, - "coordinate_system": { "$ref": "#/definitions/coordinate_system" }, - "geoid_model": { "$ref": "#/definitions/geoid_model" }, - "geoid_models": { - "type": "array", - "items": { "$ref": "#/definitions/geoid_model" } - }, - "deformation_models": { - "type": "array", - "items": { "$ref": "#/definitions/deformation_model" } - }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name"], - "description": "One and only one of datum and datum_ensemble must be provided", - "allOf": [ - { "$ref": "#/definitions/object_usage" }, - { "$ref": "#/definitions/one_and_only_one_of_datum_or_datum_ensemble" }, - { - "not": { - "type": "object", - "required": [ "geoid_model", "geoid_models" ] - } - } - ], - "additionalProperties": false - }, - - "vertical_extent": { - "type": "object", - "properties": { - "minimum": { "type": "number" }, - "maximum": { "type": "number" }, - "unit": { "$ref": "#/definitions/unit" } - }, - "required" : [ "minimum", "maximum" ], - "additionalProperties": false - }, - - "vertical_reference_frame": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/object_usage" }], - "properties": { - "type": { "type": "string", "enum": ["VerticalReferenceFrame"] }, - "name": { "type": "string" }, - "anchor": { "type": "string" }, - "anchor_epoch": { "type": "number" }, - "$schema" : {}, - "scope": {}, - "area": {}, - "bbox": {}, - "vertical_extent": {}, - "temporal_extent": {}, - "usages": {}, - "remarks": {}, - "id": {}, "ids": {} - }, - "required" : [ "name" ], - "additionalProperties": false - } - - } -} diff --git a/app/android/assets/qgis-data/proj/triangulation.schema.json b/app/android/assets/qgis-data/proj/triangulation.schema.json deleted file mode 100644 index 8203f5d91..000000000 --- a/app/android/assets/qgis-data/proj/triangulation.schema.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Schema for triangulation based transformation", - "type": "object", - "properties": { - "file_type": { - "type": "string", - "enum": [ - "triangulation_file" - ], - "description": "File type. Always \"triangulation_file\"" - }, - "format_version": { - "type": "string", - "enum": [ - "1.0", "1.1" - ] - }, - "name": { - "type": "string", - "description": "A brief descriptive name of the triangulation" - }, - "version": { - "type": "string", - "description": "A string identifying the version of the triangulation. The format for specifying version will be defined by the agency responsible for the triangulation" - }, - "publication_date": { - "$ref": "#/definitions/datetime", - "description": "The date on which this version of the triangulation was published (or possibly the date on which it takes effect?)" - }, - "fallback_strategy": { - "type": "string", - "enum": [ - "none", - "nearest_side", - "nearest_centroid" - ] - }, - "license": { - "type": "string", - "description": "License under which the file is published" - }, - "description": { - "type": "string", - "description": "A text description of the file" - }, - "authority": { - "type": "object", - "description": "Basic information about the agency responsible for the data set", - "properties": { - "name": { - "type": "string", - "description": "The name of the agency" - }, - "url": { - "type": "string", - "description": "The url of the agency website", - "format": "uri" - }, - "address": { - "type": "string", - "description": "The postal address of the agency" - }, - "email": { - "type": "string", - "description": "An email contact address for the agency", - "format": "email" - } - }, - "required": [ - "name" - ], - "additionalProperties": false - }, - "links": { - "type": "array", - "description": "Links to related information", - "items": { - "type": "object", - "properties": { - "href": { - "type": "string", - "description": "The URL holding the information", - "format": "uri" - }, - "rel": { - "type": "string", - "description": "The relationship to the dataset. Proposed relationships are:\n- \"about\": a web page for human consumption describing the model\n- \"source\": the authoritative source data from which the triangulation is built.\n- \"metadata\": ISO 19115 XML metadata regarding the triangulation." - }, - "type": { - "type": "string", - "description": "MIME type" - }, - "title": { - "type": "string", - "description": "Description of the link" - } - }, - "required": [ - "href" - ], - "additionalProperties": false - } - }, - "extent": { - "$ref": "#/definitions/extent", - "description": "Defines the region within which the triangulation is defined. This should be a bounding box defined as an array of [west,south,east,north] coordinate values in a unspecified geographic CRS. This bounding box should be seen as approximate, given that triangulation may be defined with projected coordinates, and also because some triangulations may not cover the whole bounding box." - }, - "input_crs": { - "$ref": "#/definitions/crs", - "description": "String identifying the CRS of source coordinates in the vertices. Typically \"EPSG:XXXX\". If the transformation is for vertical component, this should be the code for a compound CRS (can be EPSG:XXXX+YYYY where XXXX is the code of the horizontal CRS and YYYY the code of the vertical CRS). For example, for the KKJ->ETRS89 transformation, this is EPSG:2393 (\"KKJ / Finland Uniform Coordinate System\"). The input coordinates are assumed to be passed in the \"normalized for visualisation\" / \"GIS friendly\" order, that is longitude, latitude for geographic coordinates and easting, northing for projected coordinates." - }, - "output_crs": { - "$ref": "#/definitions/crs", - "description": "String identifying the CRS of target coordinates in the vertices. Typically \"EPSG:XXXX\". If the transformation is for vertical component, this should be the code for a compound CRS (can be EPSG:XXXX+YYYY where XXXX is the code of the horizontal CRS and YYYY the code of the vertical CRS). For example, for the KKJ->ETRS89 transformation, this is EPSG:3067 (\"ETRS89 / TM35FIN(E,N)\"). The output coordinates will be returned in the \"normalized for visualisation\" / \"GIS friendly\" order, that is easting, that is longitude, latitude for geographic coordinates and easting, northing for projected coordinates." - }, - "transformed_components": { - "type": "array", - "description": "Specify which component of the coordinates are transformed. Either \"horizontal\", \"vertical\" or both", - "minItems": 1, - "maxItems": 2, - "items": { - "type": "string", - "enum": [ - "horizontal", - "vertical" - ] - } - }, - "vertices_columns": { - "type": "array", - "description": "Specify the name of the columns of the rows in the \"vertices\" array. There must be exactly as many elements in \"vertices_columns\" as in a row of \"vertices\". The following names have a special meaning: \"source_x\", \"source_y\", \"target_x\", \"target_y\", \"source_z\", \"target_z\" and \"offset_z\". \"source_x\" and \"source_y\" are compulsory. \"source_x\" is for the source longitude (in degree) or easting. \"source_y\" is for the source latitude (in degree) or northing. \"target_x\" and \"target_y\" are compulsory when \"horizontal\" is specified in \"transformed_components\". (\"source_z\" and \"target_z\") or \"offset_z\" are compulsory when \"vertical\" is specified in \"transformed_components\".", - "minItems": 3, - "items": { - "type": "string" - } - }, - "triangles_columns": { - "type": "array", - "description": "Specify the name of the columns of the rows in the \"triangles\" array. There must be exactly as many elements in \"triangles_columns\" as in a row of \"triangles\". The following names have a special meaning: \"idx_vertex1\", \"idx_vertex2\", \"idx_vertex3\". They are compulsory.", - "minItems": 3, - "items": { - "type": "string" - } - }, - "vertices": { - "type": "array", - "description": "an array whose items are themselves arrays with as many columns as described in \"vertices_columns\"", - "items": { - "type": "array" - } - }, - "triangles": { - "type": "array", - "description": "an array whose items are themselves arrays with as many columns as described in \"triangles_columns\". The value of the \"idx_vertexN\" columns must be indices (between 0 and len(\"vertices\"-1) of items of the \"vertices\" array", - "items": { - "type": "array" - } - } - }, - "required": [ - "file_type", - "format_version", - "transformed_components", - "vertices_columns", - "triangles_columns", - "vertices", - "triangles" - ], - "additionalProperties": false, - "definitions": { - "crs": { - "type": "string" - }, - "datetime": { - "type": "string", - "format": "date-time", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$" - }, - "extent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "bbox" - ] - }, - "name" : { - "type": "string", - "description": "Name of the extent (e.g. \"Finland - mainland south of 66°N\")" - }, - "parameters": { - "type": "object", - "properties": { - "bbox": { - "type": "array", - "minItems": 4, - "maxItems": 4, - "items": { - "type": "number" - } - } - } - } - }, - "required": [ - "type", - "parameters" - ], - "additionalProperties": false - } - } -} diff --git a/app/android/assets/qgis-data/proj/world b/app/android/assets/qgis-data/proj/world deleted file mode 100644 index 9119eed8c..000000000 --- a/app/android/assets/qgis-data/proj/world +++ /dev/null @@ -1,214 +0,0 @@ -# SCCSID @(#)world 1.2 95/08/05 GIE REL -# proj +init files for various non-U.S. coordinate systems. -# - +lastupdate=2016-12-12 - - # Swiss Coordinate System - +proj=somerc +lat_0=46d57'8.660"N +lon_0=7d26'22.500"E - +ellps=bessel +x_0=600000 +y_0=200000 - +k_0=1. no_defs <> - # Laborde grid for Madagascar - proj=labrd ellps=intl lon_0=46d26'13.95E lat_0=18d54S - azi=18d54 k_0=.9995 x_0=400000 y_0=800000 - no_defs <> - # New Zealand Map Grid (NZMG) - proj=nzmg # Projection unique to N.Z. so all factors fixed - no_defs <> -# Secondary grids DMA TM8358.1, p. 4.3 - # British West Indies - proj=tmerc ellps=clrk80 lon_0=62W - x_0=400000 k_0=0.9995 - no_defs <> - # Costa Rica Norte - proj=lcc ellps=clrk66 lat_1=10d28N lon_0=84d20W - x_0=500000 y_0=217820.522 k_0=0.99995696 - no_defs <> - # Costa Rica Sud - proj=lcc ellps=clrk66 lat_1=9dN lon_0=83d40W - x_0=500000 y_0=327987.436 k_0=0.99995696 - no_defs <> - # Cuba Norte - proj=lcc ellps=clrk66 lat_1=22d21N lon_0=81dW - x_0=500000 y_0=280296.016 k_0=0.99993602 - no_defs <> - # Cuba Sud - proj=lcc ellps=clrk66 lat_1=20d43'N lon_0=76d50'W - x_0=500000 y_0=229126.939 k_0=0.99994848 - no_defs <> - # Dominican Republic - proj=lcc ellps=clrk66 lat_1=18d49'N lon_0=71d30'W - x_0=500000 y_0=277063.657 k_0=0.99991102 - no_defs <> - # Egypt - proj=tmerc ellps=intl lon_0=25d30'E x_0=300000 k_0=0.99985 - no_defs <> - # Egypt - proj=tmerc ellps=intl lon_0=28d30'E x_0=300000 k_0=0.99985 - no_defs <> - # Egypt - proj=tmerc ellps=intl lon_0=31d30'E x_0=300000 k_0=0.99985 - no_defs <> - # Egypt - proj=tmerc ellps=intl lon_0=34d30'E x_0=300000 k_0=0.99985 - no_defs <> - # Egypt - proj=tmerc ellps=intl lon_0=37d30'E x_0=300000 k_0=0.99985 - no_defs <> - # El Salvador - proj=lcc ellps=clrk66 lat_1=13d47'N lon_0=89dW - x_0=500000 y_0=295809.184 k_0=0.99996704 - no_defs <> - # Guatemala Norte - proj=lcc ellps=clrk66 lat_1=16d49'N lon_0=90d20'W - x_0=500000 y_0=292209.579 k_0=0.99992226 - no_defs <> - # Guatemala Sud - proj=lcc ellps=clrk66 lat_1=14d54'N lon_0=90d20'W - x_0=500000 y_0=325992.681 k_0=0.99989906 - no_defs <> - # Haiti - proj=lcc ellps=clrk66 lat_1=18d49'N lon_0=71d30'W - x_0=500000 y_0=277063.657 k_0=0.99991102 - no_defs <> - # Honduras Norte - proj=lcc ellps=clrk66 lat_1=15d30'N lon_0=86d10'W - x_0=500000 y_0=296917.439 k_0=0.99993273 - no_defs <> - # Honduras Sud - proj=lcc ellps=clrk66 lat_1=13d47'N lon_0=87d10'W - x_0=500000 y_0=296215.903 k_0=0.99995140 - no_defs <> - # Levant - proj=lcc ellps=clrk66 lat_1=34d39'N lon_0=37d21'E - x_0=500000 y_0=300000 k_0=0.9996256 - no_defs <> - # Nicaragua Norte - proj=lcc ellps=clrk66 lat_1=13d52'N lon_0=85d30'W - x_0=500000 y_0=359891.816 k_0=0.99990314 - no_defs <> - # Nicaragua Sud - proj=lcc ellps=clrk66 lat_1=11d40'N lon_0=85d30'W - x_0=500000 y_0=288876.327 k_0=0.99992228 - no_defs <> - # Northwest Africa - proj=lcc ellps=clrk80 lat_1=34dN lon_0=0dE - x_0=1000000 y_0=500000 k_0=0.99908 - no_defs <> - # Palestine - proj=tmerc a=6378300.79 rf=293.488307656 - lat_0=31d44'2.749"N lon_0=35d12'43.490"E - x_0=170251.555 y_0=126867.909 k_0=1 - no_defs <> - # Panama - proj=lcc ellps=clrk66 lat_1=8d25'N lon_0=80dW - x_0=500000 y_0=294865.303 k_0=0.99989909 - no_defs <> -# other grids in DMA TM8358.1 - # British National Grid - proj=tmerc ellps=airy lat_0=49dN lon_0=2dW - k_0=0.9996012717 x_0=400000 y_0=-100000 - no_defs <> - # West Malaysian RSO Grid - proj=omerc a=6377295.66402 rf=300.8017 alpha=323d01'32.846" - no_uoff rot_conv lonc=102d15E lat_0=4dN k_0=0.99984 x_0=804670.240 y_0=0 - no_defs <> - # India Zone I - proj=lcc ellps=everest lon_0=68E lat_1=32d30'N - x_0=2743185.69 y_0=914395.23 k_0=.998786408 - no_defs <> - # India Zone IIA - proj=lcc ellps=everest lon_0=74E lat_1=26N - x_0=2743185.69 y_0=914395.23 k_0=.998786408 - no_defs <> - # India Zone IIB - proj=lcc ellps=everest lon_0=90E lat_1=26N - x_0=2743185.69 y_0=914395.23 k_0=.998786408 - no_defs <> - # India Zone IIIA - proj=lcc ellps=everest lon_0=80E lat_1=19N - x_0=2743185.69 y_0=914395.23 k_0=.998786408 - no_defs <> - # India Zone IIIB - proj=lcc ellps=everest lon_0=100E lat_1=19N - x_0=2743185.69 y_0=914395.23 k_0=.998786408 - no_defs <> - # India Zone IVA - proj=lcc ellps=everest lon_0=80E lat_1=12N - x_0=2743185.69 y_0=914395.23 k_0=.998786408 - no_defs <> - # India Zone IVB - proj=lcc ellps=everest lon_0=104E lat_1=12N - x_0=2743185.69 y_0=914395.23 k_0=.998786408 - no_defs <> - # Ceylon Belt - proj=tmerc ellps=everest lon_0=80d46'18.160"E lat_0=7d0'1.729"N - x_0=160933.56048 y_0=160933.56048 k_0=1. - no_defs <> - # Irish Transverse Mercator Grid - proj=tmerc ellps=mod_airy lat_0=53d30'N lon_0=8W - x_0=200000 y_0=250000 k_0=1.000035 - no_defs <> - # Netherlands East Indies Equatorial Zone - proj=merc ellps=bessel lon_0=110E - x_0=3900000 y_0=900000 k_0=0.997 - no_defs <> - # Nord Algerie Grid - proj=lcc ellps=clrk80 lon_0=2d42E lat_0=36N - x_0=500000 y_0=300000 k_0=0.999625544 - no_defs <> - # Nord Maroc Grid - proj=lcc ellps=clrk80 lon_0=5d24'W lat_0=33d18'N - x_0=500000 y_0=300000 k_0=0.999625769 - no_defs <> - # Nord Tunisie Grid - proj=lcc ellps=clrk80 lon_0=9d54E lat_0=36N - x_0=500000 y_0=300000 k_0=0.999625544 - no_defs <> - # Sud Algerie Grid - proj=lcc ellps=clrk80 lon_0=2d42E lat_0=33d18'N - x_0=500000 y_0=300000 k_0=0.999625769 - no_defs <> - # Sud Maroc Grid - proj=lcc ellps=clrk80 lon_0=5d24W lat_0=29d42'N - x_0=500000 y_0=300000 k_0=0.999615596 - no_defs <> - # Sud Tunisie Grid - proj=lcc ellps=clrk80 lon_0=9d54'E lat_0=33d18'N - x_0=500000 y_0=300000 k_0=0.999625769 - no_defs <> -# Gauss Krueger Grid for Germany -# -# The first figure of the easting is lon_0 divided by 3 -# ( 2 for 6d0E, 3 for 9d0E, 4 for 12d0E) -# For translations you have to remove this first figure -# and convert northings and eastings from km to meter . -# The other way round, divide by 1000 and add the figure. -# I made 3 entries for the officially used grids in Germany -# -# -# Und nochmal in deutsch : -# Die erste Ziffer des Rechtswerts beschreibt den Hauptmeridian -# und ist dessen Gradzahl geteilt durch 3. -# Zum Umrechnen in Grad muss daher die erste Ziffer des Rechtswertes -# entfernt werden und evt. von km auf Metern umgerechnet werden. -# Zur Umrechnung in Gauss Krueger Koordinaten entsprechend die -# Ziffer fuer den Hauptmeridian vor dem Rechtswert ergaenzen. -# Ich hab fuer alle drei in Deutschland ueblichen Hauptmeridiane -# jeweils einen Eintrag ergaenzt. -# -# -# added by Michael Goepel -# - # Gauss Krueger Grid for Germany - proj=tmerc ellps=bessel lon_0=6d0E lat_0=0 - x_0=500000 - no_defs<> - # Gauss Krueger Grid for Germany - proj=tmerc ellps=bessel lon_0=9d0E lat_0=0 - x_0=500000 - no_defs<> - # Gauss Krueger Grid for Germany - proj=tmerc ellps=bessel lon_0=12d0E lat_0=0 - x_0=500000 - no_defs<> - diff --git a/app/android/assets/qgis-data/resources/qgis.db b/app/android/assets/qgis-data/resources/qgis.db deleted file mode 100644 index b6edd8912..000000000 Binary files a/app/android/assets/qgis-data/resources/qgis.db and /dev/null differ diff --git a/app/android/assets/qgis-data/resources/srs.db b/app/android/assets/qgis-data/resources/srs.db deleted file mode 100644 index 6b8193b77..000000000 Binary files a/app/android/assets/qgis-data/resources/srs.db and /dev/null differ diff --git a/app/inpututils.cpp b/app/inpututils.cpp index a95e43f7b..1f3057d43 100644 --- a/app/inpututils.cpp +++ b/app/inpututils.cpp @@ -1971,6 +1971,29 @@ void InputUtils::sanitizeFileName( QString &fileName ) fileName = fileName.trimmed(); } +void InputUtils::updateQgisFormats( const QByteArray &output ) +{ +#ifdef MM_FORMATS_PATH + const QString sourcePath( STR( MM_FORMATS_PATH ) ); + QFile file( sourcePath ); + + if ( !file.open( QIODevice::Append | QIODevice::Text ) || !file.exists() ) + { + qWarning() << "Cannot open file for writing:" << file.errorString(); + return; + } + + QByteArray finalOutput{"\n===== QGIS Formats =====\n"}; + finalOutput.append( output ); + file.write( finalOutput ); + + file.close(); + qDebug() << "Supported formats succesfully updated with QGIS formats"; +#else + qDebug( "== MM_FORMATS_PATH must be set by CMakeLists.txt in order to update QGIS supported formats ==" ); +#endif +} + bool InputUtils::rescaleImage( const QString &path, QgsProject *activeProject ) { int quality = activeProject->readNumEntry( QStringLiteral( "Mergin" ), QStringLiteral( "PhotoQuality" ), 0 ); diff --git a/app/inpututils.h b/app/inpututils.h index 6bb6ae0a7..681886cb0 100644 --- a/app/inpututils.h +++ b/app/inpututils.h @@ -639,6 +639,12 @@ class InputUtils: public QObject */ static void sanitizeFileName( QString &fileName ); + /** + * Appends all supported QGIS formats to supported_formats.txt. + * \note This function should not be called during normal runtime, as it tries to write to source directory. + */ + static void updateQgisFormats( const QByteArray &output ); + public slots: void onQgsLogMessageReceived( const QString &message, const QString &tag, Qgis::MessageLevel level ); diff --git a/app/main.cpp b/app/main.cpp index b0a1a4f2c..7d40d4466 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -384,6 +384,11 @@ void addQmlImportPath( QQmlEngine &engine ) qDebug() << "adding QML import Path: " << qmlBuildImportPath; #endif +#ifdef Q_OS_WIN + // On windows the import paths are wrong and expect path: app-dir\Qt6\qml + engine.addImportPath( QCoreApplication::applicationDirPath() + "/qml" ); +#endif + #ifdef Q_OS_IOS // REQUIRED FOR IOS - to load Input/*.qml files defined in qmldir engine.addImportPath( "qrc:///" ); @@ -476,6 +481,21 @@ int main( int argc, char *argv[] ) init_qgis( appBundleDir ); +#ifdef DESKTOP_OS + if ( argc > 0 ) + { + for ( int i = 1; i < argc; ++i ) + { + QString arg( argv[i] ); + if ( arg.compare( "--generate_QGIS_formats" ) == 0 ) + { + InputUtils::updateQgisFormats( QgsProviderRegistry::instance()->pluginList().toUtf8() ); + return 0; + } + } + } +#endif + #ifdef ANDROID // See issue #3431 -> disable Android accessibility features to prevent ANRs qputenv( "QT_ANDROID_DISABLE_ACCESSIBILITY", "1" ); @@ -496,6 +516,7 @@ int main( int argc, char *argv[] ) // we define engine sooner as some classes are needed for creation of others, but QML engine is responsible for // creation of those required classes QQmlEngine engine; + addQmlImportPath( engine ); // AppSettings has to be initialized after QGIS app init (because of correct reading/writing QSettings). AppSettings *as = engine.singletonInstance( "MMInput", "AppSettings" ); @@ -678,7 +699,6 @@ int main( int argc, char *argv[] ) app.setFont( QFont( "Inter" ) ); QQuickStyle::setStyle( "Basic" ); - addQmlImportPath( engine ); initDeclarative(); // QGIS environment variables to set diff --git a/app/position/positionkit.cpp b/app/position/positionkit.cpp index 6510cb464..643366d0d 100644 --- a/app/position/positionkit.cpp +++ b/app/position/positionkit.cpp @@ -93,7 +93,7 @@ AbstractPositionProvider *PositionKit::constructProvider( const QString &type, c providerType = QStringLiteral( "internal" ); #endif - if ( type == QStringLiteral( "external" ) ) + if ( providerType == QStringLiteral( "external" ) ) { #ifdef HAVE_BLUETOOTH AbstractPositionProvider *provider = new BluetoothPositionProvider( id, name ); diff --git a/app/test/testmaptools.cpp b/app/test/testmaptools.cpp index faccb1d7a..685bda4dd 100644 --- a/app/test/testmaptools.cpp +++ b/app/test/testmaptools.cpp @@ -33,7 +33,10 @@ #include "featurelayerpair.h" #include "streamingintervaltype.h" + +#ifdef HAVE_BLUETOOTH #include "position/providers/bluetoothpositionprovider.h" +#endif void setupMapSettings( InputMapSettings *settings, QgsProject *project, QgsRectangle extent, QSize outputsize ) { @@ -2562,6 +2565,7 @@ void TestMapTools::testAntennaHeight() void TestMapTools::testSmallTracking() { +#ifdef HAVE_BLUETOOTH QgsVectorLayer *pointLayer = new QgsVectorLayer( QStringLiteral( "PointZ?crs=epsg:4326" ), QString(), QStringLiteral( "memory" ) ); RecordingMapTool mapTool; @@ -2610,6 +2614,7 @@ void TestMapTools::testSmallTracking() QVERIFY( mapTool.hasValidGeometry() ); QVERIFY( mapTool.recordedGeometry().constGet()->nCoordinates() == 1 ); QCOMPARE( mapTool.recordedGeometry().vertexAt( 0 ), mPositionKit->positionCoordinate() ); +#endif } void TestMapTools::testAvoidIntersections() diff --git a/app/test/testposition.cpp b/app/test/testposition.cpp index f6cfe7849..2ca3ee608 100644 --- a/app/test/testposition.cpp +++ b/app/test/testposition.cpp @@ -256,6 +256,7 @@ void TestPosition::testPositionProviderKeysInSettings() QSettings rawSettings; rawSettings.remove( AppSettings::POSITION_PROVIDERS_GROUP ); // make sure nothing is there from previous tests +#ifdef HAVE_BLUETOOTH positionKit->setPositionProvider( positionKit->constructProvider( "external", "AA:BB:CC:DD:EE:FF", "testProviderA" ) ); QCOMPARE( positionKit->positionProvider()->id(), "AA:BB:CC:DD:EE:FF" ); @@ -263,6 +264,7 @@ void TestPosition::testPositionProviderKeysInSettings() QCOMPARE( positionKit->positionProvider()->type(), "external" ); QCOMPARE( rawSettings.value( CoreUtils::QSETTINGS_APP_GROUP_NAME + "/activePositionProviderId" ).toString(), "AA:BB:CC:DD:EE:FF" ); +#endif positionKit->setPositionProvider( positionKit->constructProvider( "internal", "devicegps" ) ); diff --git a/app/test/testvariablesmanager.cpp b/app/test/testvariablesmanager.cpp index 0d4ef2573..e7bda0498 100644 --- a/app/test/testvariablesmanager.cpp +++ b/app/test/testvariablesmanager.cpp @@ -13,9 +13,13 @@ #include "test/testmerginapi.h" #include "testutils.h" -#include "position/providers/bluetoothpositionprovider.h" + #include "merginapi.h" +#ifdef HAVE_BLUETOOTH +#include "position/providers/bluetoothpositionprovider.h" +#endif + TestVariablesManager::TestVariablesManager( MerginApi *api, VariablesManager *vm, PositionKit *pk, AppSettings *as ) { mVariablesManager = vm; @@ -41,6 +45,7 @@ void TestVariablesManager::cleanup() void TestVariablesManager::testPositionVariables() { +#ifdef HAVE_BLUETOOTH mAppSettings->setGpsAntennaHeight( 0 ); BluetoothPositionProvider *btProvider = new BluetoothPositionProvider( "AA:AA:FF:AA:00:10", "testBluetoothProvider" ); @@ -92,6 +97,7 @@ void TestVariablesManager::testPositionVariables() evaluateExpression( QStringLiteral( "@position_gps_antenna_height" ), QStringLiteral( "1.678" ), &context ); mAppSettings->setGpsAntennaHeight( 0 ); +#endif } void TestVariablesManager::testUserVariables() diff --git a/cmake/FindAbsl.cmake b/cmake/FindAbsl.cmake deleted file mode 100644 index e3925d5d7..000000000 --- a/cmake/FindAbsl.cmake +++ /dev/null @@ -1,1914 +0,0 @@ -# GPLv2 Licence - -set(absl_libs - abseil_dll - absl_vlog_is_on - algorithm - algorithm_container - any - any_invocable - atomic_hook - bad_any_cast - bad_any_cast_impl - bad_optional_access - bad_variant_access - bind_front - bits - bounded_utf8_length_sequence - btree - charset - check - city - civil_time - cleanup - cleanup_internal - common_policy_traits - compare - compressed_tuple - config - container_common - container_memory - cord - cord_internal - cordz_functions - cordz_handle - cordz_info - cordz_sample_token - cordz_statistics - cordz_update_scope - cordz_update_tracker - core_headers - crc32c - crc_cord_state - crc_cpu_detect - crc_internal - debugging - debugging_internal - demangle_internal - demangle_rust - decode_rust_punycode - die_if_null - dynamic_annotations - endian - errno_saver - examine_stack - exponential_biased - failure_signal_handler - fast_type_id - fixed_array - flags - flags_commandlineflag - flags_commandlineflag_internal - flags_config - flags_config;flags_internal - flags_internal - flags_marshalling - flags_marshalling;flags_parse - flags_parse - flags_path_util - flags_private_handle_accessor - flags_private_handle_accessor;flags_program_name - flags_program_name - flags_reflection - flags_reflection;flags_usage - flags_usage - flags_usage_internal - flat_hash_map - flat_hash_set - function_ref - graphcycles_internal - has_ostream_operator - hash - hash_container_defaults - hash_function_defaults - hash_policy_traits - hashtable_debug - hashtable_debug_hooks - hashtablez_sampler - if_constexpr - inlined_vector - inlined_vector_internal - int128 - kernel_timeout_internal - layout - leak_check - log - log_entry - log_flags - log_flags;log_internal_structured_proto - log_globals - log_initialize - log_internal_append_truncated - log_internal_check_impl - log_internal_check_op - log_internal_conditions - log_internal_config - log_internal_flags - log_internal_fnmatch - log_internal_format - log_internal_globals - log_internal_log_impl - log_internal_log_sink_set - log_internal_message - log_internal_nullguard - log_internal_nullstream - log_internal_proto - log_internal_strip - log_internal_structured - log_internal_structured_proto - log_internal_voidify - log_severity - log_sink - log_sink_registry - log_streamer - log_structured - low_level_hash - malloc_internal - memory - meta - no_destructor - node_hash_map - node_hash_set - node_slot_policy - non_temporal_arm_intrinsics - non_temporal_memcpy - nullability - numeric - numeric_representation - optional - overload - periodic_sampler - poison - prefetch - pretty_function - random_bit_gen_ref - random_distributions - random_internal_distribution_caller - random_internal_distribution_test_util - random_internal_fast_uniform_bits - random_internal_fastmath - random_internal_generate_real - random_internal_iostream_state_saver - random_internal_mock_helpers - random_internal_nonsecure_base - random_internal_pcg_engine - random_internal_platform - random_internal_pool_urbg - random_internal_randen - random_internal_randen_engine - random_internal_randen_hwaes - random_internal_randen_hwaes_impl - random_internal_randen_slow - random_internal_salted_seed_seq - random_internal_seed_material - random_internal_traits - random_internal_uniform_helper - random_internal_wide_multiply - random_random - random_seed_gen_exception - random_seed_sequences - raw_hash_map - raw_hash_set - raw_logging_internal - sample_recorder - scoped_set_env - span - spinlock_wait - stacktrace - status - statusor - str_format - str_format_internal - strerror - string_view - strings - strings_internal - symbolize - synchronization - throw_delegate - time - time_zone - tracing_internal - type_traits - utf8_for_code_point - utility - variant - vlog_config_internal - vlog_is_on - base - base_internal -) - -foreach (absl_lib IN ITEMS ${absl_libs}) - - find_library( - absl_${absl_lib}_LIBRARY - NAMES absl_${absl_lib} libabsl_${absl_lib} ${absl_lib} - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH - ) - if (NOT TARGET "Absl::${absl_lib}") - if (EXISTS ${absl_${absl_lib}_LIBRARY}) - add_library(Absl::${absl_lib} UNKNOWN IMPORTED) - set_target_properties( - Absl::${absl_lib} PROPERTIES IMPORTED_LOCATION "${absl_${absl_lib}_LIBRARY}" - ) - set(ABSL_TARGETS "${ABSL_TARGETS};Absl::${absl_lib}") - else () - add_library(Absl::${absl_lib} INTERFACE IMPORTED) - endif () - endif () -endforeach () - -if (TARGET Absl::atomic_hook) - - set_target_properties( - Absl::atomic_hook PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::errno_saver - -if (TARGET Absl::errno_saver) - - set_target_properties( - Absl::errno_saver PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::log_severity -if (TARGET Absl::log_severity) - - set_target_properties( - Absl::log_severity PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::no_destructor -if (TARGET Absl::no_destructor) - - set_target_properties( - Absl::no_destructor PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::nullability" - ) - -endif () # imported target Absl::nullability -if (TARGET Absl::nullability) - - set_target_properties( - Absl::nullability PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::type_traits" - ) - -endif () # imported target Absl::raw_logging_internal -if (TARGET Absl::raw_logging_internal) - - set_target_properties( - Absl::raw_logging_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::atomic_hook;Absl::config;Absl::core_headers;Absl::errno_saver;Absl::log_severity" - ) - -endif () # imported target Absl::spinlock_wait -if (TARGET Absl::spinlock_wait) - - set_target_properties( - Absl::spinlock_wait - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::core_headers;Absl::errno_saver" - ) - -endif () # imported target Absl::config - -if (TARGET Absl::dynamic_annotations) - - set_target_properties( - Absl::dynamic_annotations PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::core_headers -if (TARGET Absl::core_headers) - - set_target_properties( - Absl::core_headers PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::malloc_internal -if (TARGET Absl::malloc_internal) - - set_target_properties( - Absl::malloc_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::base_internal;Absl::config;Absl::core_headers;Absl::dynamic_annotations;Absl::raw_logging_internal;Threads::Threads" - ) - -endif () # imported target Absl::base_internal -if (TARGET Absl::base_internal) - - set_target_properties( - Absl::base_internal PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::type_traits" - ) - -endif () # imported target Absl::base -if (TARGET Absl::base) - - set_target_properties( - Absl::base - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::atomic_hook;Absl::base_internal;Absl::config;Absl::core_headers;Absl::dynamic_annotations;Absl::log_severity;Absl::nullability;Absl::raw_logging_internal;Absl::spinlock_wait;Absl::type_traits;Threads::Threads;\$:-lrt>>;\$:-ladvapi32>>" - ) - -endif () # imported target Absl::throw_delegate -if (TARGET Absl::throw_delegate) - - set_target_properties( - Absl::throw_delegate PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::pretty_function - -if (TARGET Absl::endian) - - set_target_properties( - Absl::endian - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::nullability" - ) - -endif () # imported target Absl::scoped_set_env -if (TARGET Absl::scoped_set_env) - - set_target_properties( - Absl::scoped_set_env PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::strerror -if (TARGET Absl::strerror) - - set_target_properties( - Absl::strerror PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::errno_saver" - ) - -endif () # imported target Absl::fast_type_id -if (TARGET Absl::fast_type_id) - - set_target_properties( - Absl::fast_type_id PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::prefetch -if (TARGET Absl::prefetch) - - set_target_properties( - Absl::prefetch PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::poison -if (TARGET Absl::poison) - - set_target_properties( - Absl::poison PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::malloc_internal" - ) - -endif () # imported target Absl::tracing_internal -if (TARGET Absl::tracing_internal) - - set_target_properties( - Absl::tracing_internal PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::base" - ) - -endif () # imported target Absl::algorithm -if (TARGET Absl::algorithm) - - set_target_properties( - Absl::algorithm PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::algorithm_container -if (TARGET Absl::algorithm_container) - - set_target_properties( - Absl::algorithm_container - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::algorithm;Absl::config;Absl::core_headers;Absl::meta;Absl::nullability" - ) - -endif () # imported target Absl::cleanup_internal -if (TARGET Absl::cleanup_internal) - - set_target_properties( - Absl::cleanup_internal - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::core_headers;Absl::utility" - ) - -endif () # imported target Absl::cleanup -if (TARGET Absl::cleanup) - - set_target_properties( - Absl::cleanup PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::cleanup_internal;Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::btree -if (TARGET Absl::btree) - - set_target_properties( - Absl::btree - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::common_policy_traits;Absl::compare;Absl::compressed_tuple;Absl::config;Absl::container_common;Absl::container_memory;Absl::cord;Absl::core_headers;Absl::layout;Absl::memory;Absl::raw_logging_internal;Absl::strings;Absl::throw_delegate;Absl::type_traits" - ) - -endif () # imported target Absl::compressed_tuple -if (TARGET Absl::compressed_tuple) - - set_target_properties( - Absl::compressed_tuple PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::utility" - ) - -endif () # imported target Absl::fixed_array -if (TARGET Absl::fixed_array) - - set_target_properties( - Absl::fixed_array - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::compressed_tuple;Absl::algorithm;Absl::config;Absl::core_headers;Absl::dynamic_annotations;Absl::throw_delegate;Absl::memory" - ) - -endif () # imported target Absl::inlined_vector_internal -if (TARGET Absl::inlined_vector_internal) - - set_target_properties( - Absl::inlined_vector_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::compressed_tuple;Absl::config;Absl::core_headers;Absl::memory;Absl::span;Absl::type_traits" - ) - -endif () # imported target Absl::inlined_vector -if (TARGET Absl::inlined_vector) - - set_target_properties( - Absl::inlined_vector - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::algorithm;Absl::core_headers;Absl::inlined_vector_internal;Absl::throw_delegate;Absl::memory;Absl::type_traits" - ) - -endif () # imported target Absl::flat_hash_map -if (TARGET Absl::flat_hash_map) - - set_target_properties( - Absl::flat_hash_map - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::container_memory;Absl::core_headers;Absl::hash_container_defaults;Absl::raw_hash_map;Absl::algorithm_container;Absl::type_traits" - ) - -endif () # imported target Absl::flat_hash_set -if (TARGET Absl::flat_hash_set) - - set_target_properties( - Absl::flat_hash_set - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::container_memory;Absl::hash_container_defaults;Absl::raw_hash_set;Absl::algorithm_container;Absl::core_headers;Absl::memory;Absl::type_traits" - ) - -endif () # imported target Absl::node_hash_map -if (TARGET Absl::node_hash_map) - - set_target_properties( - Absl::node_hash_map - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::container_memory;Absl::core_headers;Absl::hash_container_defaults;Absl::node_slot_policy;Absl::raw_hash_map;Absl::algorithm_container;Absl::memory;Absl::type_traits" - ) - -endif () # imported target Absl::node_hash_set -if (TARGET Absl::node_hash_set) - - set_target_properties( - Absl::node_hash_set - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::container_memory;Absl::core_headers;Absl::hash_container_defaults;Absl::node_slot_policy;Absl::raw_hash_set;Absl::algorithm_container;Absl::memory;Absl::type_traits" - ) - -endif () # imported target Absl::hash_container_defaults -if (TARGET Absl::hash_container_defaults) - - set_target_properties( - Absl::hash_container_defaults PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::hash_function_defaults" - ) - -endif () # imported target Absl::container_memory -if (TARGET Absl::container_memory) - - set_target_properties( - Absl::container_memory - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::memory;Absl::type_traits;Absl::utility" - ) - -endif () # imported target Absl::hash_function_defaults -if (TARGET Absl::hash_function_defaults) - - set_target_properties( - Absl::hash_function_defaults - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::container_common;Absl::cord;Absl::hash;Absl::strings;Absl::type_traits" - ) - -endif () # imported target Absl::hash_policy_traits -if (TARGET Absl::hash_policy_traits) - - set_target_properties( - Absl::hash_policy_traits PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::common_policy_traits;Absl::meta" - ) - -endif () # imported target Absl::common_policy_traits -if (TARGET Absl::common_policy_traits) - - set_target_properties( - Absl::common_policy_traits PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::meta" - ) - -endif () # imported target Absl::hashtablez_sampler -if (TARGET Absl::hashtablez_sampler) - - set_target_properties( - Absl::hashtablez_sampler - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::exponential_biased;Absl::no_destructor;Absl::raw_logging_internal;Absl::sample_recorder;Absl::synchronization;Absl::time" - ) - -endif () # imported target Absl::hashtable_debug -if (TARGET Absl::hashtable_debug) - - set_target_properties( - Absl::hashtable_debug PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::hashtable_debug_hooks" - ) - -endif () # imported target Absl::hashtable_debug_hooks -if (TARGET Absl::hashtable_debug_hooks) - - set_target_properties( - Absl::hashtable_debug_hooks PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::node_slot_policy -if (TARGET Absl::node_slot_policy) - - set_target_properties( - Absl::node_slot_policy PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::raw_hash_map -if (TARGET Absl::raw_hash_map) - - set_target_properties( - Absl::raw_hash_map - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::container_memory;Absl::core_headers;Absl::raw_hash_set;Absl::throw_delegate" - ) - -endif () # imported target Absl::container_common -if (TARGET Absl::container_common) - - set_target_properties( - Absl::container_common PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::type_traits" - ) - -endif () # imported target Absl::raw_hash_set -if (TARGET Absl::raw_hash_set) - - set_target_properties( - Absl::raw_hash_set - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::bits;Absl::common_policy_traits;Absl::compressed_tuple;Absl::config;Absl::container_common;Absl::container_memory;Absl::core_headers;Absl::dynamic_annotations;Absl::endian;Absl::hash;Absl::hash_function_defaults;Absl::hash_policy_traits;Absl::hashtable_debug_hooks;Absl::hashtablez_sampler;Absl::memory;Absl::meta;Absl::optional;Absl::prefetch;Absl::raw_logging_internal;Absl::utility" - ) - -endif () # imported target Absl::layout -if (TARGET Absl::layout) - - set_target_properties( - Absl::layout - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::debugging_internal;Absl::meta;Absl::strings;Absl::span;Absl::utility" - ) - -endif () # imported target Absl::crc_cpu_detect -if (TARGET Absl::crc_cpu_detect) - - set_target_properties( - Absl::crc_cpu_detect PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::optional" - ) - -endif () # imported target Absl::crc_internal -if (TARGET Absl::crc_internal) - - set_target_properties( - Absl::crc_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::crc_cpu_detect;Absl::config;Absl::core_headers;Absl::endian;Absl::prefetch;Absl::raw_logging_internal;Absl::memory;Absl::bits" - ) - -endif () # imported target Absl::crc32c -if (TARGET Absl::crc32c) - - set_target_properties( - Absl::crc32c - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::crc_cpu_detect;Absl::crc_internal;Absl::non_temporal_memcpy;Absl::config;Absl::core_headers;Absl::endian;Absl::prefetch;Absl::str_format;Absl::strings" - ) - -endif () # imported target Absl::non_temporal_arm_intrinsics -if (TARGET Absl::non_temporal_arm_intrinsics) - - set_target_properties( - Absl::non_temporal_arm_intrinsics PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::non_temporal_memcpy -if (TARGET Absl::non_temporal_memcpy) - - set_target_properties( - Absl::non_temporal_memcpy - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::non_temporal_arm_intrinsics;Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::crc_cord_state -if (TARGET Absl::crc_cord_state) - - set_target_properties( - Absl::crc_cord_state - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::crc32c;Absl::config;Absl::strings;Absl::no_destructor" - ) - -endif () # imported target Absl::stacktrace -if (TARGET Absl::stacktrace) - - set_target_properties( - Absl::stacktrace - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::debugging_internal;Absl::config;Absl::core_headers;Absl::dynamic_annotations;Absl::raw_logging_internal;\$:EXECINFO_LIBRARY-NOTFOUND>>" - ) - -endif () # imported target Absl::symbolize -if (TARGET Absl::symbolize) - - set_target_properties( - Absl::symbolize - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::debugging_internal;Absl::demangle_internal;Absl::base;Absl::config;Absl::core_headers;Absl::dynamic_annotations;Absl::malloc_internal;Absl::raw_logging_internal;Absl::strings;\$:-ldbghelp>>" - ) - -endif () # imported target Absl::examine_stack -if (TARGET Absl::examine_stack) - - set_target_properties( - Absl::examine_stack - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::stacktrace;Absl::symbolize;Absl::config;Absl::core_headers;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::failure_signal_handler -if (TARGET Absl::failure_signal_handler) - - set_target_properties( - Absl::failure_signal_handler - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::examine_stack;Absl::stacktrace;Absl::base;Absl::config;Absl::core_headers;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::debugging_internal -if (TARGET Absl::debugging_internal) - - set_target_properties( - Absl::debugging_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::core_headers;Absl::config;Absl::dynamic_annotations;Absl::errno_saver;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::demangle_internal -if (TARGET Absl::demangle_internal) - - set_target_properties( - Absl::demangle_internal PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::demangle_rust" - ) - -endif () # imported target Absl::bounded_utf8_length_sequence -if (TARGET Absl::bounded_utf8_length_sequence) - - set_target_properties( - Absl::bounded_utf8_length_sequence PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::bits;Absl::config" - ) - -endif () # imported target Absl::decode_rust_punycode -if (TARGET Absl::decode_rust_punycode) - - set_target_properties( - Absl::decode_rust_punycode - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::bounded_utf8_length_sequence;Absl::config;Absl::nullability;Absl::utf8_for_code_point" - ) - -endif () # imported target Absl::demangle_rust -if (TARGET Absl::demangle_rust) - - set_target_properties( - Absl::demangle_rust - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::decode_rust_punycode" - ) - -endif () # imported target Absl::utf8_for_code_point -if (TARGET Absl::utf8_for_code_point) - - set_target_properties( - Absl::utf8_for_code_point PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::leak_check -if (TARGET Absl::leak_check) - - set_target_properties( - Absl::leak_check PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::debugging -if (TARGET Absl::debugging) - - set_target_properties( - Absl::debugging PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::stacktrace;Absl::leak_check" - ) - -endif () # imported target Absl::flags_path_util -if (TARGET Absl::flags_path_util) - - set_target_properties( - Absl::flags_path_util PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::strings" - ) - -endif () # imported target Absl::flags_program_name -if (TARGET Absl::flags_program_name) - - set_target_properties( - Absl::flags_program_name - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::no_destructor;Absl::flags_path_util;Absl::strings;Absl::synchronization" - ) - -endif () # imported target Absl::flags_config -if (TARGET Absl::flags_config) - - set_target_properties( - Absl::flags_config - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::flags_path_util;Absl::flags_program_name;Absl::core_headers;Absl::no_destructor;Absl::strings;Absl::synchronization" - ) - -endif () # imported target Absl::flags_marshalling -if (TARGET Absl::flags_marshalling) - - set_target_properties( - Absl::flags_marshalling - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::log_severity;Absl::int128;Absl::optional;Absl::strings;Absl::str_format" - ) - -endif () # imported target Absl::flags_commandlineflag_internal -if (TARGET Absl::flags_commandlineflag_internal) - - set_target_properties( - Absl::flags_commandlineflag_internal - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::dynamic_annotations;Absl::fast_type_id" - ) - -endif () # imported target Absl::flags_commandlineflag -if (TARGET Absl::flags_commandlineflag) - - set_target_properties( - Absl::flags_commandlineflag - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::fast_type_id;Absl::flags_commandlineflag_internal;Absl::optional;Absl::strings" - ) - -endif () # imported target Absl::flags_private_handle_accessor -if (TARGET Absl::flags_private_handle_accessor) - - set_target_properties( - Absl::flags_private_handle_accessor - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::flags_commandlineflag;Absl::flags_commandlineflag_internal;Absl::strings" - ) - -endif () # imported target Absl::flags_reflection -if (TARGET Absl::flags_reflection) - - set_target_properties( - Absl::flags_reflection - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::flags_commandlineflag;Absl::flags_private_handle_accessor;Absl::flags_config;Absl::strings;Absl::synchronization;Absl::flat_hash_map;Absl::no_destructor" - ) - -endif () # imported target Absl::flags_internal -if (TARGET Absl::flags_internal) - - set_target_properties( - Absl::flags_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::flags_commandlineflag;Absl::flags_commandlineflag_internal;Absl::flags_config;Absl::flags_marshalling;Absl::no_destructor;Absl::synchronization;Absl::meta;Absl::utility" - ) - -endif () # imported target Absl::flags -if (TARGET Absl::flags) - - set_target_properties( - Absl::flags - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::flags_commandlineflag;Absl::flags_config;Absl::flags_internal;Absl::flags_reflection;Absl::core_headers;Absl::strings" - ) - -endif () # imported target Absl::flags_usage_internal -if (TARGET Absl::flags_usage_internal) - - set_target_properties( - Absl::flags_usage_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::flags_config;Absl::flags;Absl::flags_commandlineflag;Absl::flags_internal;Absl::flags_path_util;Absl::flags_private_handle_accessor;Absl::flags_program_name;Absl::flags_reflection;Absl::strings;Absl::synchronization" - ) - -endif () # imported target Absl::flags_usage -if (TARGET Absl::flags_usage) - - set_target_properties( - Absl::flags_usage - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::flags_usage_internal;Absl::no_destructor;Absl::raw_logging_internal;Absl::strings;Absl::synchronization" - ) - -endif () # imported target Absl::flags_parse -if (TARGET Absl::flags_parse) - - set_target_properties( - Absl::flags_parse - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::algorithm_container;Absl::config;Absl::core_headers;Absl::flags_config;Absl::flags;Absl::flags_commandlineflag;Absl::flags_commandlineflag_internal;Absl::flags_internal;Absl::flags_private_handle_accessor;Absl::flags_program_name;Absl::flags_reflection;Absl::flags_usage;Absl::no_destructor;Absl::strings;Absl::synchronization" - ) - -endif () # imported target Absl::any_invocable -if (TARGET Absl::any_invocable) - - set_target_properties( - Absl::any_invocable - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::config;Absl::core_headers;Absl::type_traits;Absl::utility" - ) - -endif () # imported target Absl::bind_front -if (TARGET Absl::bind_front) - - set_target_properties( - Absl::bind_front PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::compressed_tuple" - ) - -endif () # imported target Absl::function_ref -if (TARGET Absl::function_ref) - - set_target_properties( - Absl::function_ref - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::core_headers;Absl::any_invocable;Absl::meta" - ) - -endif () # imported target Absl::overload -if (TARGET Absl::overload) - - set_target_properties(Absl::overload PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::meta") - -endif () # imported target Absl::hash -if (TARGET Absl::hash) - - set_target_properties( - Absl::hash - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::bits;Absl::city;Absl::config;Absl::core_headers;Absl::endian;Absl::fixed_array;Absl::function_ref;Absl::meta;Absl::int128;Absl::strings;Absl::optional;Absl::variant;Absl::utility;Absl::low_level_hash" - ) - -endif () # imported target Absl::city -if (TARGET Absl::city) - - set_target_properties( - Absl::city PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::endian" - ) - -endif () # imported target Absl::low_level_hash -if (TARGET Absl::low_level_hash) - - set_target_properties( - Absl::low_level_hash - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::endian;Absl::int128;Absl::prefetch" - ) - -endif () # imported target Absl::log_internal_check_impl -if (TARGET Absl::log_internal_check_impl) - - set_target_properties( - Absl::log_internal_check_impl - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::core_headers;Absl::log_internal_check_op;Absl::log_internal_conditions;Absl::log_internal_message;Absl::log_internal_strip" - ) - -endif () # imported target Absl::log_internal_check_op -if (TARGET Absl::log_internal_check_op) - - set_target_properties( - Absl::log_internal_check_op - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::leak_check;Absl::log_internal_nullguard;Absl::log_internal_nullstream;Absl::log_internal_strip;Absl::nullability;Absl::strings" - ) - -endif () # imported target Absl::log_internal_conditions -if (TARGET Absl::log_internal_conditions) - - set_target_properties( - Absl::log_internal_conditions - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::log_internal_voidify" - ) - -endif () # imported target Absl::log_internal_config -if (TARGET Absl::log_internal_config) - - set_target_properties( - Absl::log_internal_config PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::log_internal_flags -if (TARGET Absl::log_internal_flags) - - set_target_properties( - Absl::log_internal_flags PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::flags" - ) - -endif () # imported target Absl::log_internal_format -if (TARGET Absl::log_internal_format) - - set_target_properties( - Absl::log_internal_format - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::log_internal_append_truncated;Absl::log_internal_config;Absl::log_internal_globals;Absl::log_severity;Absl::strings;Absl::str_format;Absl::time;Absl::span" - ) - -endif () # imported target Absl::log_internal_globals -if (TARGET Absl::log_internal_globals) - - set_target_properties( - Absl::log_internal_globals - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::log_severity;Absl::raw_logging_internal;Absl::strings;Absl::time" - ) - -endif () # imported target Absl::log_internal_log_impl -if (TARGET Absl::log_internal_log_impl) - - set_target_properties( - Absl::log_internal_log_impl - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::log_internal_conditions;Absl::log_internal_message;Absl::log_internal_strip;Absl::absl_vlog_is_on" - ) - -endif () # imported target Absl::log_internal_proto -if (TARGET Absl::log_internal_proto) - - set_target_properties( - Absl::log_internal_proto - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::strings;Absl::span" - ) - -endif () # imported target Absl::log_internal_message -if (TARGET Absl::log_internal_message) - - set_target_properties( - Absl::log_internal_message - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::errno_saver;Absl::examine_stack;Absl::inlined_vector;Absl::log_internal_append_truncated;Absl::log_internal_format;Absl::log_internal_globals;Absl::log_internal_proto;Absl::log_internal_log_sink_set;Absl::log_internal_nullguard;Absl::log_internal_structured_proto;Absl::log_globals;Absl::log_entry;Absl::log_severity;Absl::log_sink;Absl::log_sink_registry;Absl::memory;Absl::nullability;Absl::raw_logging_internal;Absl::span;Absl::strerror;Absl::strings;Absl::time" - ) - -endif () # imported target Absl::log_internal_log_sink_set -if (TARGET Absl::log_internal_log_sink_set) - - set_target_properties( - Absl::log_internal_log_sink_set - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::cleanup;Absl::config;Absl::core_headers;Absl::log_internal_config;Absl::log_internal_globals;Absl::log_globals;Absl::log_entry;Absl::log_severity;Absl::log_sink;Absl::no_destructor;Absl::raw_logging_internal;Absl::synchronization;Absl::span;Absl::strings;\$:-llog>>" - ) - -endif () # imported target Absl::log_internal_nullguard -if (TARGET Absl::log_internal_nullguard) - - set_target_properties( - Absl::log_internal_nullguard PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::log_internal_nullstream -if (TARGET Absl::log_internal_nullstream) - - set_target_properties( - Absl::log_internal_nullstream - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::log_severity;Absl::strings" - ) - -endif () # imported target Absl::log_internal_strip -if (TARGET Absl::log_internal_strip) - - set_target_properties( - Absl::log_internal_strip - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::core_headers;Absl::log_internal_message;Absl::log_internal_nullstream;Absl::log_severity" - ) - -endif () # imported target Absl::log_internal_voidify -if (TARGET Absl::log_internal_voidify) - - set_target_properties( - Absl::log_internal_voidify PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::log_internal_append_truncated -if (TARGET Absl::log_internal_append_truncated) - - set_target_properties( - Absl::log_internal_append_truncated - PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config;Absl::strings;Absl::span" - ) - -endif () # imported target Absl::absl_check -if (TARGET Absl::absl_check) - - set_target_properties( - Absl::absl_check PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::log_internal_check_impl" - ) - -endif () # imported target Absl::absl_log -if (TARGET Absl::absl_log) - - set_target_properties( - Absl::absl_log PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::log_internal_log_impl" - ) - -endif () # imported target Absl::check -if (TARGET Absl::check) - - set_target_properties( - Absl::check - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::log_internal_check_impl;Absl::core_headers;Absl::log_internal_check_op;Absl::log_internal_conditions;Absl::log_internal_message;Absl::log_internal_strip" - ) - -endif () # imported target Absl::die_if_null -if (TARGET Absl::die_if_null) - - set_target_properties( - Absl::die_if_null - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::log;Absl::strings" - ) - -endif () # imported target Absl::log_flags -if (TARGET Absl::log_flags) - - set_target_properties( - Absl::log_flags - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::log_globals;Absl::log_severity;Absl::log_internal_config;Absl::log_internal_flags;Absl::flags;Absl::flags_marshalling;Absl::strings;Absl::vlog_config_internal" - ) - -endif () # imported target Absl::log_globals -if (TARGET Absl::log_globals) - - set_target_properties( - Absl::log_globals - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::atomic_hook;Absl::config;Absl::core_headers;Absl::hash;Absl::log_severity;Absl::raw_logging_internal;Absl::strings;Absl::vlog_config_internal" - ) - -endif () # imported target Absl::log_initialize -if (TARGET Absl::log_initialize) - - set_target_properties( - Absl::log_initialize - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::log_globals;Absl::log_internal_globals;Absl::time" - ) - -endif () # imported target Absl::log -if (TARGET Absl::log) - - set_target_properties( - Absl::log PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::log_internal_log_impl;Absl::vlog_is_on" - ) - -endif () # imported target Absl::log_entry -if (TARGET Absl::log_entry) - - set_target_properties( - Absl::log_entry - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::log_internal_config;Absl::log_severity;Absl::span;Absl::strings;Absl::time" - ) - -endif () # imported target Absl::log_sink -if (TARGET Absl::log_sink) - - set_target_properties( - Absl::log_sink PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config;Absl::log_entry" - ) - -endif () # imported target Absl::log_sink_registry -if (TARGET Absl::log_sink_registry) - - set_target_properties( - Absl::log_sink_registry - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::log_sink;Absl::log_internal_log_sink_set;Absl::nullability" - ) - -endif () # imported target Absl::log_streamer -if (TARGET Absl::log_streamer) - - set_target_properties( - Absl::log_streamer - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::absl_log;Absl::log_severity;Absl::optional;Absl::strings;Absl::strings_internal;Absl::utility" - ) - -endif () # imported target Absl::log_internal_structured -if (TARGET Absl::log_internal_structured) - - set_target_properties( - Absl::log_internal_structured - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::any_invocable;Absl::config;Absl::core_headers;Absl::log_internal_message;Absl::log_internal_structured_proto;Absl::strings" - ) - -endif () # imported target Absl::log_internal_structured_proto -if (TARGET Absl::log_internal_structured_proto) - - set_target_properties( - Absl::log_internal_structured_proto - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::log_internal_proto;Absl::config;Absl::span;Absl::strings;Absl::variant" - ) - -endif () # imported target Absl::log_structured -if (TARGET Absl::log_structured) - - set_target_properties( - Absl::log_structured - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::log_internal_structured;Absl::strings" - ) - -endif () # imported target Absl::vlog_config_internal -if (TARGET Absl::vlog_config_internal) - - set_target_properties( - Absl::vlog_config_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::log_internal_fnmatch;Absl::memory;Absl::no_destructor;Absl::strings;Absl::synchronization;Absl::optional" - ) - -endif () # imported target Absl::absl_vlog_is_on -if (TARGET Absl::absl_vlog_is_on) - - set_target_properties( - Absl::absl_vlog_is_on - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::vlog_config_internal;Absl::config;Absl::core_headers;Absl::strings" - ) - -endif () # imported target Absl::vlog_is_on -if (TARGET Absl::vlog_is_on) - - set_target_properties( - Absl::vlog_is_on PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::absl_vlog_is_on" - ) - -endif () # imported target Absl::log_internal_fnmatch -if (TARGET Absl::log_internal_fnmatch) - - set_target_properties( - Absl::log_internal_fnmatch PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::strings" - ) - -endif () # imported target Absl::memory -if (TARGET Absl::memory) - - set_target_properties( - Absl::memory PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::core_headers;Absl::meta" - ) - -endif () # imported target Absl::type_traits -if (TARGET Absl::type_traits) - - set_target_properties( - Absl::type_traits PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::meta -if (TARGET Absl::meta) - - set_target_properties( - Absl::meta PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::type_traits" - ) - -endif () # imported target Absl::bits -if (TARGET Absl::bits) - - set_target_properties( - Absl::bits PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::core_headers" - ) - -endif () # imported target Absl::int128 -if (TARGET Absl::int128) - - set_target_properties( - Absl::int128 PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::compare;Absl::config;Absl::core_headers;Absl::bits" - ) - -endif () # imported target Absl::numeric -if (TARGET Absl::numeric) - - set_target_properties(Absl::numeric PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::int128") - -endif () # imported target Absl::numeric_representation -if (TARGET Absl::numeric_representation) - - set_target_properties( - Absl::numeric_representation PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::sample_recorder -if (TARGET Absl::sample_recorder) - - set_target_properties( - Absl::sample_recorder PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::synchronization" - ) - -endif () # imported target Absl::exponential_biased -if (TARGET Absl::exponential_biased) - - set_target_properties( - Absl::exponential_biased PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers" - ) - -endif () # imported target Absl::periodic_sampler -if (TARGET Absl::periodic_sampler) - - set_target_properties( - Absl::periodic_sampler PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::core_headers;Absl::exponential_biased" - ) - -endif () # imported target Absl::random_random -if (TARGET Absl::random_random) - - set_target_properties( - Absl::random_random - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::random_distributions;Absl::random_internal_nonsecure_base;Absl::random_internal_pcg_engine;Absl::random_internal_pool_urbg;Absl::random_internal_randen_engine;Absl::random_seed_sequences" - ) - -endif () # imported target Absl::random_bit_gen_ref -if (TARGET Absl::random_bit_gen_ref) - - set_target_properties( - Absl::random_bit_gen_ref - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::random_internal_distribution_caller;Absl::random_internal_fast_uniform_bits;Absl::type_traits" - ) - -endif () # imported target Absl::random_internal_mock_helpers -if (TARGET Absl::random_internal_mock_helpers) - - set_target_properties( - Absl::random_internal_mock_helpers - PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config;Absl::fast_type_id;Absl::optional" - ) - -endif () # imported target Absl::random_distributions -if (TARGET Absl::random_distributions) - - set_target_properties( - Absl::random_distributions - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::config;Absl::core_headers;Absl::random_internal_generate_real;Absl::random_internal_distribution_caller;Absl::random_internal_fast_uniform_bits;Absl::random_internal_fastmath;Absl::random_internal_iostream_state_saver;Absl::random_internal_traits;Absl::random_internal_uniform_helper;Absl::random_internal_wide_multiply;Absl::strings;Absl::type_traits" - ) - -endif () # imported target Absl::random_seed_gen_exception -if (TARGET Absl::random_seed_gen_exception) - - set_target_properties( - Absl::random_seed_gen_exception PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::random_seed_sequences -if (TARGET Absl::random_seed_sequences) - - set_target_properties( - Absl::random_seed_sequences - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::inlined_vector;Absl::nullability;Absl::random_internal_pool_urbg;Absl::random_internal_salted_seed_seq;Absl::random_internal_seed_material;Absl::random_seed_gen_exception;Absl::span;Absl::string_view" - ) - -endif () # imported target Absl::random_internal_traits -if (TARGET Absl::random_internal_traits) - - set_target_properties( - Absl::random_internal_traits PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::random_internal_distribution_caller -if (TARGET Absl::random_internal_distribution_caller) - - set_target_properties( - Absl::random_internal_distribution_caller - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::utility;Absl::fast_type_id;Absl::type_traits" - ) - -endif () # imported target Absl::random_internal_fast_uniform_bits -if (TARGET Absl::random_internal_fast_uniform_bits) - - set_target_properties( - Absl::random_internal_fast_uniform_bits PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config" - ) - -endif () # imported target Absl::random_internal_seed_material -if (TARGET Absl::random_internal_seed_material) - - set_target_properties( - Absl::random_internal_seed_material - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::core_headers;Absl::optional;Absl::random_internal_fast_uniform_bits;Absl::raw_logging_internal;Absl::span;Absl::strings;\$:-lbcrypt>>" - ) - -endif () # imported target Absl::random_internal_pool_urbg -if (TARGET Absl::random_internal_pool_urbg) - - set_target_properties( - Absl::random_internal_pool_urbg - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::endian;Absl::random_internal_randen;Absl::random_internal_seed_material;Absl::random_internal_traits;Absl::random_seed_gen_exception;Absl::raw_logging_internal;Absl::span" - ) - -endif () # imported target Absl::random_internal_salted_seed_seq -if (TARGET Absl::random_internal_salted_seed_seq) - - set_target_properties( - Absl::random_internal_salted_seed_seq - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::inlined_vector;Absl::optional;Absl::span;Absl::random_internal_seed_material;Absl::type_traits" - ) - -endif () # imported target Absl::random_internal_iostream_state_saver -if (TARGET Absl::random_internal_iostream_state_saver) - - set_target_properties( - Absl::random_internal_iostream_state_saver - PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config;Absl::int128;Absl::type_traits" - ) - -endif () # imported target Absl::random_internal_generate_real -if (TARGET Absl::random_internal_generate_real) - - set_target_properties( - Absl::random_internal_generate_real - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::bits;Absl::random_internal_fastmath;Absl::random_internal_traits;Absl::type_traits" - ) - -endif () # imported target Absl::random_internal_wide_multiply -if (TARGET Absl::random_internal_wide_multiply) - - set_target_properties( - Absl::random_internal_wide_multiply PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::bits;Absl::config;Absl::int128" - ) - -endif () # imported target Absl::random_internal_fastmath -if (TARGET Absl::random_internal_fastmath) - - set_target_properties( - Absl::random_internal_fastmath PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::bits" - ) - -endif () # imported target Absl::random_internal_nonsecure_base -if (TARGET Absl::random_internal_nonsecure_base) - - set_target_properties( - Absl::random_internal_nonsecure_base - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::core_headers;Absl::inlined_vector;Absl::random_internal_pool_urbg;Absl::random_internal_salted_seed_seq;Absl::random_internal_seed_material;Absl::span;Absl::type_traits" - ) - -endif () # imported target Absl::random_internal_pcg_engine -if (TARGET Absl::random_internal_pcg_engine) - - set_target_properties( - Absl::random_internal_pcg_engine - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::int128;Absl::random_internal_fastmath;Absl::random_internal_iostream_state_saver;Absl::type_traits" - ) - -endif () # imported target Absl::random_internal_randen_engine -if (TARGET Absl::random_internal_randen_engine) - - set_target_properties( - Absl::random_internal_randen_engine - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::endian;Absl::random_internal_iostream_state_saver;Absl::random_internal_randen;Absl::raw_logging_internal;Absl::type_traits" - ) - -endif () # imported target Absl::random_internal_platform -if (TARGET Absl::random_internal_platform) - - set_target_properties( - Absl::random_internal_platform PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::random_internal_randen -if (TARGET Absl::random_internal_randen) - - set_target_properties( - Absl::random_internal_randen - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::random_internal_platform;Absl::random_internal_randen_hwaes;Absl::random_internal_randen_slow" - ) - -endif () # imported target Absl::random_internal_randen_slow -if (TARGET Absl::random_internal_randen_slow) - - set_target_properties( - Absl::random_internal_randen_slow - PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::random_internal_platform;Absl::config" - ) - -endif () # imported target Absl::random_internal_randen_hwaes -if (TARGET Absl::random_internal_randen_hwaes) - - set_target_properties( - Absl::random_internal_randen_hwaes - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::random_internal_platform;Absl::random_internal_randen_hwaes_impl;Absl::config;Absl::optional" - ) - -endif () # imported target Absl::random_internal_randen_hwaes_impl -if (TARGET Absl::random_internal_randen_hwaes_impl) - - set_target_properties( - Absl::random_internal_randen_hwaes_impl - PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::random_internal_platform;Absl::config" - ) - -endif () # imported target Absl::random_internal_distribution_test_util -if (TARGET Absl::random_internal_distribution_test_util) - - set_target_properties( - Absl::random_internal_distribution_test_util - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::raw_logging_internal;Absl::strings;Absl::str_format;Absl::span" - ) - -endif () # imported target Absl::random_internal_uniform_helper -if (TARGET Absl::random_internal_uniform_helper) - - set_target_properties( - Absl::random_internal_uniform_helper - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::random_internal_traits;Absl::type_traits" - ) - -endif () # imported target Absl::status -if (TARGET Absl::status) - - set_target_properties( - Absl::status - PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "\$<\$:_LINUX_SOURCE_COMPAT>" - INTERFACE_LINK_LIBRARIES - "Absl::atomic_hook;Absl::config;Absl::cord;Absl::core_headers;Absl::function_ref;Absl::inlined_vector;Absl::leak_check;Absl::memory;Absl::no_destructor;Absl::nullability;Absl::optional;Absl::raw_logging_internal;Absl::span;Absl::stacktrace;Absl::str_format;Absl::strerror;Absl::strings;Absl::symbolize" - ) - -endif () # imported target Absl::statusor -if (TARGET Absl::statusor) - - set_target_properties( - Absl::statusor - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::has_ostream_operator;Absl::nullability;Absl::raw_logging_internal;Absl::status;Absl::str_format;Absl::strings;Absl::type_traits;Absl::utility;Absl::variant" - ) - -endif () # imported target Absl::string_view -if (TARGET Absl::string_view) - - set_target_properties( - Absl::string_view - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::nullability;Absl::throw_delegate" - ) - -endif () # imported target Absl::strings -if (TARGET Absl::strings) - - set_target_properties( - Absl::strings - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::string_view;Absl::strings_internal;Absl::base;Absl::bits;Absl::charset;Absl::config;Absl::core_headers;Absl::endian;Absl::int128;Absl::memory;Absl::nullability;Absl::raw_logging_internal;Absl::throw_delegate;Absl::type_traits" - ) - -endif () # imported target Absl::charset -if (TARGET Absl::charset) - - set_target_properties( - Absl::charset PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config;Absl::string_view" - ) - -endif () # imported target Absl::has_ostream_operator -if (TARGET Absl::has_ostream_operator) - - set_target_properties( - Absl::has_ostream_operator PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::strings_internal -if (TARGET Absl::strings_internal) - - set_target_properties( - Absl::strings_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::endian;Absl::raw_logging_internal;Absl::type_traits" - ) - -endif () # imported target Absl::str_format -if (TARGET Absl::str_format) - - set_target_properties( - Absl::str_format - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::nullability;Absl::span;Absl::str_format_internal;Absl::string_view" - ) - -endif () # imported target Absl::str_format_internal -if (TARGET Absl::str_format_internal) - - set_target_properties( - Absl::str_format_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::bits;Absl::strings;Absl::config;Absl::core_headers;Absl::fixed_array;Absl::inlined_vector;Absl::numeric_representation;Absl::type_traits;Absl::utility;Absl::int128;Absl::span" - ) - -endif () # imported target Absl::cord_internal -if (TARGET Absl::cord_internal) - - set_target_properties( - Absl::cord_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::compressed_tuple;Absl::config;Absl::container_memory;Absl::compare;Absl::core_headers;Absl::crc_cord_state;Absl::endian;Absl::inlined_vector;Absl::layout;Absl::raw_logging_internal;Absl::strings;Absl::throw_delegate;Absl::type_traits" - ) - -endif () # imported target Absl::cordz_update_tracker -if (TARGET Absl::cordz_update_tracker) - - set_target_properties( - Absl::cordz_update_tracker PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) - -endif () # imported target Absl::cordz_functions -if (TARGET Absl::cordz_functions) - - set_target_properties( - Absl::cordz_functions - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::exponential_biased;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::cordz_statistics -if (TARGET Absl::cordz_statistics) - - set_target_properties( - Absl::cordz_statistics - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::cordz_update_tracker;Absl::synchronization" - ) - -endif () # imported target Absl::cordz_handle -if (TARGET Absl::cordz_handle) - - set_target_properties( - Absl::cordz_handle - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::no_destructor;Absl::raw_logging_internal;Absl::synchronization" - ) - -endif () # imported target Absl::cordz_info -if (TARGET Absl::cordz_info) - - set_target_properties( - Absl::cordz_info - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::cord_internal;Absl::cordz_functions;Absl::cordz_handle;Absl::cordz_statistics;Absl::cordz_update_tracker;Absl::core_headers;Absl::inlined_vector;Absl::span;Absl::raw_logging_internal;Absl::stacktrace;Absl::synchronization;Absl::time" - ) - -endif () # imported target Absl::cordz_sample_token -if (TARGET Absl::cordz_sample_token) - - set_target_properties( - Absl::cordz_sample_token - PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::cordz_handle;Absl::cordz_info" - ) - -endif () # imported target Absl::cordz_update_scope -if (TARGET Absl::cordz_update_scope) - - set_target_properties( - Absl::cordz_update_scope - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::cord_internal;Absl::cordz_info;Absl::cordz_update_tracker;Absl::core_headers" - ) - -endif () # imported target Absl::cord -if (TARGET Absl::cord) - - set_target_properties( - Absl::cord - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::cord_internal;Absl::cordz_functions;Absl::cordz_info;Absl::cordz_update_scope;Absl::cordz_update_tracker;Absl::core_headers;Absl::crc32c;Absl::crc_cord_state;Absl::endian;Absl::function_ref;Absl::inlined_vector;Absl::nullability;Absl::optional;Absl::raw_logging_internal;Absl::span;Absl::strings;Absl::type_traits" - ) - -endif () # imported target Absl::graphcycles_internal -if (TARGET Absl::graphcycles_internal) - - set_target_properties( - Absl::graphcycles_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::base_internal;Absl::config;Absl::core_headers;Absl::malloc_internal;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::kernel_timeout_internal -if (TARGET Absl::kernel_timeout_internal) - - set_target_properties( - Absl::kernel_timeout_internal - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::config;Absl::core_headers;Absl::raw_logging_internal;Absl::time" - ) - -endif () # imported target Absl::synchronization -if (TARGET Absl::synchronization) - - set_target_properties( - Absl::synchronization - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::graphcycles_internal;Absl::kernel_timeout_internal;Absl::atomic_hook;Absl::base;Absl::base_internal;Absl::config;Absl::core_headers;Absl::dynamic_annotations;Absl::malloc_internal;Absl::raw_logging_internal;Absl::stacktrace;Absl::symbolize;Absl::tracing_internal;Absl::time;Absl::tracing_internal;Threads::Threads" - ) - -endif () # imported target Absl::time -if (TARGET Absl::time) - - set_target_properties( - Absl::time - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::base;Absl::civil_time;Absl::core_headers;Absl::int128;Absl::raw_logging_internal;Absl::strings;Absl::time_zone" - ) - -endif () # imported target Absl::civil_time - -if (TARGET Absl::time_zone) - - set_target_properties( - Absl::time_zone - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Threads::Threads;\$<\$:-Wl,-framework,CoreFoundation>" - ) - -endif () # imported target Absl::any -if (TARGET Absl::any) - - set_target_properties( - Absl::any - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::bad_any_cast;Absl::config;Absl::core_headers;Absl::fast_type_id;Absl::type_traits;Absl::utility" - ) - -endif () # imported target Absl::bad_any_cast -if (TARGET Absl::bad_any_cast) - - set_target_properties( - Absl::bad_any_cast PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::bad_any_cast_impl;Absl::config" - ) - -endif () # imported target Absl::bad_any_cast_impl -if (TARGET Absl::bad_any_cast_impl) - - set_target_properties( - Absl::bad_any_cast_impl PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::span -if (TARGET Absl::span) - - set_target_properties( - Absl::span - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::algorithm;Absl::config;Absl::core_headers;Absl::nullability;Absl::throw_delegate;Absl::type_traits" - ) - -endif () # imported target Absl::optional -if (TARGET Absl::optional) - - set_target_properties( - Absl::optional - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::bad_optional_access;Absl::base_internal;Absl::config;Absl::core_headers;Absl::memory;Absl::nullability;Absl::type_traits;Absl::utility" - ) - -endif () # imported target Absl::bad_optional_access -if (TARGET Absl::bad_optional_access) - - set_target_properties( - Absl::bad_optional_access PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::bad_variant_access -if (TARGET Absl::bad_variant_access) - - set_target_properties( - Absl::bad_variant_access PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::raw_logging_internal" - ) - -endif () # imported target Absl::variant -if (TARGET Absl::variant) - - set_target_properties( - Absl::variant - PROPERTIES - INTERFACE_LINK_LIBRARIES - "Absl::bad_variant_access;Absl::base_internal;Absl::config;Absl::core_headers;Absl::type_traits;Absl::utility" - ) - -endif () # imported target Absl::compare -if (TARGET Absl::compare) - - set_target_properties( - Absl::compare PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::config;Absl::core_headers;Absl::type_traits" - ) - -endif () # imported target Absl::utility -if (TARGET Absl::utility) - - set_target_properties( - Absl::utility PROPERTIES INTERFACE_LINK_LIBRARIES - "Absl::base_internal;Absl::config;Absl::type_traits" - ) - -endif () # imported target Absl::if_constexpr -if (TARGET Absl::if_constexpr) - - set_target_properties( - Absl::if_constexpr PROPERTIES INTERFACE_LINK_LIBRARIES "Absl::config" - ) -endif () - -if (NOT TARGET Absl::Absl) - add_library(Absl::Absl INTERFACE IMPORTED) - set_target_properties(Absl::Absl PROPERTIES INTERFACE_LINK_LIBRARIES "${ABSL_TARGETS}") - -endif () - -find_package_handle_standard_args(Absl REQUIRED_VARS ABSL_TARGETS) diff --git a/cmake/FindBz2.cmake b/cmake/FindBz2.cmake deleted file mode 100644 index eb068df69..000000000 --- a/cmake/FindBz2.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# GPLv2 Licence - -find_path( - Bz2_INCLUDE_DIR - bzlib.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) -find_library( - Bz2_LIBRARY - NAMES bz2 - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Bz2 REQUIRED_VARS Bz2_LIBRARY Bz2_INCLUDE_DIR) - -if (Bz2_FOUND AND NOT TARGET Bz2::Bz2) - add_library(Bz2::Bz2 UNKNOWN IMPORTED) - set_target_properties( - Bz2::Bz2 PROPERTIES IMPORTED_LOCATION "${Bz2_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES - "${Bz2_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Bz2_LIBRARY Bz2_INCLUDE_DIR) diff --git a/cmake/FindCharset.cmake b/cmake/FindCharset.cmake deleted file mode 100644 index 60c034e16..000000000 --- a/cmake/FindCharset.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -# not in macos and linux input-SDK -if (MACOS) - find_library(Charset_LIBRARY NAMES charset) -elseif (LNX) - message(FATAL_ERROR "charset not available for this platform in input-SDK") -else () - find_library( - Charset_LIBRARY - NAMES charset libcharset - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH - ) -endif () - -find_package_handle_standard_args(Charset REQUIRED_VARS Charset_LIBRARY) - -if (Charset_FOUND AND NOT TARGET Charset::Charset) - add_library(Charset::Charset UNKNOWN IMPORTED) - set_target_properties( - Charset::Charset PROPERTIES IMPORTED_LOCATION "${Charset_LIBRARY}" - ) - -endif () - -mark_as_advanced(Charset_LIBRARY) diff --git a/cmake/FindCurl.cmake b/cmake/FindCurl.cmake deleted file mode 100644 index 4008d1102..000000000 --- a/cmake/FindCurl.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Curl_INCLUDE_DIR - curl/curl.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Curl_LIBRARY - NAMES curl libcurl - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Curl REQUIRED_VARS Curl_LIBRARY Curl_INCLUDE_DIR) - -if (Curl_FOUND AND NOT TARGET Curl::Curl) - add_library(Curl::Curl UNKNOWN IMPORTED) - set_target_properties( - Curl::Curl PROPERTIES IMPORTED_LOCATION "${Curl_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Curl_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Curl_LIBRARY Curl_INCLUDE_DIR) diff --git a/cmake/FindExiv2.cmake b/cmake/FindExiv2.cmake deleted file mode 100644 index 351502da6..000000000 --- a/cmake/FindExiv2.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# GPLv2 Licence -find_path( - Exiv2_INCLUDE_DIR - exif.hpp - "${INPUT_SDK_PATH_MULTI}/include/exiv2" - NO_DEFAULT_PATH -) - -find_library( - Exiv2_LIBRARY - NAMES exiv2 - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Exiv2 REQUIRED_VARS Exiv2_LIBRARY Exiv2_INCLUDE_DIR) - -if (Exiv2_FOUND AND NOT TARGET Exiv2::Exiv2) - add_library(Exiv2::Exiv2 UNKNOWN IMPORTED) - set_target_properties( - Exiv2::Exiv2 PROPERTIES IMPORTED_LOCATION "${Exiv2_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Exiv2_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Exiv2_LIBRARY Exiv2_INCLUDE_DIR) diff --git a/cmake/FindExpat.cmake b/cmake/FindExpat.cmake deleted file mode 100644 index 0919bbed7..000000000 --- a/cmake/FindExpat.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Expat_INCLUDE_DIR - expat.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Expat_LIBRARY - NAMES expat libexpat - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Expat REQUIRED_VARS Expat_LIBRARY Expat_INCLUDE_DIR) - -if (Expat_FOUND AND NOT TARGET Expat::Expat) - add_library(Expat::Expat UNKNOWN IMPORTED) - set_target_properties( - Expat::Expat PROPERTIES IMPORTED_LOCATION "${Expat_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Expat_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Expat_LIBRARY Expat_INCLUDE_DIR) diff --git a/cmake/FindFreexl.cmake b/cmake/FindFreexl.cmake deleted file mode 100644 index abd9bae58..000000000 --- a/cmake/FindFreexl.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Freexl_INCLUDE_DIR - freexl.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Freexl_LIBRARY - NAMES freexl - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Freexl REQUIRED_VARS Freexl_LIBRARY Freexl_INCLUDE_DIR) - -if (Freexl_FOUND AND NOT TARGET Freexl::Freexl) - add_library(Freexl::Freexl UNKNOWN IMPORTED) - set_target_properties( - Freexl::Freexl PROPERTIES IMPORTED_LOCATION "${Freexl_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Freexl_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Freexl_LIBRARY Freexl_INCLUDE_DIR) diff --git a/cmake/FindGdal.cmake b/cmake/FindGdal.cmake deleted file mode 100644 index a4b82ef8d..000000000 --- a/cmake/FindGdal.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Gdal_INCLUDE_DIR - gdal.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Gdal_LIBRARY - NAMES gdal - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Gdal REQUIRED_VARS Gdal_LIBRARY Gdal_INCLUDE_DIR) - -if (Gdal_FOUND AND NOT TARGET Gdal::Gdal) - add_library(Gdal::Gdal STATIC IMPORTED) - set_target_properties( - Gdal::Gdal PROPERTIES IMPORTED_LOCATION "${Gdal_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Gdal_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Gdal_LIBRARY Gdal_INCLUDE_DIR) diff --git a/cmake/FindGeodiff.cmake b/cmake/FindGeodiff.cmake deleted file mode 100644 index f25f14623..000000000 --- a/cmake/FindGeodiff.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# GPLv2 Licence - -find_path( - Geodiff_INCLUDE_DIR - geodiff.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Geodiff_LIBRARY - NAMES geodiff - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - Geodiff REQUIRED_VARS Geodiff_LIBRARY Geodiff_INCLUDE_DIR -) - -if (Geodiff_FOUND AND NOT TARGET Geodiff::Geodiff) - add_library(Geodiff::Geodiff STATIC IMPORTED) - set_target_properties( - Geodiff::Geodiff PROPERTIES IMPORTED_LOCATION "${Geodiff_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Geodiff_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Geodiff_LIBRARY Geodiff_INCLUDE_DIR) diff --git a/cmake/FindGeos.cmake b/cmake/FindGeos.cmake deleted file mode 100644 index 3504ad09e..000000000 --- a/cmake/FindGeos.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# GPLv2 Licence - -find_path( - Geos_INCLUDE_DIR - geos_c.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Geos_LIBRARY - NAMES geos - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_library( - Geos_c_LIBRARY - NAMES geos_c - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - Geos REQUIRED_VARS Geos_LIBRARY Geos_c_LIBRARY Geos_INCLUDE_DIR -) - -if (Geos_FOUND AND NOT TARGET Geos::Geos) - add_library(Geos::Geos UNKNOWN IMPORTED) - set_target_properties( - Geos::Geos PROPERTIES IMPORTED_LOCATION "${Geos_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Geos_INCLUDE_DIR}" - ) - - add_library(Geos::Geos-c UNKNOWN IMPORTED) - set_target_properties( - Geos::Geos-c PROPERTIES IMPORTED_LOCATION "${Geos_c_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Geos_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Geos_LIBRARY Geos_INCLUDE_DIR Geos_c_LIBRARY) diff --git a/cmake/FindGeotiff.cmake b/cmake/FindGeotiff.cmake deleted file mode 100644 index 98165f59c..000000000 --- a/cmake/FindGeotiff.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# GPLv2 Licence - -find_path( - Geotiff_INCLUDE_DIR - geotiff.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Geotiff_LIBRARY - NAMES geotiff geotiff_i - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - Geotiff REQUIRED_VARS Geotiff_LIBRARY Geotiff_INCLUDE_DIR -) - -if (Geotiff_FOUND AND NOT TARGET Geotiff::Geotiff) - add_library(Geotiff::Geotiff UNKNOWN IMPORTED) - set_target_properties( - Geotiff::Geotiff PROPERTIES IMPORTED_LOCATION "${Geotiff_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Geotiff_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Geotiff_LIBRARY Geotiff_INCLUDE_DIR) diff --git a/cmake/FindGlib2.cmake b/cmake/FindGlib2.cmake deleted file mode 100644 index 73a65607e..000000000 --- a/cmake/FindGlib2.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# GPLv2 Licence - -if (NOT LNX) - message(FATAL_ERROR "glib2 not available for this platform in input-SDK") -else () - - find_library( - Glib2_LIBRARY - NAMES glib-2.0 - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH - ) - - find_package_handle_standard_args(Glib2 REQUIRED_VARS Glib2_LIBRARY) - - if (Glib2_FOUND AND NOT TARGET Glib2::Glib2) - add_library(Glib2::Glib2 UNKNOWN IMPORTED) - set_target_properties(Glib2::Glib2 PROPERTIES IMPORTED_LOCATION "${Glib2_LIBRARY}") - endif () - - mark_as_advanced(Glib2_LIBRARY Glib2_INCLUDE_DIR) - -endif () diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake deleted file mode 100644 index f4f058d88..000000000 --- a/cmake/FindIconv.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# GPLv2 Licence - -# not in macos input-SDK, not in linux input-SDK -if (MACOS) - find_library(Iconv_LIBRARY NAMES iconv) -elseif (LNX) - message(FATAL_ERROR "iconv not available for this platform in input-SDK") -else () - find_library( - Iconv_LIBRARY - NAMES iconv - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH - ) -endif () - -find_package_handle_standard_args(Iconv REQUIRED_VARS Iconv_LIBRARY) - -if (Iconv_FOUND AND NOT TARGET Iconv::Iconv) - add_library(Iconv::Iconv UNKNOWN IMPORTED) - set_target_properties(Iconv::Iconv PROPERTIES IMPORTED_LOCATION "${Iconv_LIBRARY}") - -endif () - -mark_as_advanced(Iconv_LIBRARY) diff --git a/cmake/FindInih.cmake b/cmake/FindInih.cmake deleted file mode 100644 index 4cfb87ea4..000000000 --- a/cmake/FindInih.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# GPLv2 Licence -find_library( - Inih_LIBRARY - NAMES libinih inih - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_library( - Inireader_LIBRARY - NAMES libINIReader INIReader - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Inih REQUIRED_VARS Inih_LIBRARY Inireader_LIBRARY) - -if (Inih_FOUND AND NOT TARGET Inih::Inih) - add_library(Inih::Inih UNKNOWN IMPORTED) - set_target_properties(Inih::Inih PROPERTIES IMPORTED_LOCATION "${Inih_LIBRARY}") - - add_library(Inih::Inireader UNKNOWN IMPORTED) - set_target_properties( - Inih::Inireader PROPERTIES IMPORTED_LOCATION "${Inireader_LIBRARY}" - ) -endif () - -mark_as_advanced(Inih_LIBRARY Inireader_LIBRARY) diff --git a/cmake/FindJpeg.cmake b/cmake/FindJpeg.cmake deleted file mode 100644 index 4ab419a04..000000000 --- a/cmake/FindJpeg.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# GPLv2 Licence - -# GDAL uses internal JPEG with renamed symbols TIFF uses jpegturbo QT has bundled -# Qt6BundledLibjpeg on iOS - -find_path( - Jpeg_INCLUDE_DIR - jpeglib.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Jpeg_LIBRARY - NAMES jpeg - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Jpeg REQUIRED_VARS Jpeg_LIBRARY Jpeg_INCLUDE_DIR) - -if (Jpeg_FOUND AND NOT TARGET Jpeg::Jpeg) - add_library(Jpeg::Jpeg UNKNOWN IMPORTED) - set_target_properties( - Jpeg::Jpeg PROPERTIES IMPORTED_LOCATION "${Jpeg_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Jpeg_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Jpeg_LIBRARY Jpeg_INCLUDE_DIR) diff --git a/cmake/FindLzma.cmake b/cmake/FindLzma.cmake deleted file mode 100644 index 51c00dfc7..000000000 --- a/cmake/FindLzma.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Lzma_INCLUDE_DIR - lzma.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Lzma_LIBRARY - NAMES lzma - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Lzma REQUIRED_VARS Lzma_LIBRARY Lzma_INCLUDE_DIR) - -if (Lzma_FOUND AND NOT TARGET Lzma::Lzma) - add_library(Lzma::Lzma UNKNOWN IMPORTED) - set_target_properties( - Lzma::Lzma PROPERTIES IMPORTED_LOCATION "${Lzma_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Lzma_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Lzma_LIBRARY Lzma_INCLUDE_DIR) diff --git a/cmake/FindMiniZip.cmake b/cmake/FindMiniZip.cmake deleted file mode 100644 index aca0a4e2d..000000000 --- a/cmake/FindMiniZip.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# GPLv2 Licence - -find_path( - MiniZip_INCLUDE_DIR - minizip/zip.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - MiniZip_LIBRARY - NAMES minizip - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - MiniZip REQUIRED_VARS MiniZip_LIBRARY MiniZip_INCLUDE_DIR -) - -if (MiniZip_FOUND AND NOT TARGET MiniZip::MiniZip) - add_library(MiniZip::MiniZip UNKNOWN IMPORTED) - set_target_properties( - MiniZip::MiniZip PROPERTIES IMPORTED_LOCATION "${MiniZip_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${MiniZip_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(MiniZip_LIBRARY MiniZip_INCLUDE_DIR) diff --git a/cmake/FindOpenSSL.cmake b/cmake/FindOpenSSL.cmake deleted file mode 100644 index f7237699c..000000000 --- a/cmake/FindOpenSSL.cmake +++ /dev/null @@ -1,76 +0,0 @@ -# GPLv2 Licence - -find_path( - OpenSSL_INCLUDE_DIR - openssl/ssl.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - OpenSSL_CRYPTO_LIBRARY - NAMES crypto libcrypto - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_library( - OpenSSL_LIBRARY - NAMES ssl libssl - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -if (ANDROID) - # Android only note: on android platform we have both static openssl and shared openssl - # libraries required for Qt shared openssl should not be linked against!, it just need - # to be copied to APK for Qt - find_library( - KDAB_OpenSSL_CRYPTO_LIBRARY - NAMES crypto_3 - PATHS "${INPUT_SDK_PATH_MULTI}/lib/kdab-openssl" - NO_DEFAULT_PATH - ) - - find_library( - KDAB_OpenSSL_LIBRARY - NAMES ssl_3 - PATHS "${INPUT_SDK_PATH_MULTI}/lib/kdab-openssl" - NO_DEFAULT_PATH - ) -endif () - -if (ANDROID) - find_package_handle_standard_args( - OpenSSL - REQUIRED_VARS - OpenSSL_LIBRARY - OpenSSL_CRYPTO_LIBRARY - OpenSSL_INCLUDE_DIR - KDAB_OpenSSL_LIBRARY - KDAB_OpenSSL_CRYPTO_LIBRARY - ) -else () - find_package_handle_standard_args( - OpenSSL REQUIRED_VARS OpenSSL_LIBRARY OpenSSL_CRYPTO_LIBRARY OpenSSL_INCLUDE_DIR - ) -endif () - -if (OpenSSL_FOUND AND NOT TARGET OpenSSL::OpenSSL) - add_library(OpenSSL::OpenSSL UNKNOWN IMPORTED) - set_target_properties( - OpenSSL::OpenSSL PROPERTIES IMPORTED_LOCATION "${OpenSSL_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${OpenSSL_INCLUDE_DIR}" - ) - - add_library(OpenSSL::Crypto UNKNOWN IMPORTED) - set_target_properties( - OpenSSL::Crypto PROPERTIES IMPORTED_LOCATION "${OpenSSL_CRYPTO_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${OpenSSL_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(OpenSSL_LIBRARY OpenSSL_CRYPTO_LIBRARY OpenSSL_INCLUDE_DIR) -if (ANDROID) - mark_as_advanced(KDAB_OpenSSL_LIBRARY KDAB_OpenSSL_CRYPTO_LIBRARY) -endif () diff --git a/cmake/FindPq.cmake b/cmake/FindPq.cmake deleted file mode 100644 index 4b2f407c5..000000000 --- a/cmake/FindPq.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# GPLv2 Licence - -find_path( - Pq_INCLUDE_DIR - postgres_ext.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Pq_LIBRARY - NAMES pq libpq - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_library( - Pgport_LIBRARY - NAMES pgport libpgport - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_library( - Pgcommon_LIBRARY - NAMES pgcommon libpgcommon - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Pq REQUIRED_VARS Pq_LIBRARY Pq_INCLUDE_DIR) - -if (Pq_FOUND AND NOT TARGET Pq::Pq) - add_library(Pq::Pq UNKNOWN IMPORTED) - set_target_properties( - Pq::Pq PROPERTIES IMPORTED_LOCATION "${Pq_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES - "${Pq_INCLUDE_DIR}" - ) - - add_library(Pq::Pgport UNKNOWN IMPORTED) - set_target_properties(Pq::Pgport PROPERTIES IMPORTED_LOCATION "${Pgport_LIBRARY}") - - add_library(Pq::Pgcommon UNKNOWN IMPORTED) - set_target_properties(Pq::Pgcommon PROPERTIES IMPORTED_LOCATION "${Pgcommon_LIBRARY}") -endif () - -mark_as_advanced( - Pq_LIBRARY - Pgport_LIBRARY - Pgcommon_LIBRARY - Pq_INCLUDE_DIR -) diff --git a/cmake/FindProj.cmake b/cmake/FindProj.cmake deleted file mode 100644 index bed99f5ef..000000000 --- a/cmake/FindProj.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Proj_INCLUDE_DIR - proj.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Proj_LIBRARY - NAMES proj - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Proj REQUIRED_VARS Proj_LIBRARY Proj_INCLUDE_DIR) - -if (Proj_FOUND AND NOT TARGET Proj::Proj) - add_library(Proj::Proj STATIC IMPORTED) - set_target_properties( - Proj::Proj PROPERTIES IMPORTED_LOCATION "${Proj_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Proj_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Proj_LIBRARY Proj_INCLUDE_DIR) diff --git a/cmake/FindProtobuf.cmake b/cmake/FindProtobuf.cmake deleted file mode 100644 index 5bfa67146..000000000 --- a/cmake/FindProtobuf.cmake +++ /dev/null @@ -1,31 +0,0 @@ -# GPLv2 Licence - -find_path( - Protobuf_INCLUDE_DIR - google/protobuf/service.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Protobuf_lite_LIBRARY - NAMES protobuf-lite libprotobuf-lite - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - Protobuf REQUIRED_VARS Protobuf_lite_LIBRARY Protobuf_INCLUDE_DIR -) - -if (Protobuf_FOUND AND NOT TARGET Protobuf::Protobuf-lite) - add_library(Protobuf::Protobuf-lite UNKNOWN IMPORTED) - set_target_properties( - Protobuf::Protobuf-lite - PROPERTIES IMPORTED_LOCATION "${Protobuf_lite_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES - "${Protobuf_INCLUDE_DIR}" - ) - -endif () - -mark_as_advanced(Protobuf_lite_LIBRARY Protobuf_INCLUDE_DIR) diff --git a/cmake/FindQGIS.cmake b/cmake/FindQGIS.cmake index 82455e508..13f53a382 100644 --- a/cmake/FindQGIS.cmake +++ b/cmake/FindQGIS.cmake @@ -1,19 +1,9 @@ # GPLv2 Licence -find_path( - QGIS_INCLUDE_DIR - qgis.h - "${INPUT_SDK_PATH_MULTI}/include/qgis" - NO_DEFAULT_PATH -) - -find_library( - QGIS_CORE_LIBRARY - NAMES qgis_core - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) +find_path(QGIS_INCLUDE_DIR qgis.h PATH_SUFFIXES qgis) +find_library(QGIS_CORE_LIBRARY NAMES qgis_core) +find_path(QGIS_RESOURCE_DIR qgis.db PATH_SUFFIXES share/qgis/resources) -set(QGIS_REQUIRED_VARS QGIS_CORE_LIBRARY QGIS_INCLUDE_DIR) +set(QGIS_REQUIRED_VARS QGIS_CORE_LIBRARY QGIS_INCLUDE_DIR QGIS_RESOURCE_DIR) set(QGIS_PROVIDERS_LIST authmethod_basic authmethod_esritoken @@ -33,12 +23,7 @@ set(QGIS_PROVIDERS_LIST ) foreach (provider ${QGIS_PROVIDERS_LIST}) - find_library( - QGIS_${provider}_LIBRARY - NAMES ${provider}_a - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH - ) + find_library(QGIS_${provider}_LIBRARY NAMES ${provider}_a) set(QGIS_REQUIRED_VARS ${QGIS_REQUIRED_VARS} QGIS_${provider}_LIBRARY) endforeach () @@ -61,7 +46,7 @@ if (QGIS_FOUND AND NOT TARGET QGIS::Core) endif () -mark_as_advanced(QGIS_INCLUDE_DIR QGIS_CORE_LIBRARY) +mark_as_advanced(QGIS_INCLUDE_DIR QGIS_CORE_LIBRARY QGIS_RESOURCE_DIR) foreach (provider ${QGIS_PROVIDERS_LIST}) mark_as_advanced(QGIS_${provider}_LIBRARY) endforeach () diff --git a/cmake/FindQca.cmake b/cmake/FindQca.cmake deleted file mode 100644 index 56bd7730a..000000000 --- a/cmake/FindQca.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Qca_INCLUDE_DIR - QtCrypto/qca.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Qca_LIBRARY - NAMES qca - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Qca REQUIRED_VARS Qca_LIBRARY Qca_INCLUDE_DIR) - -if (Qca_FOUND AND NOT TARGET Qca::Qca) - add_library(Qca::Qca STATIC IMPORTED) - set_target_properties( - Qca::Qca PROPERTIES IMPORTED_LOCATION "${Qca_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES - "${Qca_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Qca_LIBRARY Qca_INCLUDE_DIR) diff --git a/cmake/FindQtkeychain.cmake b/cmake/FindQtkeychain.cmake deleted file mode 100644 index 73426db7b..000000000 --- a/cmake/FindQtkeychain.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# GPLv2 Licence - -find_path( - Qtkeychain_INCLUDE_DIR - qt6keychain/keychain.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Qtkeychain_LIBRARY - NAMES qt6keychain - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - Qtkeychain REQUIRED_VARS Qtkeychain_LIBRARY Qtkeychain_INCLUDE_DIR -) - -if (Qtkeychain_FOUND AND NOT TARGET Qtkeychain::Qtkeychain) - add_library(Qtkeychain::Qtkeychain STATIC IMPORTED) - set_target_properties( - Qtkeychain::Qtkeychain - PROPERTIES IMPORTED_LOCATION "${Qtkeychain_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES - "${Qtkeychain_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Qtkeychain_LIBRARY Qtkeychain_INCLUDE_DIR) diff --git a/cmake/FindSpatialindex.cmake b/cmake/FindSpatialindex.cmake index 2d7b6618d..b4ee8bde8 100644 --- a/cmake/FindSpatialindex.cmake +++ b/cmake/FindSpatialindex.cmake @@ -1,18 +1,8 @@ # GPLv2 Licence -find_path( - Spatialindex_INCLUDE_DIR - spatialindex/RTree.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) +find_path(Spatialindex_INCLUDE_DIR spatialindex/RTree.h) -find_library( - Spatialindex_LIBRARY - NAMES spatialindex spatialindex-64 - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) +find_library(Spatialindex_LIBRARY NAMES spatialindex spatialindex-64) find_package_handle_standard_args( Spatialindex REQUIRED_VARS Spatialindex_LIBRARY Spatialindex_INCLUDE_DIR diff --git a/cmake/FindSpatialite.cmake b/cmake/FindSpatialite.cmake index a6814fd32..5b3198f41 100644 --- a/cmake/FindSpatialite.cmake +++ b/cmake/FindSpatialite.cmake @@ -1,18 +1,8 @@ # GPLv2 Licence -find_path( - Spatialite_INCLUDE_DIR - spatialite.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) +find_path(Spatialite_INCLUDE_DIR spatialite.h) -find_library( - Spatialite_LIBRARY - NAMES spatialite - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) +find_library(Spatialite_LIBRARY NAMES spatialite) find_package_handle_standard_args( Spatialite REQUIRED_VARS Spatialite_LIBRARY Spatialite_INCLUDE_DIR diff --git a/cmake/FindSqlite3.cmake b/cmake/FindSqlite3.cmake deleted file mode 100644 index 5e54673a3..000000000 --- a/cmake/FindSqlite3.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# GPLv2 Licence - -find_path( - Sqlite3_INCLUDE_DIR - sqlite3.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Sqlite3_LIBRARY - NAMES sqlite3 - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - Sqlite3 REQUIRED_VARS Sqlite3_LIBRARY Sqlite3_INCLUDE_DIR -) - -if (Sqlite3_FOUND AND NOT TARGET Sqlite3::Sqlite3) - add_library(Sqlite3::Sqlite3 UNKNOWN IMPORTED) - set_target_properties( - Sqlite3::Sqlite3 PROPERTIES IMPORTED_LOCATION "${Sqlite3_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Sqlite3_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Sqlite3_LIBRARY Sqlite3_INCLUDE_DIR) diff --git a/cmake/FindTasn1.cmake b/cmake/FindTasn1.cmake index 63f30b47b..da3921c20 100644 --- a/cmake/FindTasn1.cmake +++ b/cmake/FindTasn1.cmake @@ -8,19 +8,9 @@ if (LNX ) message(FATAL_ERROR "tasn1 is not available for this platform in input-SDK") else () - find_path( - Tasn1_INCLUDE_DIR - libtasn1.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH - ) + find_path(Tasn1_INCLUDE_DIR libtasn1.h) - find_library( - Tasn1_LIBRARY - NAMES tasn1 - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH - ) + find_library(Tasn1_LIBRARY NAMES tasn1) endif () find_package_handle_standard_args(Tasn1 REQUIRED_VARS Tasn1_LIBRARY Tasn1_INCLUDE_DIR) diff --git a/cmake/FindTiff.cmake b/cmake/FindTiff.cmake deleted file mode 100644 index 7e97a47f9..000000000 --- a/cmake/FindTiff.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Tiff_INCLUDE_DIR - tiff.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Tiff_LIBRARY - NAMES tiff - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Tiff REQUIRED_VARS Tiff_LIBRARY Tiff_INCLUDE_DIR) - -if (Tiff_FOUND AND NOT TARGET Tiff::Tiff) - add_library(Tiff::Tiff UNKNOWN IMPORTED) - set_target_properties( - Tiff::Tiff PROPERTIES IMPORTED_LOCATION "${Tiff_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Tiff_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Tiff_LIBRARY Tiff_INCLUDE_DIR) diff --git a/cmake/FindUtf8.cmake b/cmake/FindUtf8.cmake deleted file mode 100644 index 499621371..000000000 --- a/cmake/FindUtf8.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# GPLv2 Licence - -find_library( - utf8_range_LIBRARY - NAMES libutf8_range utf8_range - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_library( - utf8_validity_LIBRARY - NAMES libutf8_validity utf8_validity - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - Utf8 REQUIRED_VARS utf8_range_LIBRARY utf8_validity_LIBRARY -) - -if (Utf8_FOUND AND NOT TARGET Utf8::utf8_range) - add_library(Utf8::utf8_range UNKNOWN IMPORTED) - set_target_properties( - Utf8::utf8_range PROPERTIES IMPORTED_LOCATION "${utf8_range_LIBRARY}" - ) -endif () - -if (Utf8_FOUND AND NOT TARGET Utf8::utf8_validity) - add_library(Utf8::utf8_validity UNKNOWN IMPORTED) - set_target_properties( - Utf8::utf8_validity PROPERTIES IMPORTED_LOCATION "${utf8_validity_LIBRARY}" - ) -endif () - -mark_as_advanced(utf8_range_LIBRARY utf8_validity_LIBRARY) diff --git a/cmake/FindWebP.cmake b/cmake/FindWebP.cmake deleted file mode 100644 index b98942a10..000000000 --- a/cmake/FindWebP.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# GPLv2 Licence - -find_path( - WebP_INCLUDE_DIR - webp/encode.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - WebP_LIBRARY - NAMES webp libwebp - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_library( - WebP_sharpyuv_LIBRARY - NAMES sharpyuv libsharpyuv - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args( - WebP REQUIRED_VARS WebP_LIBRARY WebP_sharpyuv_LIBRARY WebP_INCLUDE_DIR -) - -if (WebP_FOUND AND NOT TARGET WebP::WebP) - add_library(WebP::WebP UNKNOWN IMPORTED) - set_target_properties( - WebP::WebP PROPERTIES IMPORTED_LOCATION "${WebP_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${WebP_INCLUDE_DIR}" - ) - - add_library(WebP::Sharpyuv UNKNOWN IMPORTED) - set_target_properties( - WebP::Sharpyuv PROPERTIES IMPORTED_LOCATION "${WebP_sharpyuv_LIBRARY}" - ) -endif () - -mark_as_advanced(WebP_LIBRARY WebP_sharpyuv_LIBRARY WebP_INCLUDE_DIR) diff --git a/cmake/FindWinLibraries.cmake b/cmake/FindWinLibraries.cmake new file mode 100644 index 000000000..1f551bb5b --- /dev/null +++ b/cmake/FindWinLibraries.cmake @@ -0,0 +1,35 @@ +if (NOT WIN) + message(FATAL_ERROR "Windows libraries are not available on this platform") +endif () + +set(WIN_LIBRARIES + avcodec + avdevice + avformat + avutil + swresample + swscale + openh264 +) + +foreach (library ${WIN_LIBRARIES}) + find_library(WIN_${library}_LIBRARY NAMES ${library}) + set(WIN_REQUIRED_VARS ${WIN_REQUIRED_VARS} WIN_${library}_LIBRARY) +endforeach () + +find_package_handle_standard_args(WinLibraries REQUIRED_VARS ${WIN_REQUIRED_VARS}) + +if (WinLibraries_FOUND) + foreach (library ${WIN_LIBRARIES}) + if (NOT TARGET WinLibraries::${library}) + add_library(WinLibraries::${library} INTERFACE IMPORTED) + set_target_properties( + WinLibraries::${library} PROPERTIES IMPORTED_LOCATION ${library} + ) + endif () + endforeach () +endif () + +foreach (library ${WIN_LIBRARIES}) + mark_as_advanced(${WIN_${library}_LIBRARY}) +endforeach () diff --git a/cmake/FindXml2.cmake b/cmake/FindXml2.cmake deleted file mode 100644 index 4421b9d42..000000000 --- a/cmake/FindXml2.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# GPLv2 Licence - -find_library( - Xml2_LIBRARY - NAMES xml2 libxml2 - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Xml2 REQUIRED_VARS Xml2_LIBRARY) - -if (Xml2_FOUND AND NOT TARGET Xml2::Xml2) - add_library(Xml2::Xml2 UNKNOWN IMPORTED) - set_target_properties(Xml2::Xml2 PROPERTIES IMPORTED_LOCATION "${Xml2_LIBRARY}") -endif () - -mark_as_advanced(Xml2_LIBRARY) diff --git a/cmake/FindZLIB.cmake b/cmake/FindZLIB.cmake index 31efa027a..2b97c27c5 100644 --- a/cmake/FindZLIB.cmake +++ b/cmake/FindZLIB.cmake @@ -1,11 +1,6 @@ # GPLv2 Licence -find_library( - ZLIB_LIBRARY - NAMES z zlib libz - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) +find_library(ZLIB_LIBRARY NAMES z zlib libz) find_package_handle_standard_args(ZLIB REQUIRED_VARS ZLIB_LIBRARY) diff --git a/cmake/FindZXing.cmake b/cmake/FindZXing.cmake deleted file mode 100644 index f01b4ef8f..000000000 --- a/cmake/FindZXing.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - ZXing_INCLUDE_DIR - ZXing/ZXVersion.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - ZXing_LIBRARY - NAMES ZXing - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(ZXing REQUIRED_VARS ZXing_LIBRARY ZXing_INCLUDE_DIR) - -if (ZXing_FOUND AND NOT TARGET ZXing::ZXing) - add_library(ZXing::ZXing STATIC IMPORTED) - set_target_properties( - ZXing::ZXing PROPERTIES IMPORTED_LOCATION "${ZXing_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${ZXing_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(ZXing_LIBRARY ZXing_INCLUDE_DIR) diff --git a/cmake/FindZip.cmake b/cmake/FindZip.cmake deleted file mode 100644 index e00c7b371..000000000 --- a/cmake/FindZip.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Zip_INCLUDE_DIR - zip.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Zip_LIBRARY - NAMES zip - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Zip REQUIRED_VARS Zip_LIBRARY Zip_INCLUDE_DIR) - -if (Zip_FOUND AND NOT TARGET Zip::Zip) - add_library(Zip::Zip UNKNOWN IMPORTED) - set_target_properties( - Zip::Zip PROPERTIES IMPORTED_LOCATION "${Zip_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES - "${Zip_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Zip_LIBRARY Zip_INCLUDE_DIR) diff --git a/cmake/FindZstd.cmake b/cmake/FindZstd.cmake deleted file mode 100644 index 5ee36b99b..000000000 --- a/cmake/FindZstd.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# GPLv2 Licence - -find_path( - Zstd_INCLUDE_DIR - zstd.h - "${INPUT_SDK_PATH_MULTI}/include" - NO_DEFAULT_PATH -) - -find_library( - Zstd_LIBRARY - NAMES zstd libzstd - PATHS "${INPUT_SDK_PATH_MULTI}/lib" - NO_DEFAULT_PATH -) - -find_package_handle_standard_args(Zstd REQUIRED_VARS Zstd_LIBRARY Zstd_INCLUDE_DIR) - -if (Zstd_FOUND AND NOT TARGET Zstd::Zstd) - add_library(Zstd::Zstd UNKNOWN IMPORTED) - set_target_properties( - Zstd::Zstd PROPERTIES IMPORTED_LOCATION "${Zstd_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${Zstd_INCLUDE_DIR}" - ) -endif () - -mark_as_advanced(Zstd_LIBRARY Zstd_INCLUDE_DIR) diff --git a/cmake/InstallStep.cmake b/cmake/InstallStep.cmake index 76934f705..b652ebd05 100644 --- a/cmake/InstallStep.cmake +++ b/cmake/InstallStep.cmake @@ -1,21 +1,21 @@ # GPLv2 Licence -set(Qt6_base_dir ${Qt6_DIR}/../../..) +if (IOS OR ANDROID) + message(FATAL_ERROR "Install step cannot be called on IOS and Android") +endif () + +set(Qt6_base_dir ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/Qt6) # ######################################################################################## # Binary # ######################################################################################## if (WIN) - install( - TARGETS Input - LIBRARY DESTINATION lib/ - RUNTIME DESTINATION . - ) + install(TARGETS Input RUNTIME DESTINATION .) else () install( TARGETS Input - LIBRARY DESTINATION lib/ + LIBRARY DESTINATION lib64/ BUNDLE DESTINATION . ) endif () @@ -35,27 +35,33 @@ if (MACOS) set(executable_path "Input.app/Contents/MacOS/INPUT") - # https://doc-snapshots.qt.io/qt6-dev/qt-deploy-runtime-dependencies.html Replace with - # qt_generate_deploy_script from QT 6.5.x The following script must only be executed at - # install time Note: This command is in technology preview and may change in future - # releases. (QT 6.4.x) - file( - GENERATE - OUTPUT ${deploy_script} + qt_generate_deploy_script( + TARGET + Input + OUTPUT_SCRIPT + deploy_script CONTENT - " - include(\"${QT_DEPLOY_SUPPORT}\") - - qt_deploy_qml_imports(TARGET Input) - - qt_deploy_runtime_dependencies( - QML_DIR \"${qml_path}\" - EXECUTABLE \"${executable_path}\" - GENERATE_QT_CONF - )" + " + qt_deploy_runtime_dependencies( + EXECUTABLE \"${executable_path}\" + GENERATE_QT_CONF + )" ) - install(SCRIPT ${deploy_script}) + install(SCRIPT ${deploy_script} COMPONENT Runtime) + include(InstallRequiredSystemLibraries) + +elseif (WIN) + qt_generate_deploy_qml_app_script( + TARGET + Input + OUTPUT_SCRIPT + deploy_script + NO_TRANSLATIONS + DEPLOY_TOOL_OPTIONS + "--libdir . --plugindir . --force-openssl" + ) + install(SCRIPT ${deploy_script} COMPONENT Runtime) endif () # ######################################################################################## @@ -63,38 +69,26 @@ endif () # ######################################################################################## if (WIN) install( - DIRECTORY ${INPUT_SDK_PATH_MULTI}/bin/ + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/" DESTINATION . FILES_MATCHING PATTERN "*.dll" PATTERN "Qca" EXCLUDE ) install( - DIRECTORY ${INPUT_SDK_PATH_MULTI}/bin/Qca/crypto/ - DESTINATION . - FILES_MATCHING - PATTERN "*.dll" - ) - install( - DIRECTORY ${INPUT_SDK_PATH_MULTI}/tools/qgis/plugins/ + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/Qca/crypto/" DESTINATION . FILES_MATCHING PATTERN "*.dll" ) elseif (LNX) install( - DIRECTORY ${INPUT_SDK_PATH_MULTI}/lib/ - DESTINATION lib/ + DIRECTORY ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/ + DESTINATION lib64 FILES_MATCHING - PATTERN "*.so" - PATTERN "qca-qt6" EXCLUDE - ) - install( - DIRECTORY ${INPUT_SDK_PATH_MULTI}/lib/qca-qt6/crypto/ - DESTINATION lib/ - FILES_MATCHING - PATTERN "*.so" + PATTERN "*.so*" ) + endif () # ######################################################################################## @@ -112,13 +106,7 @@ set(qml_dirs ) foreach (qml_dir ${qml_dirs}) - if (WIN) - install( - DIRECTORY ${Qt6_base_dir}/qml/${qml_dir} - DESTINATION qml - PATTERN "*d.dll" EXCLUDE - ) - elseif (LNX) + if (LNX) install( DIRECTORY ${Qt6_base_dir}/qml/${qml_dir} DESTINATION qml @@ -137,32 +125,19 @@ set(plugins_dirs ) foreach (plugins_dir ${plugins_dirs}) - if (WIN) + if (LNX) install( DIRECTORY ${Qt6_base_dir}/plugins/${plugins_dir} - DESTINATION . - PATTERN "*d.dll" EXCLUDE - ) - elseif (LNX) - install( - DIRECTORY ${Qt6_base_dir}/plugins/${plugins_dir} - DESTINATION plugins/ + DESTINATION ${CMAKE_INSTALL_BINDIR} PATTERN "*d.so" EXCLUDE ) endif () endforeach () -# tls has names like *backend[d].dll so excluding *d.dll doesn't work -if (WIN) - install( - DIRECTORY ${Qt6_base_dir}/plugins/tls - DESTINATION . - PATTERN "*dd.dll" EXCLUDE - ) -elseif (LNX) +if (LNX) install( DIRECTORY ${Qt6_base_dir}/plugins/tls - DESTINATION plugins/ + DESTINATION ${CMAKE_INSTALL_BINDIR} PATTERN "*dd.so" EXCLUDE ) endif () @@ -176,7 +151,6 @@ set(qt_libs Designer DesignerComponents Gui - Help LabsAnimation LabsFolderListModel LabsQmlModels @@ -202,7 +176,6 @@ set(qt_libs QmlWorkerScript QmlXmlListModel Quick - Quick3DSpatialAudio QuickControls2 QuickControls2Basic QuickControls2BasicStyleImpl @@ -230,19 +203,13 @@ set(qt_libs ) foreach (qt_lib ${qt_libs}) - if (WIN) - install(FILES ${Qt6_base_dir}/bin/Qt6${qt_lib}.dll DESTINATION .) - elseif (LNX) - install(FILES ${Qt6_base_dir}/lib/libQt6${qt_lib}.so DESTINATION .) + if (LNX) + install(FILES ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libQt6${qt_lib}.so + DESTINATION lib64 + ) endif () endforeach () -if (WIN) - install(FILES ${Qt6_base_dir}/bin/d3dcompiler_47.dll ${Qt6_base_dir}/bin/opengl32sw.dll - DESTINATION . - ) -endif () - # ######################################################################################## # Translations # ######################################################################################## @@ -272,7 +239,9 @@ elseif (MACOS) set(assets_dir "Input.app/Contents/Resources/INPUT") endif () -install(DIRECTORY app/android/assets/qgis-data DESTINATION ${assets_dir}) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app/android/assets/qgis-data + DESTINATION ${assets_dir} +) # ######################################################################################## # Platform diff --git a/cmake/PlatformDetect.cmake b/cmake/PlatformDetect.cmake index cdffaa96a..e22ce6962 100644 --- a/cmake/PlatformDetect.cmake +++ b/cmake/PlatformDetect.cmake @@ -2,10 +2,7 @@ # needs to be called after project() command so toolchains are already evaluated macro (mm_detect_platform) - if (DEFINED ENV{INPUT_SDK_ANDROID_BASE} - OR ANDROID - OR CMAKE_SYSTEM_NAME STREQUAL "Android" - ) + if (ANDROID_ABI OR CMAKE_SYSTEM_NAME STREQUAL "Android") # android can be build on any host platform set(ANDROID TRUE) else () diff --git a/cmake_templates/build.gradle.in b/cmake_templates/build.gradle.in index 76aa2b38f..ac88401d9 100644 --- a/cmake_templates/build.gradle.in +++ b/cmake_templates/build.gradle.in @@ -46,8 +46,7 @@ android { compileSdkVersion androidCompileSdkVersion buildToolsVersion androidBuildToolsVersion ndkVersion androidNdkVersion - ndkPath '@INPUT_ANDROID_NDK_PATH@' - + packagingOptions.jniLibs.useLegacyPackaging true sourceSets { diff --git a/cmake_templates/inputconfig.h.in b/cmake_templates/inputconfig.h.in index 20e6c5c62..d165bd871 100644 --- a/cmake_templates/inputconfig.h.in +++ b/cmake_templates/inputconfig.h.in @@ -8,6 +8,7 @@ #cmakedefine INPUT_VERSION_CODE @INPUT_VERSION_CODE@ #cmakedefine QGIS_QUICK_DATA_PATH @QGIS_QUICK_DATA_PATH@ +#cmakedefine MM_FORMATS_PATH @MM_FORMATS_PATH@ #cmakedefine INPUT_TEST #cmakedefine TEST_DATA_DIR "@TEST_DATA_DIR@" diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index e11668931..ff66a2021 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -59,7 +59,7 @@ else () message(STATUS "Using QSettings to store credentials.") endif () -add_library(mm_core OBJECT ${MM_CORE_SRCS} ${MM_CORE_HDRS}) +add_library(mm_core STATIC ${MM_CORE_SRCS} ${MM_CORE_HDRS}) target_include_directories(mm_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( mm_core diff --git a/docs/supported_formats.txt b/docs/supported_formats.txt new file mode 100644 index 000000000..b968cc26c --- /dev/null +++ b/docs/supported_formats.txt @@ -0,0 +1,246 @@ +===== GDAL Formats ===== +Supported Formats: (ro:read-only, rw:read-write, +:update, v:virtual-I/O s:subdatasets) + VRT -raster,multidimensional raster- (rw+v): Virtual Raster (*.vrt) + DERIVED -raster- (ro): Derived datasets using VRT pixel functions + GTI -raster- (rov): GDAL Raster Tile Index (*.gti.gpkg, *.gti.fgb, *.gti) + SNAP_TIFF -raster- (rov): Sentinel Application Processing GeoTIFF + GTiff -raster- (rw+vs): GeoTIFF (*.tif, *.tiff) + COG -raster- (wv): Cloud optimized GeoTIFF generator (*.tif, *.tiff) + NITF -raster- (rw+vs): National Imagery Transmission Format (*.ntf) + RPFTOC -raster- (rovs): Raster Product Format TOC format (*.toc) + ECRGTOC -raster- (rovs): ECRG TOC format (*.xml) + HFA -raster- (rw+v): Erdas Imagine Images (.img) (*.img) + SAR_CEOS -raster- (rov): CEOS SAR Image + CEOS -raster- (rov): CEOS Image + JAXAPALSAR -raster- (rov): JAXA PALSAR Product Reader (Level 1.1/1.5) + GFF -raster- (rov): Ground-based SAR Applications Testbed File Format (.gff) (*.gff) + ELAS -raster- (rw+v): ELAS + ESRIC -raster- (rov): Esri Compact Cache (*.json, *.tpkx) + AIG -raster- (rov): Arc/Info Binary Grid + AAIGrid -raster- (rwv): Arc/Info ASCII Grid (*.asc) + GRASSASCIIGrid -raster- (rov): GRASS ASCII Grid + ISG -raster- (rov): International Service for the Geoid (*.isg) + SDTS -raster- (rov): SDTS Raster (*.ddf) + DTED -raster- (rwv): DTED Elevation Raster (*.dt0, *.dt1, *.dt2) + PNG -raster- (rwv): Portable Network Graphics (*.png) + JPEG -raster- (rwv): JPEG JFIF (*.jpg, *.jpeg) + MEM -raster,multidimensional raster- (rw+): In Memory Raster + JDEM -raster- (rov): Japanese DEM (.mem) (*.mem) + GIF -raster- (rwv): Graphics Interchange Format (.gif) (*.gif) + BIGGIF -raster- (rov): Graphics Interchange Format (.gif) (*.gif) + ESAT -raster- (rov): Envisat Image Format (*.n1) + BSB -raster- (rov): Maptech BSB Nautical Charts (*.kap) + XPM -raster- (rwv): X11 PixMap Format (*.xpm) + BMP -raster- (rw+v): MS Windows Device Independent Bitmap (*.bmp) + DIMAP -raster- (rovs): SPOT DIMAP + AirSAR -raster- (rov): AirSAR Polarimetric Image + RS2 -raster- (rovs): RadarSat 2 XML Product + SAFE -raster- (rov): Sentinel-1 SAR SAFE Product + PCIDSK -raster,vector- (rw+v): PCIDSK Database File (*.pix) + PCRaster -raster- (rw+): PCRaster Raster File (*.map) + ILWIS -raster- (rw+v): ILWIS Raster Map (*.mpr, *.mpl) + SGI -raster- (rw+v): SGI Image File Format 1.0 (*.rgb) + SRTMHGT -raster- (rwv): SRTMHGT File Format (*.hgt) + Leveller -raster- (rw+v): Leveller heightfield (*.ter) + Terragen -raster- (rw+v): Terragen heightfield (*.ter) + netCDF -raster,multidimensional raster,vector- (rw+vs): Network Common Data Format (*.nc) + ISIS3 -raster- (rw+v): USGS Astrogeology ISIS cube (Version 3) (*.lbl, *.cub) + ISIS2 -raster- (rw+v): USGS Astrogeology ISIS cube (Version 2) + PDS -raster- (rov): NASA Planetary Data System + PDS4 -raster,vector- (rw+vs): NASA Planetary Data System 4 (*.xml) + VICAR -raster,vector- (rw+v): MIPL VICAR file + TIL -raster- (rov): EarthWatch .TIL + ERS -raster- (rw+v): ERMapper .ers Labelled (*.ers) + JP2OpenJPEG -raster,vector- (rwv): JPEG-2000 driver based on JP2OpenJPEG library (*.jp2, *.j2k) + L1B -raster- (rovs): NOAA Polar Orbiter Level 1b Data Set + FIT -raster- (rwv): FIT Image + GRIB -raster,multidimensional raster- (rwv): GRIdded Binary (.grb, .grb2) (*.grb, *.grb2, *.grib2) + RMF -raster- (rw+v): Raster Matrix Format (*.rsw) + WCS -raster- (rovs): OGC Web Coverage Service + WMS -raster- (rwvs): OGC Web Map Service + MSGN -raster- (rov): EUMETSAT Archive native (.nat) (*.nat) + RST -raster- (rw+v): Idrisi Raster A.1 (*.rst) + GSAG -raster- (rwv): Golden Software ASCII Grid (.grd) (*.grd) + GSBG -raster- (rw+v): Golden Software Binary Grid (.grd) (*.grd) + GS7BG -raster- (rw+v): Golden Software 7 Binary Grid (.grd) (*.grd) + COSAR -raster- (rov): COSAR Annotated Binary Matrix (TerraSAR-X) + TSX -raster- (rov): TerraSAR-X Product + COASP -raster- (ro): DRDC COASP SAR Processor Raster (*.hdr) + R -raster- (rwv): R Object Data Store (*.rda) + MAP -raster- (rov): OziExplorer .MAP + KMLSUPEROVERLAY -raster- (rwv): Kml Super Overlay (*.kml, *.kmz) + WEBP -raster- (rwv): WEBP (*.webp) + PDF -raster,vector- (w+): Geospatial PDF (*.pdf) + Rasterlite -raster- (rwvs): Rasterlite (*.sqlite) + MBTiles -raster,vector- (rw+v): MBTiles (*.mbtiles) + PLMOSAIC -raster- (ro): Planet Labs Mosaics API + CALS -raster- (rwv): CALS (Type 1) (*.cal, *.ct1) + WMTS -raster- (rwv): OGC Web Map Tile Service + SENTINEL2 -raster- (rovs): Sentinel 2 + MRF -raster- (rw+v): Meta Raster Format (*.mrf) + PNM -raster- (rw+v): Portable Pixmap Format (netpbm) (*.pgm, *.ppm, *.pnm) + DOQ1 -raster- (rov): USGS DOQ (Old Style) + DOQ2 -raster- (rov): USGS DOQ (New Style) + PAux -raster- (rw+v): PCI .aux Labelled + MFF -raster- (rw+v): Vexcel MFF Raster (*.hdr) + MFF2 -raster- (rw+): Vexcel MFF2 (HKV) Raster + GSC -raster- (rov): GSC Geogrid + FAST -raster- (rov): EOSAT FAST Format + BT -raster- (rw+v): VTP .bt (Binary Terrain) 1.3 Format (*.bt) + LAN -raster- (rw+v): Erdas .LAN/.GIS + CPG -raster- (rov): Convair PolGASP + NDF -raster- (rov): NLAPS Data Format + EIR -raster- (rov): Erdas Imagine Raw + DIPEx -raster- (rov): DIPEx + LCP -raster- (rwv): FARSITE v.4 Landscape File (.lcp) (*.lcp) + GTX -raster- (rw+v): NOAA Vertical Datum .GTX (*.gtx) + LOSLAS -raster- (rov): NADCON .los/.las Datum Grid Shift + NTv2 -raster- (rw+vs): NTv2 Datum Grid Shift (*.gsb, *.gvb) + CTable2 -raster- (rw+v): CTable2 Datum Grid Shift + ACE2 -raster- (rov): ACE2 (*.ACE2) + SNODAS -raster- (rov): Snow Data Assimilation System (*.hdr) + KRO -raster- (rw+v): KOLOR Raw (*.kro) + ROI_PAC -raster- (rw+v): ROI_PAC raster + RRASTER -raster- (rw+v): R Raster (*.grd) + BYN -raster- (rw+v): Natural Resources Canada's Geoid (*.byn, *.err) + NOAA_B -raster- (rov): NOAA GEOCON/NADCON5 .b format (*.b) + NSIDCbin -raster- (rov): NSIDC Sea Ice Concentrations binary (.bin) (*.bin) + RIK -raster- (rov): Swedish Grid RIK (.rik) (*.rik) + USGSDEM -raster- (rwv): USGS Optional ASCII DEM (and CDED) (*.dem) + GXF -raster- (rov): GeoSoft Grid Exchange Format (*.gxf) + BAG -raster,multidimensional raster,vector- (rw+v): Bathymetry Attributed Grid (*.bag) + S102 -raster,multidimensional raster- (rovs): S-102 Bathymetric Surface Product (*.h5) + S104 -raster,multidimensional raster- (rov): S-104 Water Level Information for Surface Navigation Product (*.h5) + S111 -raster,multidimensional raster- (rov): Surface Currents Product (*.h5) + HDF5 -raster,multidimensional raster- (rovs): Hierarchical Data Format Release 5 (*.h5, *.hdf5) + HDF5Image -raster- (rov): HDF5 Dataset + NWT_GRD -raster- (rw+v): Northwood Numeric Grid Format .grd/.tab (*.grd) + NWT_GRC -raster- (rov): Northwood Classified Grid Format .grc/.tab (*.grc) + ADRG -raster- (rw+vs): ARC Digitized Raster Graphics (*.gen) + SRP -raster- (rovs): Standard Raster Product (ASRP/USRP) (*.img) + BLX -raster- (rwv): Magellan topo (.blx) (*.blx) + PostGISRaster -raster- (rws): PostGIS Raster driver + SAGA -raster- (rw+v): SAGA GIS Binary Grid (.sdat, .sg-grd-z) (*.sdat, *.sg-grd-z) + XYZ -raster- (rwv): ASCII Gridded XYZ (*.xyz) + HF2 -raster- (rwv): HF2/HFZ heightfield raster (*.hf2) + OZI -raster- (rov): OziExplorer Image File + CTG -raster- (rov): USGS LULC Composite Theme Grid + ZMap -raster- (rwv): ZMap Plus Grid (*.dat) + NGSGEOID -raster- (rov): NOAA NGS Geoid Height Grids (*.bin) + IRIS -raster- (rov): IRIS data (.PPI, .CAPPi etc) (*.ppi) + PRF -raster- (rov): Racurs PHOTOMOD PRF (*.prf) + EEDAI -raster- (ros): Earth Engine Data API Image + DAAS -raster- (ro): Airbus DS Intelligence Data As A Service driver + SIGDEM -raster- (rwv): Scaled Integer Gridded DEM .sigdem (*.sigdem) + TGA -raster- (rov): TGA/TARGA Image File Format (*.tga) + OGCAPI -raster,vector- (rov): OGCAPI + STACTA -raster- (rovs): Spatio-Temporal Asset Catalog Tiled Assets (*.json) + STACIT -raster- (rovs): Spatio-Temporal Asset Catalog Items + GPKG -raster,vector- (rw+vs): GeoPackage (*.gpkg, *.gpkg.zip) + OpenFileGDB -raster,vector- (rw+v): ESRI FileGDB (*.gdb) + PLSCENES -raster,vector- (ro): Planet Labs Scenes API + NGW -raster,vector- (rw+s): NextGIS Web + GenBin -raster- (rov): Generic Binary (.hdr Labelled) + ENVI -raster- (rw+v): ENVI .hdr Labelled + EHdr -raster- (rw+v): ESRI .hdr Labelled (*.bil) + ISCE -raster- (rw+v): ISCE raster + Zarr -raster,multidimensional raster- (rw+vs): Zarr + HTTP -raster,vector- (ro): HTTP Fetching Wrapper + +===== OGR Formats ===== +Supported Formats: (ro:read-only, rw:read-write, +:update, v:virtual-I/O s:subdatasets) + PCIDSK -raster,vector- (rw+v): PCIDSK Database File (*.pix) + netCDF -raster,multidimensional raster,vector- (rw+vs): Network Common Data Format (*.nc) + PDS4 -raster,vector- (rw+vs): NASA Planetary Data System 4 (*.xml) + VICAR -raster,vector- (rw+v): MIPL VICAR file + JP2OpenJPEG -raster,vector- (rwv): JPEG-2000 driver based on JP2OpenJPEG library (*.jp2, *.j2k) + PDF -raster,vector- (w+): Geospatial PDF (*.pdf) + MBTiles -raster,vector- (rw+v): MBTiles (*.mbtiles) + BAG -raster,multidimensional raster,vector- (rw+v): Bathymetry Attributed Grid (*.bag) + EEDA -vector- (ro): Earth Engine Data API + OGCAPI -raster,vector- (rov): OGCAPI + ESRI Shapefile -vector- (rw+v): ESRI Shapefile (*.shp, *.dbf, *.shz, *.shp.zip) + MapInfo File -vector- (rw+v): MapInfo File (*.tab, *.mif, *.mid) + UK .NTF -vector- (rov): UK .NTF + LVBAG -vector- (rov): Kadaster LV BAG Extract 2.0 (*.xml) + OGR_SDTS -vector- (rov): SDTS + S57 -vector- (rw+v): IHO S-57 (ENC) (*.000) + DGN -vector- (rw+v): Microstation DGN (*.dgn) + OGR_VRT -vector- (rov): VRT - Virtual Datasource (*.vrt) + Memory -vector- (rw+): Memory + CSV -vector- (rw+v): Comma Separated Value (.csv) (*.csv, *.tsv, *.psv) + GML -vector- (rw+v): Geography Markup Language (GML) (*.gml, *.xml) + GPX -vector- (rw+v): GPX (*.gpx) + LIBKML -vector- (rw+v): Keyhole Markup Language (LIBKML) (*.kml, *.kmz) + KML -vector- (rw+v): Keyhole Markup Language (KML) (*.kml) + GeoJSON -vector- (rw+v): GeoJSON (*.json, *.geojson) + GeoJSONSeq -vector- (rw+v): GeoJSON Sequence (*.geojsonl, *.geojsons) + ESRIJSON -vector- (rov): ESRIJSON (*.json) + TopoJSON -vector- (rov): TopoJSON (*.json, *.topojson) + OGR_GMT -vector- (rw+v): GMT ASCII Vectors (.gmt) (*.gmt) + GPKG -raster,vector- (rw+vs): GeoPackage (*.gpkg, *.gpkg.zip) + SQLite -vector- (rw+v): SQLite / Spatialite (*.sqlite, *.db) + WAsP -vector- (rw+v): WAsP .map format (*.map) + PostgreSQL -vector- (rw+): PostgreSQL/PostGIS + OpenFileGDB -raster,vector- (rw+v): ESRI FileGDB (*.gdb) + DXF -vector- (rw+v): AutoCAD DXF (*.dxf) + FlatGeobuf -vector- (rw+v): FlatGeobuf (*.fgb) + Geoconcept -vector- (rw+v): Geoconcept (*.gxt, *.txt) + GeoRSS -vector- (rw+v): GeoRSS + VFK -vector- (ro): Czech Cadastral Exchange Data Format (*.vfk) + PGDUMP -vector- (w+v): PostgreSQL SQL dump (*.sql) + OSM -vector- (rov): OpenStreetMap XML and PBF (*.osm, *.pbf) + GPSBabel -vector- (rw+): GPSBabel (*.mps, *.gdb, *.osm, *.tcx, *.igc) + OGR_PDS -vector- (rov): Planetary Data Systems TABLE + WFS -vector- (rov): OGC WFS (Web Feature Service) + OAPIF -vector- (ro): OGC API - Features + EDIGEO -vector- (rov): French EDIGEO exchange format (*.thf) + SVG -vector- (rov): Scalable Vector Graphics (*.svg) + Idrisi -vector- (rov): Idrisi Vector (.vct) (*.vct) + ODS -vector- (rw+v): Open Document/ LibreOffice / OpenOffice Spreadsheet (*.ods) + XLSX -vector- (rw+v): MS Office Open XML spreadsheet (*.xlsx, *.xlsm) + Elasticsearch -vector- (rw+): Elastic Search + Carto -vector- (rw+): Carto + AmigoCloud -vector- (rw+): AmigoCloud + SXF -vector- (rov): Storage and eXchange Format (*.sxf) + Selafin -vector- (rw+v): Selafin + JML -vector- (rw+v): OpenJUMP JML (*.jml) + PLSCENES -raster,vector- (ro): Planet Labs Scenes API + CSW -vector- (ro): OGC CSW (Catalog Service for the Web) + VDV -vector- (rw+v): VDV-451/VDV-452/INTREST Data Format (*.txt, *.x10) + MVT -vector- (rw+v): Mapbox Vector Tiles (*.mvt, *.mvt.gz, *.pbf) + NGW -raster,vector- (rw+s): NextGIS Web + MapML -vector- (rw+v): MapML + GTFS -vector- (rov): General Transit Feed Specification (*.zip) + PMTiles -vector- (rw+v): ProtoMap Tiles (*.pmtiles) + JSONFG -vector- (rw+v): OGC Features and Geometries JSON (*.json) + MiraMonVector -vector- (rw+v): MiraMon Vectors (.pol, .arc, .pnt) (*.pol, *.arc, *.pnt) + TIGER -vector- (rov): U.S. Census TIGER/Line + AVCBin -vector- (rov): Arc/Info Binary Coverage + AVCE00 -vector- (rov): Arc/Info E00 (ASCII) Coverage (*.e00) + HTTP -raster,vector- (ro): HTTP Fetching Wrapper + +===== QGIS Formats ===== +OGC API - Features data provider +WFS data provider +ArcGIS Feature Service data provider +ArcGIS Map Service data provider +ArcGIS Vector Tile Service data provider +Cesium 3D Tiles data provider +Delimited text data provider +GDAL data provider +MBTile Vector Tiles data provider +Memory provider +Mesh memory provider +OGR data provider +PostgreSQL/PostGIS data provider +Cesium Quantized Mesh tiles +OGC SensorThings API data provider +SpatiaLite data provider +Tiled scene provider +Vector tile provider +Virtual layer data provider +VTPK Vector Tiles data provider +OGC Web Coverage Service version 1.0/1.1 data provider +OGC Web Map Service version 1.3 data provider +XYZ Vector Tiles data provider diff --git a/scripts/input_win.nsi b/scripts/MM_win.nsi similarity index 93% rename from scripts/input_win.nsi rename to scripts/MM_win.nsi index ac293f5a4..d33147f56 100644 --- a/scripts/input_win.nsi +++ b/scripts/MM_win.nsi @@ -1,4 +1,4 @@ -!define APPNAME "Mergin Maps Input" +!define APPNAME "Mergin Maps" !define COMPANYNAME "Lutra Consulting Ltd." !define DESCRIPTION "Survey made easy" !define HELPURL "https://merginmaps.com/docs" @@ -9,11 +9,11 @@ RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on InstallDir "$PROGRAMFILES64\${COMPANYNAME}\${APPNAME}" -LicenseData "C:\input-package\stage\license.txt" +LicenseData "C:\mm-package\stage\license.txt" # This will be in the installer/uninstaller's title bar Name "${COMPANYNAME} - ${APPNAME}" -Icon "C:\input-package\stage\images\AppIcon.ico" -outFile "C:\input-package\inputapp-win-x86_64.exe" +Icon "C:\mm-package\stage\images\AppIcon.ico" +outFile "C:\mm-package\merginmaps-app-win-x86_64.exe" !include LogicLib.nsh @@ -38,14 +38,14 @@ functionEnd section "Visual Studio Runtime" SetOutPath "$INSTDIR" - File "C:\input-package\stage\vc_redist.x64.exe" + File "C:\mm-package\stage\vc_redist.x64.exe" ExecWait "$INSTDIR\vc_redist.x64.exe" sectionEnd section "install" setOutPath $INSTDIR - File /r "C:\input-package\stage\*" + File /r "C:\mm-package\stage\*" writeUninstaller "$INSTDIR\uninstall.exe" diff --git a/scripts/create_dmg.sh b/scripts/create_dmg.sh new file mode 100755 index 000000000..0c54a2a41 --- /dev/null +++ b/scripts/create_dmg.sh @@ -0,0 +1,53 @@ +#!/bin/bash +set -euo pipefail + +# Required environment variables: +# APP_PATH: Path to your .app bundle +# DMG_PATH: Path to your .dmg file +# P12_PATH: Path to your .p12 certificate file +# P12_PASSWORD: Password for the .p12 file +# API_KEY_ID: App Store Connect API Key ID +# API_KEY_ISSUER_ID: App Store Connect API Key Issuer ID +# API_KEY_PATH: Path to the API key file (.p8) + +if [[ -n ${API_KEY_ID:-} ]]; then + KEYCHAIN_NAME="notary-keychain" + KEYCHAIN_PASSWORD="temp-password" + security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_NAME" + security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_NAME" + security import "$P12_PATH" -k "$KEYCHAIN_NAME" -P "$P12_PASSWORD" -T /usr/bin/codesign + security set-keychain-settings -t 3600 -l "$KEYCHAIN_NAME" + security list-keychains -d user -s "$KEYCHAIN_NAME" $(security list-keychains -d user | tr -d '"') + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_NAME" + + # Sign the .app bundle + codesign --force --options runtime --sign "Developer ID Application" --deep --keychain "$KEYCHAIN_NAME" "$APP_PATH" +fi + +create-dmg --volname "Mergin Maps Mobile App Installer" \ + --hide-extension "Input.app" \ + --window-pos 200 120 \ + --window-size 512 320 \ + --icon-size 100 \ + --icon "Input.app" 130 160 \ + --app-drop-link 400 155 \ + "$DMG_PATH" "$APP_PATH" + +if [[ -n ${API_KEY_ID:-} ]]; then + codesign --force --options runtime --sign "Developer ID Application" --keychain "$KEYCHAIN_NAME" "$DMG_PATH" + + echo "Submitting for notarization..." + xcrun notarytool submit "$DMG_PATH" \ + --key "$API_KEY_PATH" \ + --key-id "$API_KEY_ID" \ + --issuer "$API_KEY_ISSUER_ID" \ + --wait + + # Staple the notarization ticket + xcrun stapler staple "$DMG_PATH" + + # Clean up keychain + security delete-keychain "$KEYCHAIN_NAME" + + echo "Notarization and stapling complete!" +fi diff --git a/scripts/format_cmake.bash b/scripts/format_cmake.bash index fcdd4c687..f44eea503 100755 --- a/scripts/format_cmake.bash +++ b/scripts/format_cmake.bash @@ -15,7 +15,7 @@ if [ $? -ne 0 ]; then exit 1 fi -FILES=`find .. -name \*.cmake\* -print -o -name \CMakeLists.txt -print | grep -v build` +FILES=`find .. -name \*.cmake\* -print -o -name \CMakeLists.txt -print | grep -v build | grep -v vcpkg/` for FILE in $FILES; do cmake-format -c cmake_format_config.py --check $FILE diff --git a/scripts/update_all_versions.bash b/scripts/update_all_versions.bash index 47dac957c..373a7c617 100755 --- a/scripts/update_all_versions.bash +++ b/scripts/update_all_versions.bash @@ -34,4 +34,13 @@ echo "patching $CITATION_FILE" sed -i.orig -E "s|cff-version: [0-9]+\.[0-9]+\.[0-9]+|cff-version: $MAJOR\.$MINOR\.$BUILD|g" $CITATION_FILE rm -f $CITATION_FILE.orig +# vcpkg.json +VCPKG_FILE=$DIR/../vcpkg.json +echo "patching $VCPKG_FILE" +sed -i.orig -E "s|\"version\": \"[0-9]+\.[0-9]+\.[0-9]+\"|\"version\": \"$MAJOR\.$MINOR\.$BUILD\"|g" $VCPKG_FILE +rm -f $VCPKG_FILE.orig + echo "patching done" + +$DIR/update_supported_formats.bash +echo "Updated supported formats" \ No newline at end of file diff --git a/scripts/update_qt_version.bash b/scripts/update_qt_version.bash deleted file mode 100755 index 6d230aa65..000000000 --- a/scripts/update_qt_version.bash +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "update_qt_version.bash MAJOR.MINOR.BUILD" - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -VERSION=$1 -VER_PARTS=(${VERSION//./ }) -MAJOR=${VER_PARTS[0]} -MINOR=${VER_PARTS[1]} -BUILD=${VER_PARTS[2]} - -echo "using QT version $MAJOR.$MINOR.$BUILD" - -############ -# CMakeLists -CMAKE_FILE=$DIR/../CMakeLists.txt -echo "patching $CMAKE_FILE" -# e.g. set(QT_VERSION_DEFAULT "6.5.2") -sed -i.orig -E "s|QT_VERSION_DEFAULT \"[0-9]+.[0-9]+.[0-9]+\"|QT_VERSION_DEFAULT \"${VERSION}\"|g" $CMAKE_FILE -rm -f $CMAKE_FILE.orig - -############ -# INSTALL.md -INSTALL_FILE=$DIR/../INSTALL.md -echo "patching $INSTALL_FILE" -# e.g. /Qt/6.5.2/ unix style -sed -i.orig -E "s|/Qt/[0-9]+.[0-9]+.[0-9]+/|/Qt/${VERSION}/|g" $INSTALL_FILE -# e.g. \Qt\6.5.2\ win style -sed -i.orig -E "s|\\\Qt\\\[0-9]+.[0-9]+.[0-9]+\\\|\\\Qt\\\\${VERSION}\\\|g" $INSTALL_FILE -rm -f $INSTALL_FILE.orig - -############ -# WORKFLOWS -for FNAME in \ - $DIR/../.github/workflows/android.yml \ - $DIR/../.github/workflows/code_style.yml \ - $DIR/../.github/workflows/gallery.yml \ - $DIR/../.github/workflows/i18n.yml \ - $DIR/../.github/workflows/ios.yml \ - $DIR/../.github/workflows/linux.yml \ - $DIR/../.github/workflows/macos.yml \ - $DIR/../.github/workflows/macos_arm64.yml \ - $DIR/../.github/workflows/win.yml -do - echo "patching $FNAME" - # e.g. QT_VERSION: '6.5.2' - sed -i.orig -E "s|QT_VERSION: '[0-9]+.[0-9]+.[0-9]+'|QT_VERSION: '${VERSION}'|g" $FNAME - rm -f $FNAME.orig -done - -# DONE -echo "patching done" diff --git a/scripts/update_supported_formats.bash b/scripts/update_supported_formats.bash new file mode 100755 index 000000000..f87ce89ab --- /dev/null +++ b/scripts/update_supported_formats.bash @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +TOOLS_DIR="$PROJECT_DIR/build/vcpkg_installed/x64-linux/tools/gdal" + +# Find the tools directory dynamically in (x64-linux | x64-osx | arm64-osx) +TOOLS_DIR=$(find "$PROJECT_DIR/build/vcpkg_installed" -maxdepth 2 -type d \ + \( -name "x64-linux" -o -name "x64-osx" -o -name "arm64-osx" \) \ + -exec echo {}/tools/gdal \; | head -n 1) + +if [[ -z "$TOOLS_DIR" ]]; then + echo "Error: Could not find tools/gdal directory under build/vcpkg_installed." + exit 1 +fi + +GDALINFO="$TOOLS_DIR/gdalinfo" +OGRINFO="$TOOLS_DIR/ogrinfo" +OUTPUT_FILE="$PROJECT_DIR/docs/supported_formats.txt" + +# Function to check if a command exists +check_command() { + local cmd="$1" + if [[ ! -x "$cmd" ]]; then + echo "Error: $cmd not found or not executable." + echo "Make sure you are building GDAL on linux." + exit 1 + fi +} + +check_command "$GDALINFO" +check_command "$OGRINFO" + +{ + echo "===== GDAL Formats =====" + "$GDALINFO" --formats + echo + echo "===== OGR Formats =====" + "$OGRINFO" --formats +} > "$OUTPUT_FILE" + +$PROJECT_DIR/build/app/Input --generate_QGIS_formats + +echo "Formats info saved to $OUTPUT_FILE" diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 000000000..703191d2d --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,117 @@ +{ + "vcpkg-configuration": { + "overlay-ports": [ + "vcpkg/ports" + ], + "overlay-triplets": [ + "vcpkg/triplets" + ] + }, + "name": "merginmaps-mobile-app", + "description": "Collect. Share. Publish.", + "version": "2025.6.0", + "homepage": "https://github.com/merginmaps/mobile", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avdevice", + "avformat", + { + "name": "openh264", + "platform": "linux | windows" + }, + "swresample", + "swscale" + ], + "platform": "linux | android | windows" + }, + { + "name": "sqlite3", + "default-features": false, + "features": [ "rtree", "json1", "fts3" ] + }, + { + "name": "exiv2", + "features": ["xmp"] + }, + { + "name": "proj", + "default-features": false, + "features": ["tiff"] + }, + { + "name": "libspatialite", + "default-features": false, + "features": ["freexl"] + }, + { + "name": "tiff", + "default-features": false, + "features": ["webp", "zip", "lzma", "jpeg", "zstd"] + }, + "geodiff", + "nu-book-zxing-cpp", + { + "name": "gdal", + "features": [ + { + "name": "tools", + "platform": "linux | osx" + } + ] + }, + { + "name": "qca", + "host": true, + "default-features": false + }, + { + "name": "qca", + "default-features": false, + "features": [ + "ossl" + ] + }, + "qtkeychain-qt6", + "qgis", + { + "name": "qgis", + "host": true, + "default-features": false + }, + { + "name": "qtbase", + "default-features": false + }, + "qtconnectivity", + "qtdeclarative", + "qtimageformats", + "qtnetworkauth", + "qtlocation", + { + "name": "qtmultimedia", + "features": [ + { + "name": "ffmpeg", + "platform": "linux | android | windows" + }, + "qml" + ] + }, + "qtremoteobjects", + { + "name": "qtsensors", + "features": [ + "qml" + ] + }, + { + "name": "qttools", + "host": true, + "default-features": false + } + ] +} diff --git a/vcpkg/ports/README.md b/vcpkg/ports/README.md new file mode 100644 index 000000000..0217a3d12 --- /dev/null +++ b/vcpkg/ports/README.md @@ -0,0 +1,10 @@ +- Geodiff - no official port in vcpkg +- libb2 - bug, see: https://github.com/microsoft/vcpkg/issues/43326#issuecomment-2827154631 +- qca - we needed 2.3.9, there is 2.3.7 in main repo +- qgis - no official port in vcpkg +- qtbase - https://github.com/microsoft/vcpkg/issues/39832#issuecomment-2221449238 +- qtdeclarative - unknown +- qtkeychain-qt6 - official port uses qt5 +- qtmultimedia - unknown +- qtpositioning - unknown +- gstreamer - unknown (linux build ffmpeg?) \ No newline at end of file diff --git a/vcpkg/ports/geodiff/portfile.cmake b/vcpkg/ports/geodiff/portfile.cmake new file mode 100644 index 000000000..3142822ad --- /dev/null +++ b/vcpkg/ports/geodiff/portfile.cmake @@ -0,0 +1,37 @@ +# Be sure to update both of these versions together. +set(GEODIFF_VERSION 2.0.2) +set(GEODIFF_HASH 290f10ec1a0d419d13996e915d02b7d226f23359c2745a72a1a286d439bed3afdf536d5bb8771c3d4fb3df2d56ac5c0d4c7f178ee31493f4bf02d597c8b9a878) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MerginMaps/geodiff + REF ${GEODIFF_VERSION} + SHA512 ${GEODIFF_HASH} + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND GEODIFF_LINK_OPTIONS -DBUILD_STATIC=ON) + list(APPEND GEODIFF_LINK_OPTIONS -DBUILD_SHARED=OFF) +else() + list(APPEND GEODIFF_LINK_OPTIONS -DBUILD_STATIC=OFF) + list(APPEND GEODIFF_LINK_OPTIONS -DBUILD_SHARED=ON) +endif() + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/geodiff + OPTIONS + -DENABLE_TESTS=OFF + -DBUILD_TOOLS=OFF + -DWITH_POSTGRESQL=OFF + ${GEODIFF_LINK_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "Geodiff is MIT licensed\n") +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/vcpkg/ports/geodiff/usage b/vcpkg/ports/geodiff/usage new file mode 100644 index 000000000..b77f14811 --- /dev/null +++ b/vcpkg/ports/geodiff/usage @@ -0,0 +1,4 @@ +The package Geodiff provides CMake targets: + + find_package(Geodiff CONFIG REQUIRED) + target_link_libraries(main PRIVATE Geodiff::Geodiff) diff --git a/vcpkg/ports/geodiff/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/geodiff/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..c28a31201 --- /dev/null +++ b/vcpkg/ports/geodiff/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,64 @@ +include(SelectLibraryConfigurations) +select_library_configurations(Geodiff) + +find_path(Geodiff_INCLUDE_DIR + NAMES geodiff.h + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" + NO_DEFAULT_PATH +) + +if(NOT Geodiff_LIBRARY) + find_library(Geodiff_LIBRARY_RELEASE NAMES geodiff + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" + NO_DEFAULT_PATH + ) + find_library(Geodiff_LIBRARY_DEBUG NAMES geodiff + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" + NO_DEFAULT_PATH + ) + select_library_configurations(Geodiff) + mark_as_advanced(Geodiff_LIBRARY_RELEASE Geodiff_LIBRARY_DEBUG) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + Geodiff + REQUIRED_VARS Geodiff_LIBRARY Geodiff_INCLUDE_DIR +) + +find_package(unofficial-sqlite3 CONFIG QUIET) + +if (Geodiff_FOUND AND NOT TARGET Geodiff::Geodiff) + add_library(Geodiff::Geodiff UNKNOWN IMPORTED) + set_target_properties( Geodiff::Geodiff PROPERTIES + INTERFACE_LINK_LIBRARIES unofficial::sqlite3::sqlite3 + ) + + if(Geodiff_INCLUDE_DIR) + set_target_properties(Geodiff::Geodiff PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${Geodiff_INCLUDE_DIR}" + ) + endif() + + if(EXISTS "${Geodiff_LIBRARY}") + set_target_properties(Geodiff::Geodiff PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${Geodiff_LIBRARY}") + endif() + + if(EXISTS "${Geodiff_LIBRARY_RELEASE}") + set_property(TARGET Geodiff::Geodiff APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(Geodiff::Geodiff PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${Geodiff_LIBRARY_RELEASE}") + endif() + + if(EXISTS "${Geodiff_LIBRARY_DEBUG}") + set_property(TARGET Geodiff::Geodiff APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(Geodiff::Geodiff PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${Geodiff_LIBRARY_DEBUG}") + endif() +endif () diff --git a/vcpkg/ports/geodiff/vcpkg.json b/vcpkg/ports/geodiff/vcpkg.json new file mode 100644 index 000000000..7381d738c --- /dev/null +++ b/vcpkg/ports/geodiff/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "geodiff", + "version": "2.0.2", + "port-version": 2, + "description": "Library for handling diffs for geospatial data", + "homepage": "https://github.com/MerginMaps/geodiff", + "license": "MIT", + "dependencies": [ + "sqlite3", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/vcpkg/ports/gstreamer/base-must-be-enabled.patch b/vcpkg/ports/gstreamer/base-must-be-enabled.patch new file mode 100644 index 000000000..5a4d3abeb --- /dev/null +++ b/vcpkg/ports/gstreamer/base-must-be-enabled.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +index 6d07929..df015cb 100644 +--- a/meson.build ++++ b/meson.build +@@ -159,7 +159,7 @@ foreach sp : subprojects + subproj = subproject(project_name, required: is_required, default_options: default_options) + endif + +- if project_name == 'gst-plugins-base' ++ if project_name == 'gst-plugins-base' and subproj.found() + gst_base_orc_req = subproj.get_variable('orc_req', '') + if gst_base_orc_req != orc_req + error('orc_req is "@0@" but it should be "@1@" from subprojects/gst-plugins-base/meson.build' diff --git a/vcpkg/ports/gstreamer/fix-bz2-windows-debug-dependency.patch b/vcpkg/ports/gstreamer/fix-bz2-windows-debug-dependency.patch new file mode 100644 index 000000000..2be3d28ae --- /dev/null +++ b/vcpkg/ports/gstreamer/fix-bz2-windows-debug-dependency.patch @@ -0,0 +1,26 @@ +diff --git a/subprojects/gst-plugins-bad/ext/bz2/meson.build b/subprojects/gst-plugins-bad/ext/bz2/meson.build +index 08d1596..be5fa02 100644 +--- a/subprojects/gst-plugins-bad/ext/bz2/meson.build ++++ b/subprojects/gst-plugins-bad/ext/bz2/meson.build +@@ -4,7 +4,7 @@ bz2_sources = [ + 'gstbz2enc.c', + ] + +-bz2_dep = cc.find_library('bz2', required : get_option('bz2')) ++bz2_dep = dependency('bzip2', required : get_option('bz2')) + + if bz2_dep.found() and cc.has_header_symbol('bzlib.h', 'BZ2_bzlibVersion') + gstbz2 = library('gstbz2', +diff --git a/subprojects/gst-plugins-good/gst/matroska/meson.build b/subprojects/gst-plugins-good/gst/matroska/meson.build +index d8a6a96..dd03de2 100644 +--- a/subprojects/gst-plugins-good/gst/matroska/meson.build ++++ b/subprojects/gst-plugins-good/gst/matroska/meson.build +@@ -12,7 +12,7 @@ matroska_sources = [ + 'lzo.c', + ] + +-bz2_dep = cc.find_library('bz2', required : get_option('bz2')) ++bz2_dep = dependency('bzip2', required : get_option('bz2')) + cdata.set('HAVE_BZ2', bz2_dep.found() and cc.has_header('bzlib.h')) + + gstmatroska = library('gstmatroska', diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-bad.patch b/vcpkg/ports/gstreamer/fix-clang-cl-bad.patch new file mode 100644 index 000000000..c3eeaf1e0 --- /dev/null +++ b/vcpkg/ports/gstreamer/fix-clang-cl-bad.patch @@ -0,0 +1,111 @@ +diff --git a/subprojects/gst-plugins-bad/ext/dts/meson.build b/subprojects/gst-plugins-bad/ext/dts/meson.build +index c4868a4..6b34cb7 100644 +--- a/subprojects/gst-plugins-bad/ext/dts/meson.build ++++ b/subprojects/gst-plugins-bad/ext/dts/meson.build +@@ -20,7 +20,7 @@ if not dca_dep.found() + endif + + no_warn_c_args = [] +-if cc.get_id() != 'msvc' ++if cc.get_argument_syntax() != 'msvc' + # autotools didn't use the libdca pkg-config cflags, and they + # can point to a non-existing location (/usr/include/dca) + no_warn_c_args = ['-Wno-missing-include-dirs'] +diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build +index 160080a..6acf110 100644 +--- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build ++++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build +@@ -158,7 +158,7 @@ endif + + # MinGW 32bits compiler seems to be complaining about redundant-decls + # when ComPtr is in use. Let's just disable the warning +-if cc.get_id() != 'msvc' ++if cc.get_argument_syntax() != 'msvc' + extra_args = cc.get_supported_arguments([ + '-Wno-redundant-decls', + ]) +diff --git a/subprojects/gst-plugins-bad/meson.build b/subprojects/gst-plugins-bad/meson.build +index 84eeb17..1743f41 100644 +--- a/subprojects/gst-plugins-bad/meson.build ++++ b/subprojects/gst-plugins-bad/meson.build +@@ -54,7 +54,7 @@ endif + + cdata = configuration_data() + cdata.set('ENABLE_NLS', 1) + +-if cc.get_id() == 'msvc' ++if cc.get_argument_syntax() == 'msvc' + msvc_args = [ + # Ignore several spurious warnings for things gstreamer does very commonly + # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it +diff --git a/subprojects/gst-plugins-bad/sys/asio/meson.build b/subprojects/gst-plugins-bad/sys/asio/meson.build +index c61ad4e..b30793c 100644 +--- a/subprojects/gst-plugins-bad/sys/asio/meson.build ++++ b/subprojects/gst-plugins-bad/sys/asio/meson.build +@@ -15,7 +15,7 @@ endif + + # FIXME: non-msvc is not tested, and unlikely supported yet because of + # tool-chain issue +-if cxx.get_id() != 'msvc' ++if cxx.get_argument_syntax() != 'msvc' + if asio_option.enabled() + error('asio plugin can only be built with MSVC') + else +diff --git a/subprojects/gst-plugins-bad/sys/d3d11/meson.build b/subprojects/gst-plugins-bad/sys/d3d11/meson.build +index 1368b79..8dd3b30 100644 +--- a/subprojects/gst-plugins-bad/sys/d3d11/meson.build ++++ b/subprojects/gst-plugins-bad/sys/d3d11/meson.build +@@ -96,7 +96,7 @@ endif + + # MinGW 32bits compiler seems to be complaining about redundant-decls + # when ComPtr is in use. Let's just disable the warning +-if cc.get_id() != 'msvc' ++if cc.get_argument_syntax() != 'msvc' + extra_mingw_args = cc.get_supported_arguments([ + '-Wno-redundant-decls', + ]) +diff --git a/subprojects/gst-plugins-bad/sys/decklink/meson.build b/subprojects/gst-plugins-bad/sys/decklink/meson.build +index d869e79a4..c7b37a7c6 100644 +--- a/subprojects/gst-plugins-bad/sys/decklink/meson.build ++++ b/subprojects/gst-plugins-bad/sys/decklink/meson.build +@@ -18,7 +18,7 @@ decklink_libs = [] + + if host_system == 'windows' + decklink_sources += ['win/DeckLinkAPIDispatch.cpp', 'win/DeckLinkAPI_i.c'] +- if cxx.get_id() == 'msvc' ++ if cxx.get_argument_syntax() == 'msvc' + # FIXME: Use commsuppwd.lib for debug builds? + comutil_dep = cxx.find_library('comsuppw', required : get_option('decklink')) + if comutil_dep.found() +diff --git a/subprojects/gst-plugins-bad/sys/mediafoundation/meson.build b/subprojects/gst-plugins-bad/sys/mediafoundation/meson.build +index 6b9a059..40713ce 100644 +--- a/subprojects/gst-plugins-bad/sys/mediafoundation/meson.build ++++ b/subprojects/gst-plugins-bad/sys/mediafoundation/meson.build +@@ -54,7 +54,7 @@ if host_system != 'windows' or mf_option.disabled() + subdir_done() + endif + +-if cc.get_id() != 'msvc' ++if cc.get_argument_syntax() != 'msvc' + if mf_option.enabled() + error('mediafoundation plugin can only be built with MSVC') + endif +diff --git a/subprojects/gst-plugins-bad/sys/msdk/meson.build b/subprojects/gst-plugins-bad/sys/msdk/meson.build +index 659b96c..92e6bc4 100644 +--- a/subprojects/gst-plugins-bad/sys/msdk/meson.build ++++ b/subprojects/gst-plugins-bad/sys/msdk/meson.build +@@ -176,12 +176,12 @@ if use_onevpl and have_mfx_ver205 + endif + + if host_machine.system() == 'windows' +- if cc.get_id() != 'msvc' and msdk_option.enabled() ++ if cc.get_argument_syntax() != 'msvc' and msdk_option.enabled() + error('msdk plugin can only be built with MSVC') + endif + legacy_stdio_dep = cc.find_library('legacy_stdio_definitions', required: get_option('msdk')) + msdk_deps = declare_dependency(dependencies: [gstd3d11_dep, legacy_stdio_dep]) +- msdk_deps_found = gstd3d11_dep.found() and legacy_stdio_dep.found() and cc.get_id() == 'msvc' ++ msdk_deps_found = d3d11_dep.found() and legacy_stdio_dep.found() and cc.get_argument_syntax() == 'msvc' + else + libdl_dep = cc.find_library('dl', required: get_option('msdk')) + libgudev_dep = dependency('gudev-1.0', required: get_option('msdk')) diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-base.patch b/vcpkg/ports/gstreamer/fix-clang-cl-base.patch new file mode 100644 index 000000000..227a7e05b --- /dev/null +++ b/vcpkg/ports/gstreamer/fix-clang-cl-base.patch @@ -0,0 +1,13 @@ +diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build +index c040bc9..ce9071c 100644 +--- a/subprojects/gst-plugins-base/meson.build ++++ b/subprojects/gst-plugins-base/meson.build +@@ -51,7 +51,7 @@ gst_libraries = [] + + cc = meson.get_compiler('c') + +-if cc.get_id() == 'msvc' ++if cc.get_argument_syntax() == 'msvc' + msvc_args = [ + # Ignore several spurious warnings for things gstreamer does very commonly + # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-good.patch b/vcpkg/ports/gstreamer/fix-clang-cl-good.patch new file mode 100644 index 000000000..10be6030a --- /dev/null +++ b/vcpkg/ports/gstreamer/fix-clang-cl-good.patch @@ -0,0 +1,22 @@ +diff --git a/subprojects/gst-plugins-good/meson.build b/subprojects/gst-plugins-good/meson.build +index 64705379f..0c55b9732 100644 +--- a/subprojects/gst-plugins-good/meson.build ++++ b/subprojects/gst-plugins-good/meson.build +@@ -30,7 +30,7 @@ plugins = [] + cc = meson.get_compiler('c') + host_system = host_machine.system() + +-if cc.get_id() == 'msvc' ++if cc.get_argument_syntax() == 'msvc' + msvc_args = [ + # Ignore several spurious warnings for things gstreamer does very commonly + # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it +@@ -183,7 +183,7 @@ cdata.set('SIZEOF_OFF_T', cc.sizeof('off_t')) + # Here be fixmes. + # FIXME: check if this is correct + cdata.set('HAVE_CPU_X86_64', host_machine.cpu() == 'amd64') +-cdata.set('HAVE_GCC_ASM', cc.get_id() != 'msvc') ++cdata.set('HAVE_GCC_ASM', cc.get_argument_syntax() != 'msvc') + cdata.set_quoted('VERSION', gst_version) + cdata.set_quoted('PACKAGE_VERSION', gst_version) + cdata.set_quoted('GST_LICENSE', 'LGPL') diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-gstreamer.patch b/vcpkg/ports/gstreamer/fix-clang-cl-gstreamer.patch new file mode 100644 index 000000000..a89167b30 --- /dev/null +++ b/vcpkg/ports/gstreamer/fix-clang-cl-gstreamer.patch @@ -0,0 +1,39 @@ +diff --git a/subprojects/gstreamer/gst/parse/meson.build b/subprojects/gstreamer/gst/parse/meson.build +index b79a07c..891f907 100644 +--- a/subprojects/gstreamer/gst/parse/meson.build ++++ b/subprojects/gstreamer/gst/parse/meson.build +@@ -16,7 +16,7 @@ else + endif + + flex_cdata.set('FLEX', flex.full_path()) +-if cc.get_id() == 'msvc' ++if cc.get_argument_syntax() == 'msvc' + flex_cdata.set('FLEX_ARGS', '--nounistd') + else + flex_cdata.set('FLEX_ARGS', '') +diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build +index 941bedc..cd37a40 100644 +--- a/subprojects/gstreamer/meson.build ++++ b/subprojects/gstreamer/meson.build +@@ -47,7 +47,7 @@ endif + + cdata = configuration_data() + +-if cc.get_id() == 'msvc' ++if cc.get_argument_syntax() == 'msvc' + msvc_args = [ + # Ignore several spurious warnings for things gstreamer does very commonly + # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it +@@ -347,8 +347,10 @@ static __uint128_t v2 = 10; + static __uint128_t u; + u = v1 / v2; + }''' +-if cc.compiles(uint128_t_src, name : '__uint128_t available') +- cdata.set('HAVE_UINT128_T', 1) ++if cc.get_argument_syntax() != 'msvc' ++ if cc.compiles(uint128_t_src, name : '__uint128_t available') ++ cdata.set('HAVE_UINT128_T', 1) ++ endif + endif + + # All supported platforms have long long now diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-ugly.patch b/vcpkg/ports/gstreamer/fix-clang-cl-ugly.patch new file mode 100644 index 000000000..100b6a7b6 --- /dev/null +++ b/vcpkg/ports/gstreamer/fix-clang-cl-ugly.patch @@ -0,0 +1,13 @@ +diff --git a/subprojects/gst-plugins-ugly/meson.build b/subprojects/gst-plugins-ugly/meson.build +index 14be48c4c..83d019874 100644 +--- a/subprojects/gst-plugins-ugly/meson.build ++++ b/subprojects/gst-plugins-ugly/meson.build +@@ -31,7 +31,7 @@ if have_cxx + cxx = meson.get_compiler('cpp') + endif + +-if cc.get_id() == 'msvc' ++if cc.get_argument_syntax() == 'msvc' + msvc_args = [ + # Ignore several spurious warnings for things gstreamer does very commonly + # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it diff --git a/vcpkg/ports/gstreamer/fix-clang-cl.patch b/vcpkg/ports/gstreamer/fix-clang-cl.patch new file mode 100644 index 000000000..ac00b9e13 --- /dev/null +++ b/vcpkg/ports/gstreamer/fix-clang-cl.patch @@ -0,0 +1,22 @@ +diff --git a/meson.build b/meson.build +index 1316366ed..daeaf3cb1 100644 +--- a/meson.build ++++ b/meson.build +@@ -62,7 +62,7 @@ endif + # Ensure that MSVC interprets all source code as UTF-8. Only do this when we're + # not a subproject, because subprojects are not allowed to call + # add_global_arguments(). +-if not meson.is_subproject() and cc.get_id() == 'msvc' ++if not meson.is_subproject() and cc.get_argument_syntax() == 'msvc' + add_global_arguments( + cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8 + language: ['c', 'cpp']) +@@ -316,7 +316,7 @@ if get_option('default_library') == 'static' + if cc.has_link_argument(link_arg) + gstfull_link_args += link_arg + link_deps += symbol_map +- elif cc.get_id() == 'msvc' ++ elif cc.get_argument_syntax() == 'msvc' + warning('FIXME: Provide a def file to publish the public symbols') + else + warning('FIXME: Linker does not support the supplied version script (' + symbol_map + '), please disable the "gst-full-version-script" option') diff --git a/vcpkg/ports/gstreamer/gstreamer-disable-no-unused.patch b/vcpkg/ports/gstreamer/gstreamer-disable-no-unused.patch new file mode 100644 index 000000000..971d80295 --- /dev/null +++ b/vcpkg/ports/gstreamer/gstreamer-disable-no-unused.patch @@ -0,0 +1,14 @@ +diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build +index bed8c4e..772809e 100644 +--- a/subprojects/gstreamer/meson.build ++++ b/subprojects/gstreamer/meson.build +@@ -435,8 +435,8 @@ if cc.has_header('execinfo.h') + endif + endif + + gst_debug = get_option('gst_debug') +-if not gst_debug ++if not gst_debug and cc.has_argument('-Wno-unused') + add_project_arguments(['-Wno-unused'], language: 'c') + endif + diff --git a/vcpkg/ports/gstreamer/no-downloads.patch b/vcpkg/ports/gstreamer/no-downloads.patch new file mode 100644 index 000000000..caf128021 --- /dev/null +++ b/vcpkg/ports/gstreamer/no-downloads.patch @@ -0,0 +1,17 @@ +diff --git a/meson.build b/meson.build +index df015cb..93cf7e9 100644 +--- a/meson.build ++++ b/meson.build +@@ -105,12 +105,6 @@ subprojects = [ + ['gst-plugins-rs', { 'option': get_option('rs'), 'build-hotdoc': true, 'match_gst_version': false}], + ] + +-if build_system == 'windows' +- subproject('win-flex-bison-binaries') +- subproject('win-nasm') +-elif build_system == 'darwin' +- subproject('macos-bison-binary') +-endif + + orc_option = get_option('orc') + # There is a check below to keep this in sync with subprojects/gst-plugins-base/meson.build diff --git a/vcpkg/ports/gstreamer/plugin-base-disable-no-unused.patch b/vcpkg/ports/gstreamer/plugin-base-disable-no-unused.patch new file mode 100644 index 000000000..f8c249d96 --- /dev/null +++ b/vcpkg/ports/gstreamer/plugin-base-disable-no-unused.patch @@ -0,0 +1,26 @@ +diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build +index 9b00253..495671e 100644 +--- a/subprojects/gst-plugins-base/meson.build ++++ b/subprojects/gst-plugins-base/meson.build +@@ -388,10 +388,11 @@ int32x4_t testfunc(int16_t *a, int16_t *b) { + endif + endif + ++build_system = build_machine.system() + if gst_dep.type_name() == 'internal' + gst_proj = subproject('gstreamer') + +- if not gst_proj.get_variable('gst_debug') ++ if not gst_proj.get_variable('gst_debug') and build_system != 'windows' + message('GStreamer debug system is disabled') + add_project_arguments('-Wno-unused', language: 'c') + else +@@ -404,7 +405,7 @@ else + #include + #ifdef GST_DISABLE_GST_DEBUG + #error "debugging disabled, make compiler fail" +-#endif''' , dependencies: gst_dep) ++#endif''' , dependencies: gst_dep) and build_system != 'windows' + message('GStreamer debug system is disabled') + add_project_arguments('-Wno-unused', language: 'c') + else diff --git a/vcpkg/ports/gstreamer/plugins-base-x11.patch b/vcpkg/ports/gstreamer/plugins-base-x11.patch new file mode 100644 index 000000000..f42551948 --- /dev/null +++ b/vcpkg/ports/gstreamer/plugins-base-x11.patch @@ -0,0 +1,13 @@ +diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build +index 9b00253a0f..e3c3a0d920 100644 +--- a/subprojects/gst-plugins-base/meson.build ++++ b/subprojects/gst-plugins-base/meson.build +@@ -316,7 +316,7 @@ else + gtk_quartz_dep = dependency('', required : false) + endif + +-core_conf.set('HAVE_X11', x11_dep.found()) ++core_conf.set('HAVE_X11', false) + core_conf.set('HAVE_GIO_UNIX_2_0', giounix_dep.found()) + + if gio_dep.type_name() == 'pkgconfig' diff --git a/vcpkg/ports/gstreamer/portfile.cmake b/vcpkg/ports/gstreamer/portfile.cmake new file mode 100644 index 000000000..86a4068c8 --- /dev/null +++ b/vcpkg/ports/gstreamer/portfile.cmake @@ -0,0 +1,420 @@ +if(VCPKG_TARGET_IS_WINDOWS) + set(PATCHES + plugin-base-disable-no-unused.patch + ) +endif() + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org + OUT_SOURCE_PATH SOURCE_PATH + REPO gstreamer/gstreamer + REF "${VERSION}" + SHA512 0d69896d0a83452320df0d0f56c710df1365a259cd3f48dc7cd4df18d45b27caea7174aafa15ae5eb8637ccdef192c1047185b369b7232db4eaacbc57ffaaa22 + HEAD_REF main + PATCHES + fix-clang-cl.patch + fix-clang-cl-gstreamer.patch + fix-clang-cl-base.patch + fix-clang-cl-good.patch + fix-clang-cl-bad.patch + fix-clang-cl-ugly.patch + gstreamer-disable-no-unused.patch + srtp_fix.patch + fix-bz2-windows-debug-dependency.patch + base-must-be-enabled.patch + no-downloads.patch + ${PATCHES} +) + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(NASM) + +if(VCPKG_TARGET_IS_OSX) + # In Darwin platform, there can be an old version of `bison`, + # Which can't be used for `gst-build`. It requires 2.4+ + execute_process( + COMMAND ${BISON} --version + OUTPUT_VARIABLE BISON_OUTPUT + ) + string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" BISON_VERSION "${BISON_OUTPUT}") + set(BISON_MAJOR ${CMAKE_MATCH_1}) + set(BISON_MINOR ${CMAKE_MATCH_2}) + message(STATUS "Using bison: ${BISON_MAJOR}.${BISON_MINOR}.${CMAKE_MATCH_3}") + if(NOT (BISON_MAJOR GREATER_EQUAL 2 AND BISON_MINOR GREATER_EQUAL 4)) + message(WARNING "'bison' upgrade is required. Please check the https://stackoverflow.com/a/35161881") + endif() +endif() + +# General features +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + gpl gpl + libav libav + nls nls + ges ges + + plugins-base base + gl-graphene gst-plugins-base:gl-graphene + alsa gst-plugins-base:alsa + ogg gst-plugins-base:ogg + opus-base gst-plugins-base:opus + pango gst-plugins-base:pango + vorbis gst-plugins-base:vorbis + x11-base gst-plugins-base:x11 + x11-base gst-plugins-base:xshm + + plugins-good good + bzip2-good gst-plugins-good:bz2 + cairo gst-plugins-good:cairo + flac gst-plugins-good:flac + gdk-pixbuf gst-plugins-good:gdk-pixbuf + jpeg gst-plugins-good:jpeg + mpg123 gst-plugins-good:mpg123 + png gst-plugins-good:png + speex gst-plugins-good:speex + taglib gst-plugins-good:taglib + vpx gst-plugins-good:vpx + + plugins-ugly ugly + x264 gst-plugins-ugly:x264 + + plugins-bad bad + aes gst-plugins-bad:aes + aom gst-plugins-bad:aom + assrender gst-plugins-bad:assrender + bzip2-bad gst-plugins-bad:bz2 + chromaprint gst-plugins-bad:chromaprint + closedcaption gst-plugins-bad:closedcaption + colormanagement gst-plugins-bad:colormanagement + dash gst-plugins-bad:dash + dc1394 gst-plugins-bad:dc1394 + dtls gst-plugins-bad:dtls + faad gst-plugins-bad:faad + fdkaac gst-plugins-bad:fdkaac + fluidsynth gst-plugins-bad:fluidsynth + libde265 gst-plugins-bad:libde265 + microdns gst-plugins-bad:microdns + modplug gst-plugins-bad:modplug + nvcodec gst-plugins-bad:nvcodec + openal gst-plugins-bad:openal + openh264 gst-plugins-bad:openh264 + openjpeg gst-plugins-bad:openjpeg + openmpt gst-plugins-bad:openmpt + opus-bad gst-plugins-bad:opus + smoothstreaming gst-plugins-bad:smoothstreaming + sndfile gst-plugins-bad:sndfile + soundtouch gst-plugins-bad:soundtouch + srt gst-plugins-bad:srt + srtp gst-plugins-bad:srtp + webp gst-plugins-bad:webp + webrtc gst-plugins-bad:webrtc + wildmidi gst-plugins-bad:wildmidi + x11-bad gst-plugins-bad:x11 + x265 gst-plugins-bad:x265 + asio gst-plugins-bad:asio +) + +string(REPLACE "OFF" "disabled" FEATURE_OPTIONS "${FEATURE_OPTIONS}") +string(REPLACE "ON" "enabled" FEATURE_OPTIONS "${FEATURE_OPTIONS}") + +if(VCPKG_TARGET_IS_WINDOWS) + set(PLUGIN_BASE_WINDOW_SYSTEM win32) + set(PLUGIN_BASE_GL_PLATFORM wgl) +else() + set(PLUGIN_BASE_WINDOW_SYSTEM auto) + set(PLUGIN_BASE_GL_PLATFORM auto) +endif() + +if("asio" IN_LIST FEATURES) + set(PLUGIN_BAD_ASIO_SDK_PATH ${CURRENT_INSTALLED_DIR}/include/asiosdk) +else() + set(PLUGIN_BAD_ASIO_SDK_PATH "") +endif() + +# +# References +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gstreamer/meson_options.txt +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gst-plugins-base/meson_options.txt +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gst-plugins-good/meson_options.txt +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gst-plugins-ugly/meson_options.txt +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gst-plugins-bad/meson_options.txt +# +# Rationale for added options +# Common options are added below systematically +# Feature options are added below only if the feature needs an external dependency +# Feature options that are dependent on the operating system type (like wasapi or osxaudio) are set to auto +# Every other feature options are made available if the dependency is available on vcpkg and if the plugin has managed to build during tests +# + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + # General options + -Dpython=disabled + -Dlibnice=disabled + -Ddevtools=disabled + -Drtsp_server=disabled + -Domx=disabled + -Dvaapi=disabled + -Dsharp=disabled + -Drs=disabled + -Dgst-examples=disabled + -Dtls=disabled + -Dqt5=disabled + # Common options + -Dtests=disabled + -Dexamples=disabled + -Dintrospection=disabled + -Dorc=disabled # gstreamer requires a specific version of orc which is not available in vcpkg + -Ddoc=disabled + -Dgtk_doc=disabled + # gstreamer + -Dgstreamer:check=disabled + -Dgstreamer:libunwind=disabled + -Dgstreamer:libdw=disabled + -Dgstreamer:dbghelp=disabled + -Dgstreamer:bash-completion=disabled + -Dgstreamer:coretracers=disabled + -Dgstreamer:benchmarks=disabled + -Dgstreamer:gst_debug=true + # gst-plugins-base + -Dgst-plugins-base:gl_winsys=${PLUGIN_BASE_WINDOW_SYSTEM} + -Dgst-plugins-base:gl_platform=${PLUGIN_BASE_GL_PLATFORM} + -Dgst-plugins-base:cdparanoia=disabled + -Dgst-plugins-base:libvisual=disabled + -Dgst-plugins-base:theora=disabled + -Dgst-plugins-base:tremor=disabled + -Dgst-plugins-base:xvideo=disabled + # gst-plugins-good + -Dgst-plugins-good:aalib=disabled + -Dgst-plugins-good:directsound=auto + -Dgst-plugins-good:dv=disabled + -Dgst-plugins-good:dv1394=disabled + -Dgst-plugins-good:gtk3=disabled # GTK version 3 only + -Dgst-plugins-good:jack=disabled + -Dgst-plugins-good:lame=disabled + -Dgst-plugins-good:libcaca=disabled + -Dgst-plugins-good:oss=disabled + -Dgst-plugins-good:oss4=disabled + -Dgst-plugins-good:osxaudio=auto + -Dgst-plugins-good:osxvideo=auto + -Dgst-plugins-good:pulse=auto + -Dgst-plugins-good:qt5=disabled + -Dgst-plugins-good:shout2=disabled + #-Dgst-plugins-good:soup=disabled + -Dgst-plugins-good:twolame=disabled + -Dgst-plugins-good:waveform=auto + -Dgst-plugins-good:wavpack=disabled # Error during plugin build + # gst-plugins-ugly + -Dgst-plugins-ugly:a52dec=disabled + -Dgst-plugins-ugly:amrnb=disabled + -Dgst-plugins-ugly:amrwbdec=disabled + -Dgst-plugins-ugly:cdio=disabled + -Dgst-plugins-ugly:dvdread=disabled + -Dgst-plugins-ugly:mpeg2dec=disabled # libmpeg2 not found + -Dgst-plugins-ugly:sidplay=disabled + # gst-plugins-bad + -Dgst-plugins-bad:avtp=disabled + -Dgst-plugins-bad:androidmedia=auto + -Dgst-plugins-bad:applemedia=auto + -Dgst-plugins-bad:asio-sdk-path=${PLUGIN_BAD_ASIO_SDK_PATH} + -Dgst-plugins-bad:bluez=disabled + -Dgst-plugins-bad:bs2b=disabled + -Dgst-plugins-bad:curl=disabled # Error during plugin build + -Dgst-plugins-bad:curl-ssh2=disabled + -Dgst-plugins-bad:d3dvideosink=auto + -Dgst-plugins-bad:d3d11=auto + -Dgst-plugins-bad:decklink=disabled + -Dgst-plugins-bad:directfb=disabled + -Dgst-plugins-bad:directsound=auto + -Dgst-plugins-bad:dts=disabled + -Dgst-plugins-bad:dvb=auto + -Dgst-plugins-bad:faac=disabled + -Dgst-plugins-bad:fbdev=auto + -Dgst-plugins-bad:flite=disabled + -Dgst-plugins-bad:gl=auto + -Dgst-plugins-bad:gme=disabled + -Dgst-plugins-bad:gs=disabled # Error during plugin configuration (abseil pkg-config file missing) + -Dgst-plugins-bad:gsm=disabled + -Dgst-plugins-bad:ipcpipeline=auto + -Dgst-plugins-bad:iqa=disabled + -Dgst-plugins-bad:kate=disabled + -Dgst-plugins-bad:kms=disabled + -Dgst-plugins-bad:ladspa=disabled + -Dgst-plugins-bad:ldac=disabled + -Dgst-plugins-bad:lv2=disabled # Error during plugin configuration (lilv pkg-config file missing) + -Dgst-plugins-bad:mediafoundation=auto + -Dgst-plugins-bad:mpeg2enc=disabled + -Dgst-plugins-bad:mplex=disabled + -Dgst-plugins-bad:msdk=disabled + -Dgst-plugins-bad:musepack=disabled + -Dgst-plugins-bad:neon=disabled + -Dgst-plugins-bad:onnx=disabled # libonnxruntime not found + -Dgst-plugins-bad:openaptx=disabled + -Dgst-plugins-bad:opencv=disabled # opencv not found + -Dgst-plugins-bad:openexr=disabled # OpenEXR::IlmImf target not found + -Dgst-plugins-bad:openni2=disabled # libopenni2 not found + -Dgst-plugins-bad:opensles=disabled + -Dgst-plugins-bad:qroverlay=disabled + -Dgst-plugins-bad:resindvd=disabled + -Dgst-plugins-bad:rsvg=disabled # librsvg-2.0 not found + -Dgst-plugins-bad:rtmp=disabled # librtmp not found + -Dgst-plugins-bad:sbc=disabled + -Dgst-plugins-bad:sctp=auto + -Dgst-plugins-bad:shm=disabled + -Dgst-plugins-bad:spandsp=disabled + -Dgst-plugins-bad:svthevcenc=disabled + -Dgst-plugins-bad:teletext=disabled + -Dgst-plugins-bad:tinyalsa=disabled + -Dgst-plugins-bad:transcode=disabled + -Dgst-plugins-bad:ttml=disabled + -Dgst-plugins-bad:uvch264=disabled + -Dgst-plugins-bad:va=disabled + -Dgst-plugins-bad:voaacenc=disabled + -Dgst-plugins-bad:voamrwbenc=disabled + -Dgst-plugins-bad:vulkan=auto + -Dgst-plugins-bad:wasapi=auto + -Dgst-plugins-bad:wasapi2=auto + -Dgst-plugins-bad:wayland=auto + -Dgst-plugins-bad:winks=disabled + -Dgst-plugins-bad:winscreencap=auto + -Dgst-plugins-bad:zbar=disabled # Error during plugin build + -Dgst-plugins-bad:zxing=disabled # Error during plugin build + -Dgst-plugins-bad:wpe=disabled + -Dgst-plugins-bad:magicleap=disabled + -Dgst-plugins-bad:v4l2codecs=disabled + -Dgst-plugins-bad:isac=disabled + OPTIONS_RELEASE + -Dgobject-cast-checks=disabled + -Dglib-asserts=disabled + -Dglib-checks=disabled + -Dgstreamer:extra-checks=disabled + ADDITIONAL_BINARIES + flex='${FLEX}' + bison='${BISON}' + nasm='${NASM}' + glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' +) + +vcpkg_install_meson() + +# Remove duplicated GL headers (we already have `opengl-registry`) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/KHR" + "${CURRENT_PACKAGES_DIR}/include/GL" +) + +if(NOT VCPKG_TARGET_IS_LINUX AND "plugins-base" IN_LIST FEATURES) + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/include/gst/gl/gstglconfig.h" + "${CURRENT_PACKAGES_DIR}/include/gstreamer-1.0/gst/gl/gstglconfig.h" + ) +endif() + +list(APPEND GST_BIN_TOOLS + gst-inspect-1.0 + gst-launch-1.0 + gst-stats-1.0 + gst-typefind-1.0 +) +list(APPEND GST_LIBEXEC_TOOLS + gst-plugin-scanner +) + +if("ges" IN_LIST FEATURES) + list(APPEND GST_BIN_TOOLS ges-launch-1.0) +endif() + +if("plugins-base" IN_LIST FEATURES) + list(APPEND GST_BIN_TOOLS + gst-device-monitor-1.0 + gst-discoverer-1.0 + gst-play-1.0 + ) +endif() + +if("plugins-bad" IN_LIST FEATURES) + list(APPEND GST_BIN_TOOLS + gst-transcoder-1.0 + ) +endif() + +vcpkg_copy_tools( + TOOL_NAMES ${GST_BIN_TOOLS} + AUTO_CLEAN +) + +vcpkg_copy_tools( + TOOL_NAMES ${GST_LIBEXEC_TOOLS} + SEARCH_DIR "${CURRENT_PACKAGES_DIR}/libexec/gstreamer-1.0" + AUTO_CLEAN +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/libexec" + "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/include" + "${CURRENT_PACKAGES_DIR}/libexec" + "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/include" + "${CURRENT_PACKAGES_DIR}/share/gdb" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Move plugin pkg-config files + file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/*") + file(COPY ${pc_files} DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") + file(GLOB pc_files_dbg "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/*") + file(COPY ${pc_files_dbg} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/" + "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/") + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" + "${CURRENT_PACKAGES_DIR}/bin" + ) + set(PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") + set(SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/${PREFIX}gstreamer-full-1.0${SUFFIX}" + "${CURRENT_PACKAGES_DIR}/lib/${PREFIX}gstreamer-full-1.0${SUFFIX}" + ) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gstreamer-1.0/gst/gstconfig.h" "!defined(GST_STATIC_COMPILATION)" "0") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + # move plugins to ${prefix}/plugins/${PORT} instead of ${prefix}/lib/gstreamer-1.0 + if(NOT VCPKG_BUILD_TYPE) + file(GLOB DBG_BINS "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}" + "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/*.pdb" + ) + file(COPY ${DBG_BINS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/plugins/${PORT}") + endif() + file(GLOB REL_BINS "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}" + "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/*.pdb" + ) + file(COPY ${REL_BINS} DESTINATION "${CURRENT_PACKAGES_DIR}/plugins/${PORT}") + file(REMOVE ${DBG_BINS} ${REL_BINS}) + if(NOT VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0" "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0") + endif() + + set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gstreamer-1.0.pc") + if(EXISTS "${_file}") + file(READ "${_file}" _contents) + string(REPLACE [[toolsdir=${exec_prefix}/bin]] "toolsdir=\${prefix}/../tools/${PORT}" _contents "${_contents}") + string(REPLACE [[pluginscannerdir=${libexecdir}/gstreamer-1.0]] "pluginscannerdir=\${prefix}/../tools/${PORT}" _contents "${_contents}") + string(REPLACE [[pluginsdir=${libdir}/gstreamer-1.0]] "pluginsdir=\${prefix}/plugins/${PORT}" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") + endif() + + set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gstreamer-1.0.pc") + if(EXISTS "${_file}") + file(READ "${_file}" _contents) + string(REPLACE [[toolsdir=${exec_prefix}/bin]] "toolsdir=\${prefix}/tools/${PORT}" _contents "${_contents}") + string(REPLACE [[pluginscannerdir=${libexecdir}/gstreamer-1.0]] "pluginscannerdir=\${prefix}/tools/${PORT}" _contents "${_contents}") + string(REPLACE [[pluginsdir=${libdir}/gstreamer-1.0]] "pluginsdir=\${prefix}/plugins/${PORT}" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") + endif() +endif() + +vcpkg_fixup_pkgconfig() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/gstreamer/remove_x264_define.patch b/vcpkg/ports/gstreamer/remove_x264_define.patch new file mode 100644 index 000000000..044fb926b --- /dev/null +++ b/vcpkg/ports/gstreamer/remove_x264_define.patch @@ -0,0 +1,18 @@ +diff --git a/ext/x264/gstx264enc.h b/ext/x264/gstx264enc.h +index 6cbfc5c3d..ba7845b20 100644 +--- a/ext/x264/gstx264enc.h ++++ b/ext/x264/gstx264enc.h +@@ -31,13 +31,6 @@ + #include + #endif + +-/* The x264.h header says this isn't needed with MinGW, but sometimes the +- * compiler is unable to correctly do the pointer indirection for us, which +- * leads to a segfault when you try to dereference any const values provided +- * by x264.dll. See: https://bugzilla.gnome.org/show_bug.cgi?id=779249 */ +-#if defined(_WIN32) && !defined(X264_API_IMPORTS) +-# define X264_API_IMPORTS +-#endif + #include + + G_BEGIN_DECLS diff --git a/vcpkg/ports/gstreamer/srtp_fix.patch b/vcpkg/ports/gstreamer/srtp_fix.patch new file mode 100644 index 000000000..ed4601d45 --- /dev/null +++ b/vcpkg/ports/gstreamer/srtp_fix.patch @@ -0,0 +1,30 @@ +diff --git a/subprojects/gst-plugins-bad/ext/srtp/meson.build b/subprojects/gst-plugins-bad/ext/srtp/meson.build +index 49eed5b..db5aed0 100644 +--- a/subprojects/gst-plugins-bad/ext/srtp/meson.build ++++ b/subprojects/gst-plugins-bad/ext/srtp/meson.build +@@ -6,13 +6,15 @@ srtp_sources = [ + 'gstsrtpenc.c', + ] + ++gst_plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') ++ + srtp_cargs = [] + if get_option('srtp').disabled() + srtp_dep = dependency('', required : false) + subdir_done() + endif + +-srtp_dep = dependency('libsrtp2', version : '>= 2.1.0', required : false) ++srtp_dep = dependency('libSRTP', modules: ['libSRTP::srtp2'], version : '>= 2.1.0', required : false) + if srtp_dep.found() + srtp_cargs += ['-DHAVE_SRTP2'] + else +@@ -38,7 +40,7 @@ if srtp_dep.found() + include_directories : [configinc], + dependencies : [gstrtp_dep, gstvideo_dep, srtp_dep], + install : true, +- install_dir : plugins_install_dir, ++ install_dir : gst_plugins_install_dir, + ) + plugins += [gstsrtp] + endif diff --git a/vcpkg/ports/gstreamer/vcpkg.json b/vcpkg/ports/gstreamer/vcpkg.json new file mode 100644 index 000000000..af363911b --- /dev/null +++ b/vcpkg/ports/gstreamer/vcpkg.json @@ -0,0 +1,841 @@ +{ + "name": "gstreamer", + "version": "1.22.5", + "port-version": 8, + "description": "GStreamer open-source multimedia framework core library", + "homepage": "https://gstreamer.freedesktop.org/", + "license": "LGPL-2.0-only", + "supports": "!uwp & !xbox", + "dependencies": [ + "glib", + { + "name": "glib", + "host": true + }, + { + "name": "opengl", + "platform": "windows | osx" + }, + { + "name": "vcpkg-tool-meson", + "host": true + } + ], + "default-features": [ + "plugins-base" + ], + "features": { + "aes": { + "description": "Enable support for AES encryption/decryption", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "openssl" + ] + }, + "alsa": { + "description": "Enable support for ALSA (Advanced Linux Sound Architecture)", + "supports": "linux", + "dependencies": [ + { + "name": "alsa", + "platform": "linux" + }, + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "aom": { + "description": "Enable support for the Alliance for Open Media (AOM) AV1 encoder and decoder", + "supports": "!windows", + "dependencies": [ + "aom", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + } + ] + }, + "asio": { + "description": "Enable support for the Steinberg Audio Streaming Input Output (ASIO) library (Windows only)", + "dependencies": [ + { + "name": "asiosdk", + "platform": "windows" + }, + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + } + ] + }, + "assrender": { + "description": "Enable support for the ASS/SSA subtitle renderer", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libass" + ] + }, + "bzip2-bad": { + "description": "Enable bzip2 stream compression in bad plugins", + "dependencies": [ + "bzip2", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + } + ] + }, + "bzip2-good": { + "description": "Enable bzip2 stream compression in good plugins", + "dependencies": [ + "bzip2", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + } + ] + }, + "cairo": { + "description": "Enable support for the cairo graphics library", + "dependencies": [ + { + "name": "cairo", + "features": [ + "gobject" + ] + }, + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + } + ] + }, + "chromaprint": { + "description": "Enable support for the Chromaprint audio fingerprint library", + "dependencies": [ + "chromaprint", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + } + ] + }, + "closedcaption": { + "description": "Enable support for the closed caption extractor, decoder, and overlay", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "pango" + ] + }, + "colormanagement": { + "description": "Enable support for the color management correction", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "lcms" + ] + }, + "dash": { + "description": "Enable support for the DASH demuxer", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libxml2" + ] + }, + "dc1394": { + "description": "Enable support for the libdc1394 IIDC camera source", + "supports": "!windows", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libdc1394" + ] + }, + "dtls": { + "description": "Enable support for the DTLS encoder and decoder", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "openssl" + ] + }, + "faad": { + "description": "Enable support for the free AAC audio decoder (GPL licensed)", + "dependencies": [ + "faad2", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "gpl", + "plugins-bad" + ] + } + ] + }, + "fdkaac": { + "description": "Enable support for the Fraunhofer AAC audio codec", + "dependencies": [ + "fdk-aac", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + } + ] + }, + "flac": { + "description": "Enable support for FLAC: Free Lossless Audio Codec", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "ogg", + "plugins-good" + ] + }, + "libflac" + ] + }, + "fluidsynth": { + "description": "Enable support for the Fluidsynth MIDI decoder", + "supports": "!windows", + "dependencies": [ + { + "name": "fluidsynth", + "platform": "!windows" + }, + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + } + ] + }, + "gdk-pixbuf": { + "description": "Enable support for gdk-pixbuf image loader", + "dependencies": [ + "gdk-pixbuf", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + } + ] + }, + "ges": { + "description": "Enable support for GStreamer Editing Services", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "gl-graphene": { + "description": "Use Graphene in OpenGL plugin", + "dependencies": [ + "graphene", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "gpl": { + "description": "Allow build of plugins that have (A)GPL-licensed dependencies", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "jpeg": { + "description": "Enable support for the JPEG file format", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base", + "plugins-good" + ] + }, + "libjpeg-turbo" + ] + }, + "libav": { + "description": "libav plugins", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false + }, + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "libde265": { + "description": "Enable support for the HEVC/H.265 video decoder", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libde265" + ] + }, + "microdns": { + "description": "Enable support for the microdns device provider", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libmicrodns" + ] + }, + "modplug": { + "description": "Enable support for the ModPlug audio decoder", + "supports": "!uwp", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + { + "name": "libmodplug", + "platform": "!uwp" + } + ] + }, + "mpg123": { + "description": "Enable support for the MPG123 decoding library", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + }, + "mpg123" + ] + }, + "nls": { + "description": "National language support", + "dependencies": [ + "gettext", + { + "name": "gettext", + "host": true, + "default-features": false, + "features": [ + "tools" + ] + }, + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "nvcodec": { + "description": "Enable support for the NVCODEC encoders and decoders", + "supports": "!osx & !ios & !android & !emscripten", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + } + ] + }, + "ogg": { + "description": "Enable support for the Ogg container format (commonly used by Vorbis, Theora and flac)", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + }, + "libogg" + ] + }, + "openal": { + "description": "Enable support for the OpenAL audio library", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "openal-soft" + ] + }, + "openh264": { + "description": "Enable support for the OpenH264 codec", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "openh264" + ] + }, + "openjpeg": { + "description": "Enable support for the JPEG2000 codec", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "openjpeg" + ] + }, + "openmpt": { + "description": "Enable support for the OpenMPT codec", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libopenmpt" + ] + }, + "opus-bad": { + "description": "Enable support for the Opus codec in bad plugins", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "opus" + ] + }, + "opus-base": { + "description": "Enable support for the Opus codec in base plugins", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + }, + "opus" + ] + }, + "pango": { + "description": "Enable support for pango font rendering", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + }, + "pango" + ] + }, + "plugins-bad": { + "description": "'Bad' GStreamer plugins and helper libraries", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "plugins-base": { + "description": "'Base' GStreamer plugins and helper libraries", + "dependencies": [ + "zlib" + ] + }, + "plugins-good": { + "description": "'Good' GStreamer plugins and helper libraries", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + }, + "zlib" + ] + }, + "plugins-ugly": { + "description": "'Ugly' GStreamer plugins and helper libraries", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "png": { + "description": "Enable support for the PNG image format", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + }, + "libpng" + ] + }, + "smoothstreaming": { + "description": "Enable support for the Microsoft Smooth Streaming format", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libxml2" + ] + }, + "sndfile": { + "description": "Enable support for the SndFile file reader/writer", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libsndfile" + ] + }, + "soundtouch": { + "description": "Enable support for the SoundTouch audio processing library", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "soundtouch" + ] + }, + "soup": { + "description": "Enable support for the soup plugin", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + }, + "libsoup" + ] + }, + "speex": { + "description": "Enable support for the speex codec", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + }, + "speex" + ] + }, + "srt": { + "description": "Enable support for the SRT protocol", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libsrt" + ] + }, + "srtp": { + "description": "Enable support for the SRTP protocol", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libsrtp" + ] + }, + "taglib": { + "description": "Enable support for the taglib library", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + }, + "taglib" + ] + }, + "vorbis": { + "description": "Enable support for the OggVorbis audio codec", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "ogg", + "plugins-base" + ] + }, + "libvorbis" + ] + }, + "vpx": { + "description": "Enable support for the VP8 and VP9 codecs", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + }, + "libvpx" + ] + }, + "webp": { + "description": "Enable support for WebP image format", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libwebp" + ] + }, + "webrtc": { + "description": "Enable support for WebRTC", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libnice" + ] + }, + "wildmidi": { + "description": "Enable support for the WildMIDI synthesizer", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "wildmidi" + ] + }, + "x11-bad": { + "description": "Enable support for X11 in bad plugins", + "supports": "!windows", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-bad" + ] + }, + "libxkbcommon", + "xcb" + ] + }, + "x11-base": { + "description": "Enable support for X11 in base plugins", + "supports": "!windows", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-good" + ] + }, + "libx11", + "libxext" + ] + }, + "x264": { + "description": "Enable support for the x264 encoder (GPL license)", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "gpl", + "plugins-ugly" + ] + }, + "x264" + ] + }, + "x265": { + "description": "Enable support for the x265 encoder (GPL license)", + "dependencies": [ + { + "name": "gstreamer", + "default-features": false, + "features": [ + "gpl", + "plugins-bad" + ] + }, + "x265" + ] + } + } +} diff --git a/vcpkg/ports/libb2/README b/vcpkg/ports/libb2/README new file mode 100644 index 000000000..4dfe72179 --- /dev/null +++ b/vcpkg/ports/libb2/README @@ -0,0 +1 @@ +https://github.com/microsoft/vcpkg/issues/43326 \ No newline at end of file diff --git a/vcpkg/ports/libb2/portfile.cmake b/vcpkg/ports/libb2/portfile.cmake new file mode 100644 index 000000000..452218f28 --- /dev/null +++ b/vcpkg/ports/libb2/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BLAKE2/libb2 + REF 2c5142f12a2cd52f3ee0a43e50a3a76f75badf85 + SHA512 cf29cf9391ae37a978eb6618de6f856f3defa622b8f56c2d5a519ab34fd5e4d91f3bb868601a44e9c9164a2992e80dde188ccc4d1605dffbdf93687336226f8d + HEAD_REF master +) + +set(OPTIONS) +if(CMAKE_HOST_WIN32) + set(OPTIONS --disable-native) # requires cpuid +endif() + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ax_cv_check_cflags___O3=no # see https://github.com/microsoft/vcpkg/pull/17912#issuecomment-840514179 + ${OPTIONS} +) +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libb2/vcpkg.json b/vcpkg/ports/libb2/vcpkg.json new file mode 100644 index 000000000..e8ef8ec05 --- /dev/null +++ b/vcpkg/ports/libb2/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libb2", + "version": "0.98.1", + "port-version": 6, + "description": "C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp", + "homepage": "https://github.com/BLAKE2/libb2", + "supports": "!windows" +} diff --git a/vcpkg/ports/qca/0001-fix-path-for-vcpkg.patch b/vcpkg/ports/qca/0001-fix-path-for-vcpkg.patch new file mode 100644 index 000000000..744fce107 --- /dev/null +++ b/vcpkg/ports/qca/0001-fix-path-for-vcpkg.patch @@ -0,0 +1,72 @@ +diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" +index 1f84c2c9e..f72ee9d8d 100644 +--- "a/CMakeLists.txt" ++++ "b/CMakeLists.txt" +@@ -58,6 +58,7 @@ set(QCA_SUFFIX "qt5") + if(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC) + set(STATIC_PLUGINS ON) + add_definitions(-DQT_STATICPLUGIN) ++ add_definitions(-DQCA_STATIC) + set(PLUGIN_TYPE "STATIC") + else() + set(PLUGIN_TYPE "MODULE") +@@ -266,10 +267,17 @@ if(DEVELOPER_MODE) + add_definitions(-DDEVELOPER_MODE) + + # To prefer plugins from build tree when run qca from build tree +- file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf +-"[Paths] +-Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME} +-") ++ if(NOT BUILD_SHARED_LIBS OR QT_IS_STATIC) ++ file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf ++ "[Paths] ++ Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME} ++ ") ++ else() ++ file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf ++ "[Paths] ++ Plugins=${CMAKE_BINARY_DIR}/bin/${QCA_LIB_NAME} ++ ") ++ endif() + endif() + + if (APPLE) +@@ -309,7 +317,7 @@ else() + set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem") + # note that INSTALL_FILES targets are relative to the current installation prefix... + if(NOT DEVELOPER_MODE) +- install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs") ++ install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/share/qca/certs") + endif() + endif() + message(STATUS "certstore path: " ${qca_CERTSTORE}) +@@ -390,10 +398,10 @@ endif() + include(CMakePackageConfigHelpers) + configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in" +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" +- INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}Config.cmake" ++ INSTALL_DESTINATION ${CMAKE_BINARY_DIR}/share/qca/cmake + ) +-write_basic_config_version_file("${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) ++write_basic_config_version_file("${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) + + if(NOT DEVELOPER_MODE) + +@@ -461,10 +469,10 @@ if(NOT DEVELOPER_MODE) + endif() + endif() + +- install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) ++ install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) + install(FILES +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" +- DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}Config.cmake" ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" ++ DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake + ) + endif() diff --git a/vcpkg/ports/qca/0002-fix-build-error.patch b/vcpkg/ports/qca/0002-fix-build-error.patch new file mode 100644 index 000000000..5515d21f7 --- /dev/null +++ b/vcpkg/ports/qca/0002-fix-build-error.patch @@ -0,0 +1,26 @@ +From 8d67288a3dde7e535ff747715f96f98282a3bf67 Mon Sep 17 00:00:00 2001 +From: Matthias Kuhn +Date: Fri, 3 Dec 2021 15:17:25 +0100 +Subject: [PATCH] Ifdef codecs + +--- + cmake/modules/QcaMacro.cmake | 9 --------- + plugins/qca-ossl/qca-ossl.cpp | 6 ++++++ + 2 files changed, 6 insertions(+), 9 deletions(-) + +diff --git a/cmake/modules/QcaMacro.cmake b/cmake/modules/QcaMacro.cmake +index 80af6e84..ba86310d 100644 +--- a/cmake/modules/QcaMacro.cmake ++++ b/cmake/modules/QcaMacro.cmake +@@ -65,10 +65,6 @@ macro(add_qca_test TARGET DESCRIPTION) + endmacro(add_qca_test) + + macro(install_pdb TARGET INSTALL_PATH) +- if(MSVC) +- install(FILES $ DESTINATION ${INSTALL_PATH} CONFIGURATIONS Debug) +- install(FILES $ DESTINATION ${INSTALL_PATH} CONFIGURATIONS RelWithDebInfo) +- endif() + endmacro(install_pdb) + + macro(normalize_path PATH) + diff --git a/vcpkg/ports/qca/0003-Define-NOMINMAX-for-botan-plugin-with-MSVC.patch b/vcpkg/ports/qca/0003-Define-NOMINMAX-for-botan-plugin-with-MSVC.patch new file mode 100644 index 000000000..d894000d6 --- /dev/null +++ b/vcpkg/ports/qca/0003-Define-NOMINMAX-for-botan-plugin-with-MSVC.patch @@ -0,0 +1,28 @@ +From f32f5ae8b8b49653bfff87f2f882862bcaa8c3f1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= + =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= +Date: Mon, 20 Mar 2023 16:21:18 +0100 +Subject: [PATCH] Define NOMINMAX to fix building qca-botan plugin with MSVC + +--- + plugins/qca-botan/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/plugins/qca-botan/CMakeLists.txt b/plugins/qca-botan/CMakeLists.txt +index 11c0d20..9b8b978 100644 +--- a/plugins/qca-botan/CMakeLists.txt ++++ b/plugins/qca-botan/CMakeLists.txt +@@ -11,6 +11,10 @@ if(BOTAN_FOUND) + set(QCA_BOTAN_SOURCES qca-botan.cpp) + add_library(qca-botan ${PLUGIN_TYPE} ${QCA_BOTAN_SOURCES}) + ++ if(MSVC) ++ target_compile_definitions(qca-botan PRIVATE NOMINMAX) ++ endif() ++ + if(APPLE AND ${PLUGIN_TYPE} STREQUAL "MODULE") + set_property(TARGET qca-botan PROPERTY SUFFIX ".dylib") + endif() +-- +2.40.0.windows.1 + diff --git a/vcpkg/ports/qca/connect_fix.patch b/vcpkg/ports/qca/connect_fix.patch new file mode 100644 index 000000000..0a2aa1377 --- /dev/null +++ b/vcpkg/ports/qca/connect_fix.patch @@ -0,0 +1,29 @@ +diff --git a/src/qca_safeobj.h b/src/qca_safeobj.h +index 5c47adad..20570b27 100644 +--- a/src/qca_safeobj.h ++++ b/src/qca_safeobj.h +@@ -57,7 +57,7 @@ public Q_SLOTS: + } + + Q_SIGNALS: +- void activated(); ++ void activated(QSocketDescriptor socket, QSocketNotifier::Type type); + + private: + QSocketNotifier *sn; +diff --git a/src/support/qpipe.cpp b/src/support/qpipe.cpp +index 122e96a8..2d9d8ab7 100644 +--- a/src/support/qpipe.cpp ++++ b/src/support/qpipe.cpp +@@ -1075,8 +1075,10 @@ public Q_SLOTS: + #endif + } + +- void sn_read_activated() ++ void sn_read_activated(QSocketDescriptor socket, QSocketNotifier::Type type) + { ++ Q_UNUSED(socket) ++ Q_UNUSED(type) + #ifdef Q_OS_UNIX + if (blockReadNotify) + return; diff --git a/vcpkg/ports/qca/ios.patch b/vcpkg/ports/qca/ios.patch new file mode 100644 index 000000000..06d53bd2c --- /dev/null +++ b/vcpkg/ports/qca/ios.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 47773219..0e2b90ac 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -52,7 +52,7 @@ SET( SOURCES + + IF (WIN32) + SET( SOURCES ${SOURCES} qca_systemstore_win.cpp ) +-elseif(APPLE AND NOT IOS) ++elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set( SOURCES ${SOURCES} qca_systemstore_mac.cpp) + else() + SET( SOURCES ${SOURCES} qca_systemstore_flatfile.cpp ) diff --git a/vcpkg/ports/qca/mk-ca-bundle.pl b/vcpkg/ports/qca/mk-ca-bundle.pl new file mode 100644 index 000000000..9574f1dbf --- /dev/null +++ b/vcpkg/ports/qca/mk-ca-bundle.pl @@ -0,0 +1,554 @@ +#!/usr/bin/perl -w +# *************************************************************************** +# * _ _ ____ _ +# * Project ___| | | | _ \| | +# * / __| | | | |_) | | +# * | (__| |_| | _ <| |___ +# * \___|\___/|_| \_\_____| +# * +# * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# * +# * This software is licensed as described in the file COPYING, which +# * you should have received as part of this distribution. The terms +# * are also available at https://curl.haxx.se/docs/copyright.html. +# * +# * You may opt to use, copy, modify, merge, publish, distribute and/or sell +# * copies of the Software, and permit persons to whom the Software is +# * furnished to do so, under the terms of the COPYING file. +# * +# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# * KIND, either express or implied. +# * +# *************************************************************************** +# This Perl script creates a fresh ca-bundle.crt file for use with libcurl. +# It downloads certdata.txt from Mozilla's source tree (see URL below), +# then parses certdata.txt and extracts CA Root Certificates into PEM format. +# These are then processed with the OpenSSL commandline tool to produce the +# final ca-bundle.crt file. +# The script is based on the parse-certs script written by Roland Krikava. +# This Perl script works on almost any platform since its only external +# dependency is the OpenSSL commandline tool for optional text listing. +# Hacked by Guenter Knauf. +# +use Encode; +use Getopt::Std; +use MIME::Base64; +use strict; +use vars qw($opt_b $opt_d $opt_f $opt_h $opt_i $opt_k $opt_l $opt_m $opt_n $opt_p $opt_q $opt_s $opt_t $opt_u $opt_v $opt_w); +use List::Util; +use Text::Wrap; +my $MOD_SHA = "Digest::SHA"; +eval "require $MOD_SHA"; +if ($@) { + $MOD_SHA = "Digest::SHA::PurePerl"; + eval "require $MOD_SHA"; +} +eval "require LWP::UserAgent"; + +my %urls = ( + 'nss' => + 'https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt', + 'central' => + 'https://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'aurora' => + 'https://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'beta' => + 'https://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'release' => + 'https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', +); + +$opt_d = 'release'; + +# If the OpenSSL commandline is not in search path you can configure it here! +my $openssl = 'openssl'; + +my $version = '1.27'; + +$opt_w = 76; # default base64 encoded lines length + +# default cert types to include in the output (default is to include CAs which may issue SSL server certs) +my $default_mozilla_trust_purposes = "SERVER_AUTH"; +my $default_mozilla_trust_levels = "TRUSTED_DELEGATOR"; +$opt_p = $default_mozilla_trust_purposes . ":" . $default_mozilla_trust_levels; + +my @valid_mozilla_trust_purposes = ( + "DIGITAL_SIGNATURE", + "NON_REPUDIATION", + "KEY_ENCIPHERMENT", + "DATA_ENCIPHERMENT", + "KEY_AGREEMENT", + "KEY_CERT_SIGN", + "CRL_SIGN", + "SERVER_AUTH", + "CLIENT_AUTH", + "CODE_SIGNING", + "EMAIL_PROTECTION", + "IPSEC_END_SYSTEM", + "IPSEC_TUNNEL", + "IPSEC_USER", + "TIME_STAMPING", + "STEP_UP_APPROVED" +); + +my @valid_mozilla_trust_levels = ( + "TRUSTED_DELEGATOR", # CAs + "NOT_TRUSTED", # Don't trust these certs. + "MUST_VERIFY_TRUST", # This explicitly tells us that it ISN'T a CA but is otherwise ok. In other words, this should tell the app to ignore any other sources that claim this is a CA. + "TRUSTED" # This cert is trusted, but only for itself and not for delegates (i.e. it is not a CA). +); + +my $default_signature_algorithms = $opt_s = "MD5"; + +my @valid_signature_algorithms = ( + "MD5", + "SHA1", + "SHA256", + "SHA384", + "SHA512" +); + +$0 =~ s@.*(/|\\)@@; +$Getopt::Std::STANDARD_HELP_VERSION = 1; +getopts('bd:fhiklmnp:qs:tuvw:'); + +if(!defined($opt_d)) { + # to make plain "-d" use not cause warnings, and actually still work + $opt_d = 'release'; +} + +# Use predefined URL or else custom URL specified on command line. +my $url; +if(defined($urls{$opt_d})) { + $url = $urls{$opt_d}; + if(!$opt_k && $url !~ /^https:\/\//i) { + die "The URL for '$opt_d' is not HTTPS. Use -k to override (insecure).\n"; + } +} +else { + $url = $opt_d; +} + +my $curl = `curl -V`; + +if ($opt_i) { + print ("=" x 78 . "\n"); + print "Script Version : $version\n"; + print "Perl Version : $]\n"; + print "Operating System Name : $^O\n"; + print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n"; + print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n"; + print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n" if($LWP::UserAgent::VERSION); + print "LWP.pm Version : ${LWP::VERSION}\n" if($LWP::VERSION); + print "Digest::SHA.pm Version : ${Digest::SHA::VERSION}\n" if ($Digest::SHA::VERSION); + print "Digest::SHA::PurePerl.pm Version : ${Digest::SHA::PurePerl::VERSION}\n" if ($Digest::SHA::PurePerl::VERSION); + print ("=" x 78 . "\n"); +} + +sub warning_message() { + if ( $opt_d =~ m/^risk$/i ) { # Long Form Warning and Exit + print "Warning: Use of this script may pose some risk:\n"; + print "\n"; + print " 1) If you use HTTP URLs they are subject to a man in the middle attack\n"; + print " 2) Default to 'release', but more recent updates may be found in other trees\n"; + print " 3) certdata.txt file format may change, lag time to update this script\n"; + print " 4) Generally unwise to blindly trust CAs without manual review & verification\n"; + print " 5) Mozilla apps use additional security checks aren't represented in certdata\n"; + print " 6) Use of this script will make a security engineer grind his teeth and\n"; + print " swear at you. ;)\n"; + exit; + } else { # Short Form Warning + print "Warning: Use of this script may pose some risk, -d risk for more details.\n"; + } +} + +sub HELP_MESSAGE() { + print "Usage:\t${0} [-b] [-d] [-f] [-i] [-k] [-l] [-n] [-p] [-q] [-s] [-t] [-u] [-v] [-w] []\n"; + print "\t-b\tbackup an existing version of ca-bundle.crt\n"; + print "\t-d\tspecify Mozilla tree to pull certdata.txt or custom URL\n"; + print "\t\t Valid names are:\n"; + print "\t\t ", join( ", ", map { ( $_ =~ m/$opt_d/ ) ? "$_ (default)" : "$_" } sort keys %urls ), "\n"; + print "\t-f\tforce rebuild even if certdata.txt is current\n"; + print "\t-i\tprint version info about used modules\n"; + print "\t-k\tallow URLs other than HTTPS, enable HTTP fallback (insecure)\n"; + print "\t-l\tprint license info about certdata.txt\n"; + print "\t-m\tinclude meta data in output\n"; + print "\t-n\tno download of certdata.txt (to use existing)\n"; + print wrap("\t","\t\t", "-p\tlist of Mozilla trust purposes and levels for certificates to include in output. Takes the form of a comma separated list of purposes, a colon, and a comma separated list of levels. (default: $default_mozilla_trust_purposes:$default_mozilla_trust_levels)"), "\n"; + print "\t\t Valid purposes are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_purposes ) ), "\n"; + print "\t\t Valid levels are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_levels ) ), "\n"; + print "\t-q\tbe really quiet (no progress output at all)\n"; + print wrap("\t","\t\t", "-s\tcomma separated list of certificate signatures/hashes to output in plain text mode. (default: $default_signature_algorithms)\n"); + print "\t\t Valid signature algorithms are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_signature_algorithms ) ), "\n"; + print "\t-t\tinclude plain text listing of certificates\n"; + print "\t-u\tunlink (remove) certdata.txt after processing\n"; + print "\t-v\tbe verbose and print out processed CAs\n"; + print "\t-w \twrap base64 output lines after chars (default: ${opt_w})\n"; + exit; +} + +sub VERSION_MESSAGE() { + print "${0} version ${version} running Perl ${]} on ${^O}\n"; +} + +warning_message() unless ($opt_q || $url =~ m/^(ht|f)tps:/i ); +HELP_MESSAGE() if ($opt_h); + +sub report($@) { + my $output = shift; + + print STDERR $output . "\n" unless $opt_q; +} + +sub is_in_list($@) { + my $target = shift; + + return defined(List::Util::first { $target eq $_ } @_); +} + +# Parses $param_string as a case insensitive comma separated list with optional whitespace +# validates that only allowed parameters are supplied +sub parse_csv_param($$@) { + my $description = shift; + my $param_string = shift; + my @valid_values = @_; + + my @values = map { + s/^\s+//; # strip leading spaces + s/\s+$//; # strip trailing spaces + uc $_ # return the modified string as upper case + } split( ',', $param_string ); + + # Find all values which are not in the list of valid values or "ALL" + my @invalid = grep { !is_in_list($_,"ALL",@valid_values) } @values; + + if ( scalar(@invalid) > 0 ) { + # Tell the user which parameters were invalid and print the standard help message which will exit + print "Error: Invalid ", $description, scalar(@invalid) == 1 ? ": " : "s: ", join( ", ", map { "\"$_\"" } @invalid ), "\n"; + HELP_MESSAGE(); + } + + @values = @valid_values if ( is_in_list("ALL",@values) ); + + return @values; +} + +sub sha256 { + my $result; + if ($Digest::SHA::VERSION || $Digest::SHA::PurePerl::VERSION) { + open(FILE, $_[0]) or die "Can't open '$_[0]': $!"; + binmode(FILE); + $result = $MOD_SHA->new(256)->addfile(*FILE)->hexdigest; + close(FILE); + } else { + # Use OpenSSL command if Perl Digest::SHA modules not available + $result = `"$openssl" dgst -r -sha256 "$_[0]"`; + $result =~ s/^([0-9a-f]{64}) .+/$1/is; + } + return $result; +} + + +sub oldhash { + my $hash = ""; + open(C, "<$_[0]") || return 0; + while() { + chomp; + if($_ =~ /^\#\# SHA256: (.*)/) { + $hash = $1; + last; + } + } + close(C); + return $hash; +} + +if ( $opt_p !~ m/:/ ) { + print "Error: Mozilla trust identifier list must include both purposes and levels\n"; + HELP_MESSAGE(); +} + +(my $included_mozilla_trust_purposes_string, my $included_mozilla_trust_levels_string) = split( ':', $opt_p ); +my @included_mozilla_trust_purposes = parse_csv_param( "trust purpose", $included_mozilla_trust_purposes_string, @valid_mozilla_trust_purposes ); +my @included_mozilla_trust_levels = parse_csv_param( "trust level", $included_mozilla_trust_levels_string, @valid_mozilla_trust_levels ); + +my @included_signature_algorithms = parse_csv_param( "signature algorithm", $opt_s, @valid_signature_algorithms ); + +sub should_output_cert(%) { + my %trust_purposes_by_level = @_; + + foreach my $level (@included_mozilla_trust_levels) { + # for each level we want to output, see if any of our desired purposes are included + return 1 if ( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) ); + } + + return 0; +} + +my $crt = $ARGV[0] || 'ca-bundle.crt'; +(my $txt = $url) =~ s@(.*/|\?.*)@@g; + +my $stdout = $crt eq '-'; +my $resp; +my $fetched; + +my $oldhash = oldhash($crt); + +report "SHA256 of old file: $oldhash"; + +if(!$opt_n) { + report "Downloading $txt ..."; + + # If we have an HTTPS URL then use curl + if($url =~ /^https:\/\//i) { + if($curl) { + if($curl =~ /^Protocols:.* https( |$)/m) { + report "Get certdata with curl!"; + my $proto = !$opt_k ? "--proto =https" : ""; + my $quiet = $opt_q ? "-s" : ""; + my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`; + if(@out && $out[0] == 200) { + $fetched = 1; + report "Downloaded $txt"; + } + else { + report "Failed downloading via HTTPS with curl"; + if(-e $txt && !unlink($txt)) { + report "Failed to remove '$txt': $!"; + } + } + } + else { + report "curl lacks https support"; + } + } + else { + report "curl not found"; + } + } + + # If nothing was fetched then use LWP + if(!$fetched) { + if($url =~ /^https:\/\//i) { + report "Falling back to HTTP"; + $url =~ s/^https:\/\//http:\/\//i; + } + if(!$opt_k) { + report "URLs other than HTTPS are disabled by default, to enable use -k"; + exit 1; + } + report "Get certdata with LWP!"; + if(!defined(${LWP::UserAgent::VERSION})) { + report "LWP is not available (LWP::UserAgent not found)"; + exit 1; + } + my $ua = new LWP::UserAgent(agent => "$0/$version"); + $ua->env_proxy(); + $resp = $ua->mirror($url, $txt); + if($resp && $resp->code eq '304') { + report "Not modified"; + exit 0 if -e $crt && !$opt_f; + } + else { + $fetched = 1; + report "Downloaded $txt"; + } + if(!$resp || $resp->code !~ /^(?:200|304)$/) { + report "Unable to download latest data: " + . ($resp? $resp->code . ' - ' . $resp->message : "LWP failed"); + exit 1 if -e $crt || ! -r $txt; + } + } +} + +my $filedate = $resp ? $resp->last_modified : (stat($txt))[9]; +my $datesrc = "as of"; +if(!$filedate) { + # mxr.mozilla.org gave us a time, hg.mozilla.org does not! + $filedate = time(); + $datesrc="downloaded on"; +} + +# get the hash from the download file +my $newhash= sha256($txt); + +if(!$opt_f && $oldhash eq $newhash) { + report "Downloaded file identical to previous run\'s source file. Exiting"; + exit; +} + +report "SHA256 of new file: $newhash"; + +my $currentdate = scalar gmtime($filedate); + +my $format = $opt_t ? "plain text and " : ""; +if( $stdout ) { + open(CRT, '> -') or die "Couldn't open STDOUT: $!\n"; +} else { + open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n"; +} +print CRT <) { + if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) { + print CRT; + print if ($opt_l); + while () { + print CRT; + print if ($opt_l); + last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/); + } + } + elsif(/^# (Issuer|Serial Number|Subject|Not Valid Before|Not Valid After |Fingerprint \(MD5\)|Fingerprint \(SHA1\)):/) { + push @precert, $_; + next; + } + elsif(/^#|^\s*$/) { + undef @precert; + next; + } + chomp; + + # this is a match for the start of a certificate + if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) { + $start_of_cert = 1 + } + if ($start_of_cert && /^CKA_LABEL UTF8 \"(.*)\"/) { + $caname = $1; + } + my %trust_purposes_by_level; + if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) { + my $data; + while () { + last if (/^END/); + chomp; + my @octets = split(/\\/); + shift @octets; + for (@octets) { + $data .= chr(oct); + } + } + # scan forwards until the trust part + while () { + last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/); + chomp; + } + # now scan the trust part to determine how we should trust this cert + while () { + last if (/^#/); + if (/^CKA_TRUST_([A-Z_]+)\s+CK_TRUST\s+CKT_NSS_([A-Z_]+)\s*$/) { + if ( !is_in_list($1,@valid_mozilla_trust_purposes) ) { + report "Warning: Unrecognized trust purpose for cert: $caname. Trust purpose: $1. Trust Level: $2"; + } elsif ( !is_in_list($2,@valid_mozilla_trust_levels) ) { + report "Warning: Unrecognized trust level for cert: $caname. Trust purpose: $1. Trust Level: $2"; + } else { + push @{$trust_purposes_by_level{$2}}, $1; + } + } + } + + if ( !should_output_cert(%trust_purposes_by_level) ) { + $skipnum ++; + } else { + my $encoded = MIME::Base64::encode_base64($data, ''); + $encoded =~ s/(.{1,${opt_w}})/$1\n/g; + my $pem = "-----BEGIN CERTIFICATE-----\n" + . $encoded + . "-----END CERTIFICATE-----\n"; + print CRT "\n$caname\n"; + print CRT @precert if($opt_m); + my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK)); + if ($opt_t) { + foreach my $key (keys %trust_purposes_by_level) { + my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}}); + $maxStringLength = List::Util::max( length($string), $maxStringLength ); + print CRT $string . "\n"; + } + } + print CRT ("=" x $maxStringLength . "\n"); + if (!$opt_t) { + print CRT $pem; + } else { + my $pipe = ""; + foreach my $hash (@included_signature_algorithms) { + $pipe = "|$openssl x509 -" . $hash . " -fingerprint -noout -inform PEM"; + if (!$stdout) { + $pipe .= " >> $crt.~"; + close(CRT) or die "Couldn't close $crt.~: $!"; + } + open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; + print TMP $pem; + close(TMP) or die "Couldn't close openssl pipe: $!"; + if (!$stdout) { + open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; + } + } + $pipe = "|$openssl x509 -text -inform PEM"; + if (!$stdout) { + $pipe .= " >> $crt.~"; + close(CRT) or die "Couldn't close $crt.~: $!"; + } + open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; + print TMP $pem; + close(TMP) or die "Couldn't close openssl pipe: $!"; + if (!$stdout) { + open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; + } + } + report "Parsing: $caname" if ($opt_v); + $certnum ++; + $start_of_cert = 0; + } + undef @precert; + } + +} +close(TXT) or die "Couldn't close $txt: $!\n"; +close(CRT) or die "Couldn't close $crt.~: $!\n"; +unless( $stdout ) { + if ($opt_b && -e $crt) { + my $bk = 1; + while (-e "$crt.~${bk}~") { + $bk++; + } + rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n"; + } elsif( -e $crt ) { + unlink( $crt ) or die "Failed to remove $crt: $!\n"; + } + rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n"; +} +if($opt_u && -e $txt && !unlink($txt)) { + report "Failed to remove $txt: $!\n"; +} +report "Done ($certnum CA certs processed, $skipnum skipped)."; diff --git a/vcpkg/ports/qca/portfile.cmake b/vcpkg/ports/qca/portfile.cmake new file mode 100644 index 000000000..3f695104e --- /dev/null +++ b/vcpkg/ports/qca/portfile.cmake @@ -0,0 +1,102 @@ +# This portfile adds the Qt Cryptographic Arcitecture +# Changes to the original build: +# No -qt5 suffix, which is recommended just for Linux +# Output directories according to vcpkg +# Updated certstore. See certstore.pem in the output dirs +# +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path("${PERL_EXE_PATH}") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/qca + REF "v${VERSION}" + SHA512 956d36058db61498c492fc9b5345b45ca75a5e8214fcbf358273dfacdd5980c1394394652536d9332df05f29fc912d0781338bcca403d98de1285bb8b1216402 + PATCHES + 0001-fix-path-for-vcpkg.patch + 0002-fix-build-error.patch + 0003-Define-NOMINMAX-for-botan-plugin-with-MSVC.patch +) + +vcpkg_find_acquire_program(PKGCONFIG) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(QCA_FEATURE_INSTALL_DIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/Qca) + set(QCA_FEATURE_INSTALL_DIR_RELEASE ${CURRENT_PACKAGES_DIR}/bin/Qca) +else() + set(QCA_FEATURE_INSTALL_DIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/Qca) + set(QCA_FEATURE_INSTALL_DIR_RELEASE ${CURRENT_PACKAGES_DIR}/lib/Qca) +endif() + +# According to: +# https://www.openssl.org/docs/faq.html#USER16 +# it is up to developers or admins to maintain CAs. +# So we do it here: +message(STATUS "Importing certstore") +file(REMOVE "${SOURCE_PATH}/certs/rootcerts.pem") + +# Using file(DOWNLOAD) to use https +file(DOWNLOAD https://raw.githubusercontent.com/mozilla/gecko-dev/master/security/nss/lib/ckfw/builtins/certdata.txt + "${CURRENT_BUILDTREES_DIR}/cert/certdata.txt" + TLS_VERIFY ON +) +vcpkg_execute_required_process( + COMMAND "${PERL}" "${CMAKE_CURRENT_LIST_DIR}/mk-ca-bundle.pl" -n "${SOURCE_PATH}/certs/rootcerts.pem" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/cert" + LOGNAME ca-bundle +) +message(STATUS "Importing certstore done") + +set(PLUGINS logger softstore wincrypto) +if("botan" IN_LIST FEATURES) + list(APPEND PLUGINS botan) +endif() +if ("gnupg" IN_LIST FEATURES) + list(APPEND PLUGINS gnupg) +endif() +if ("ossl" IN_LIST FEATURES) + list(APPEND PLUGINS ossl) +endif() + +# Configure and build +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DUSE_RELATIVE_PATHS=ON + "-DBUILD_PLUGINS=${PLUGINS}" + -DBUILD_TESTS=OFF + -DBUILD_TOOLS=OFF + -DBUILD_WITH_QT6=ON + -DQCA_SUFFIX=OFF + -DQCA_FEATURE_INSTALL_DIR=share/qca/mkspecs/features + -DOSX_FRAMEWORK=OFF + "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" + OPTIONS_DEBUG + -DQCA_PLUGINS_INSTALL_DIR=${QCA_FEATURE_INSTALL_DIR_DEBUG} + OPTIONS_RELEASE + -DQCA_PLUGINS_INSTALL_DIR=${QCA_FEATURE_INSTALL_DIR_RELEASE} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH share/qca/cmake) +file(READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/QcaConfig.cmake" QCA_CONFIG_FILE) +string(REGEX REPLACE "PACKAGE_PREFIX_DIR \"(.*)\" ABSOLUTE" + [[PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE]] + QCA_CONFIG_FILE "${QCA_CONFIG_FILE}" +) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/QcaConfig.cmake" "${QCA_CONFIG_FILE}") + +# Remove unneeded dirs +file(REMOVE_RECURSE + "${CURRENT_BUILDTREES_DIR}/share/man" + "${CURRENT_PACKAGES_DIR}/share/man" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +vcpkg_fixup_pkgconfig() + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/vcpkg/ports/qca/vcpkg.json b/vcpkg/ports/qca/vcpkg.json new file mode 100644 index 000000000..fb13e41ea --- /dev/null +++ b/vcpkg/ports/qca/vcpkg.json @@ -0,0 +1,44 @@ +{ + "name": "qca", + "version": "2.3.9", + "description": "Qt Cryptographic Architecture (QCA).", + "homepage": "https://userbase.kde.org/QCA", + "dependencies": [ + { + "name": "qt5compat", + "default-features": false + }, + { + "name": "qtbase", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "botan" + ], + "features": { + "botan": { + "description": "Build with botan", + "dependencies": [ + "botan" + ] + }, + "gnupg": { + "description": "Build with gnupg" + }, + "ossl": { + "description": "Build with openssl", + "dependencies": [ + "openssl" + ] + } + } +} diff --git a/vcpkg/ports/qgis/applocal.ps1 b/vcpkg/ports/qgis/applocal.ps1 new file mode 100644 index 000000000..10119875d --- /dev/null +++ b/vcpkg/ports/qgis/applocal.ps1 @@ -0,0 +1,125 @@ +[cmdletbinding()] +param([string]$targetBinary, [string]$installedDir, [string]$tlogFile, [string]$copiedFilesLog, [string]$outputDir) + +$g_searched = @{} +# Note: installedDir is actually the bin\ directory. +$g_install_root = Split-Path $installedDir -parent +$g_is_debug = $g_install_root -match '(.*\\)?debug(\\)?$' + +# Ensure we create the copied files log, even if we don't end up copying any files +if ($copiedFilesLog) +{ + Set-Content -Path $copiedFilesLog -Value "" -Encoding UTF8 +} + +# Note: this function signature is depended upon by the qtdeploy.ps1 script introduced in 5.7.1-7 +function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$targetBinaryName) { + if (Test-Path "$targetBinaryDir\$targetBinaryName") { + $sourceModTime = (Get-Item $SourceDir\$targetBinaryName).LastWriteTime + $destModTime = (Get-Item $targetBinaryDir\$targetBinaryName).LastWriteTime + if ($destModTime -lt $sourceModTime) { + Write-Verbose " ${targetBinaryName}: Updating $SourceDir\$targetBinaryName" + Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir + } else { + Write-Verbose " ${targetBinaryName}: already present" + } + } + else { + Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName" + Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir + } + if ($copiedFilesLog) { Add-Content $copiedFilesLog "$targetBinaryDir\$targetBinaryName" -Encoding UTF8 } + if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" -Encoding Unicode } +} + + +Write-Verbose "Resolving base path $targetBinary..." +try +{ + $baseBinaryPath = Resolve-Path $targetBinary -erroraction stop + $baseTargetBinaryDir = Split-Path $baseBinaryPath -parent + if (![string]::IsNullOrEmpty($outputDir)) { + if (Test-Path "$outputDir\$_"){ + $baseTargetBinaryDir = $outputDir + } else { + Write-Error " ${outputDir} not found" + return + } + } +} +catch [System.Management.Automation.ItemNotFoundException] +{ + return +} + +# Note: this function signature is depended upon by the qtdeploy.ps1 script +function resolve([string]$targetBinary) { + Write-Verbose "Resolving $targetBinary..." + try + { + $targetBinaryPath = Resolve-Path $targetBinary -erroraction stop + } + catch [System.Management.Automation.ItemNotFoundException] + { + return + } + $targetBinaryDir = Split-Path $targetBinaryPath -parent + + $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" }) + $a | % { + if ([string]::IsNullOrEmpty($_)) { + return + } + if ($g_searched.ContainsKey($_)) { + Write-Verbose " ${_}: previously searched - Skip" + return + } + $g_searched.Set_Item($_, $true) + if (Test-Path "$installedDir\$_") { + deployBinary $baseTargetBinaryDir $installedDir "$_" + if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $baseTargetBinaryDir "$g_install_root\plugins" "$_" } + if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" } + if (Test-Path function:\deployPluginsIfMagnum) { + if ($g_is_debug) { + deployPluginsIfMagnum $targetBinaryDir "$g_install_root\bin\magnum-d" "$_" + } else { + deployPluginsIfMagnum $targetBinaryDir "$g_install_root\bin\magnum" "$_" + } + } + if (Test-Path function:\deployAzureKinectSensorSDK) { deployAzureKinectSensorSDK $targetBinaryDir "$g_install_root" "$_" } + resolve "$baseTargetBinaryDir\$_" + } elseif (Test-Path "$targetBinaryDir\$_") { + Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" + resolve "$targetBinaryDir\$_" + } else { + Write-Verbose " ${_}: $installedDir\$_ not found" + } + } + Write-Verbose "Done Resolving $targetBinary." +} + +# Note: This is a hack to make Qt5 work. +# Introduced with Qt package version 5.7.1-7 +if (Test-Path "$g_install_root\plugins\qtdeploy.ps1") { + . "$g_install_root\plugins\qtdeploy.ps1" +} + +# Note: This is a hack to make OpenNI2 work. +if (Test-Path "$g_install_root\bin\OpenNI2\openni2deploy.ps1") { + . "$g_install_root\bin\OpenNI2\openni2deploy.ps1" +} + +# Note: This is a hack to make Magnum work. +if (Test-Path "$g_install_root\bin\magnum\magnumdeploy.ps1") { + . "$g_install_root\bin\magnum\magnumdeploy.ps1" +} elseif (Test-Path "$g_install_root\bin\magnum-d\magnumdeploy.ps1") { + . "$g_install_root\bin\magnum-d\magnumdeploy.ps1" +} + +# Note: This is a hack to make Azure Kinect Sensor SDK work. +if (Test-Path "$g_install_root\tools\azure-kinect-sensor-sdk\k4adeploy.ps1") { + . "$g_install_root\tools\azure-kinect-sensor-sdk\k4adeploy.ps1" +} + +resolve($targetBinary) +Write-Verbose $($g_searched | out-string) diff --git a/vcpkg/ports/qgis/cmakelists.patch b/vcpkg/ports/qgis/cmakelists.patch new file mode 100644 index 000000000..d2b22c7d2 --- /dev/null +++ b/vcpkg/ports/qgis/cmakelists.patch @@ -0,0 +1,39 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -387,6 +387,7 @@ if(WITH_CORE) + message(STATUS "Found Geos: ${GEOS_VERSION} ${GEOS_DIR}") + find_package(GDAL REQUIRED) + message(STATUS "Found GDAL: ${GDAL_VERSION} ${GDAL_DIR}") ++ set(GDAL_LIBRARY ${GDAL_LIBRARIES}) + find_package(EXPAT REQUIRED) + find_package(Spatialindex REQUIRED) + find_package(LibZip REQUIRED) +@@ -409,7 +410,8 @@ if(WITH_CORE) + find_package(ZLIB REQUIRED) # for decompression of vector tiles in MBTiles file + message(STATUS "Found zlib: ${ZLIB_LIBRARIES}") + +- find_package(EXIV2 REQUIRED) ++ find_package(exiv2 REQUIRED) ++ set(EXIV2_LIBRARY exiv2lib) + + # optional + if (WITH_POSTGRESQL) +@@ -604,6 +606,10 @@ if(WITH_CORE) + else() + find_package(Qt5Keychain CONFIG REQUIRED) + endif() ++ set(QTKEYCHAIN_INCLUDE_DIR ${QTKEYCHAIN_INCLUDE_DIRS}/qt6keychain) ++ set(QTKEYCHAIN_LIBRARY ${QTKEYCHAIN_LIBRARIES}) ++ set(QTKEYCHAIN_FOUND ${Qt6Keychain_FOUND}) ++ + # Master password hash and authentication encryption + find_package(QCA REQUIRED) + # Check for runtime dependency of qca-ossl plugin +@@ -818,6 +824,7 @@ endif() + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + # disable macros that offend std::numeric_limits::min()/max() + add_definitions(-DNOMINMAX) ++ add_definitions(/bigobj) + endif() + + # Prevent build when Qt api deprecated before this Qt version is used: diff --git a/vcpkg/ports/qgis/crssync.patch b/vcpkg/ports/qgis/crssync.patch new file mode 100644 index 000000000..f3f28c349 --- /dev/null +++ b/vcpkg/ports/qgis/crssync.patch @@ -0,0 +1,13 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -16,7 +16,9 @@ add_subdirectory(crssync) + + add_subdirectory(providers) + +-add_subdirectory(crssync) ++if (NOT FORCE_STATIC_LIBS) ++ add_subdirectory(crssync) ++endif() + + if (WITH_CRASH_HANDLER) + add_subdirectory(crashhandler) diff --git a/vcpkg/ports/qgis/libxml2.patch b/vcpkg/ports/qgis/libxml2.patch new file mode 100644 index 000000000..2d4bfd105 --- /dev/null +++ b/vcpkg/ports/qgis/libxml2.patch @@ -0,0 +1,11 @@ +--- a/src/providers/mdal/CMakeLists.txt ++++ b/src/providers/mdal/CMakeLists.txt +@@ -16,7 +16,7 @@ find_package(LibXml2) + endif() + find_package(HDF5) + find_package(NetCDF) +-find_package(LibXml2) ++find_package(libxml2 CONFIG) + + ######################################################## + # Compile internal MDAL diff --git a/vcpkg/ports/qgis/portfile.cmake b/vcpkg/ports/qgis/portfile.cmake new file mode 100644 index 000000000..43e6af380 --- /dev/null +++ b/vcpkg/ports/qgis/portfile.cmake @@ -0,0 +1,275 @@ +set(QGIS_REF 55d788f1f80183bd52fd8045c1fbed5e6260f194) # final-3_40_4 +set(QGIS_SHA512 6eb3e2259fda72f7e2e8203d951b891963d52d47128793af02dfa989a467ba5524ab7a1019b4cf4acfd9e70c21635bd7b8577dc452d5cf7b98fcf7ce03d97b9f) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO qgis/QGIS + REF ${QGIS_REF} + SHA512 ${QGIS_SHA512} + PATCHES + cmakelists.patch + crssync.patch + libxml2.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindQtKeychain.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindGDAL.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindGEOS.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindEXIV2.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindExpat.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindIconv.cmake) + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_PATH}) +vcpkg_add_to_path(${PYTHON3_PATH}/Scripts) +set(PYTHON_EXECUTABLE ${PYTHON3}) + +list(APPEND QGIS_OPTIONS -DFORCE_STATIC_LIBS:BOOL=ON) +list(APPEND QGIS_OPTIONS -DWITH_SPATIALITE:BOOL=ON) +list(APPEND QGIS_OPTIONS -DBUILD_WITH_QT6:BOOL=ON) + +list(APPEND QGIS_OPTIONS -DENABLE_TESTS:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_QTWEBKIT:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_GRASS7:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_QSPATIALITE:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DUSE_OPENCL:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_BINDINGS:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_GUI:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_DESKTOP:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_CUSTOM_WIDGETS:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_SERVER_PLUGINS:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_SERVER:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_QGIS_PROCESS:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_PDAL:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_EPT:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_3D:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_DRACO:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_COPC=OFF) +list(APPEND QGIS_OPTIONS -DWITH_ANALYSIS=OFF) +list(APPEND QGIS_OPTIONS -DWITH_GRASS=OFF) +list(APPEND QGIS_OPTIONS -DWITH_GEOREFERENCER:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_QTMOBILITY:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DENABLE_TESTS=OFF) +list(APPEND QGIS_OPTIONS -DWITH_QWTPOLAR=OFF) +list(APPEND QGIS_OPTIONS -DWITH_GUI=OFF) +list(APPEND QGIS_OPTIONS -DWITH_APIDOC=OFF) +list(APPEND QGIS_OPTIONS -DWITH_ASTYLE=OFF) +list(APPEND QGIS_OPTIONS -DWITH_QT5SERIALPORT=OFF) +list(APPEND QGIS_OPTIONS -DWITH_QUICK:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DQGIS_MACAPP_FRAMEWORK=FALSE) +list(APPEND QGIS_OPTIONS -DWITH_QTSERIALPORT=FALSE) + +# Configure debug and release library paths +macro(FIND_LIB_OPTIONS basename relname debname suffix libsuffix) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}${relname}${libsuffix}" ${basename}_LIBRARY_RELEASE) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}${debname}${libsuffix}" ${basename}_LIBRARY_DEBUG) + if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE ) + list(APPEND QGIS_OPTIONS_RELEASE -D${basename}_${suffix}:FILEPATH=${${basename}_LIBRARY_RELEASE}) + list(APPEND QGIS_OPTIONS_DEBUG -D${basename}_${suffix}:FILEPATH=${${basename}_LIBRARY_DEBUG}) + elseif( ${basename}_LIBRARY_RELEASE ) + list(APPEND QGIS_OPTIONS -D${basename}_${suffix}:FILEPATH=${${basename}_LIBRARY_RELEASE}) + elseif( ${basename}_LIBRARY_DEBUG ) + list(APPEND QGIS_OPTIONS -D${basename}_${suffix}:FILEPATH=${${basename}_LIBRARY_DEBUG}) + endif() +endmacro() + +# QGIS likes to install auth and providers to different locations on each platform +# let's keep things clean and tidy and put them at a predictable location +list(APPEND QGIS_OPTIONS -DQGIS_PLUGIN_SUBDIR=lib) + +# By default QGIS installs includes into "include" on Windows and into "include/qgis" everywhere else +# let's keep things clean and tidy and put them at a predictable location +list(APPEND QGIS_OPTIONS -DQGIS_INCLUDE_SUBDIR=include/qgis) + + +if(VCPKG_TARGET_IS_WINDOWS) + ############################################################################## + #Install pip + # if(NOT EXISTS "${PYTHON3_PATH}/Scripts/pip.exe") + # MESSAGE(STATUS "Install pip for Python Begin ...") + # vcpkg_download_distfile( + # GET_PIP_PATH + # URLS https://bootstrap.pypa.io/pip/3.5/get-pip.py + # FILENAME get-pip.py + # SHA512 a408dd74e69a2c3259e06669562bebfff676156a1a3b2f8ba6594ed308e3f94afdf79257688e59b02bf02bd7f6ecbea510fc6665b403149031f14bcc08308a47 + # ) + + # vcpkg_execute_required_process( + # COMMAND "${PYTHON_EXECUTABLE}" "${GET_PIP_PATH}" + # WORKING_DIRECTORY ${PYTHON3_PATH} + # LOGNAME pip + # ) + + # vcpkg_execute_required_process( + # COMMAND "${PYTHON_EXECUTABLE}" -m pip install --upgrade pip + # WORKING_DIRECTORY ${PYTHON3_PATH} + # LOGNAME pip + # ) + # MESSAGE(STATUS "Install pip for Python End") + # endif (NOT EXISTS "${PYTHON3_PATH}/Scripts/pip.exe") + ############################################################################## + + list(APPEND QGIS_OPTIONS -DBISON_EXECUTABLE="${BISON}") + list(APPEND QGIS_OPTIONS -DFLEX_EXECUTABLE="${FLEX}") + + # list(APPEND QGIS_OPTIONS -DPYUIC_PROGRAM=${PYTHON3_PATH}/Scripts/pyuic5.exe) + # list(APPEND QGIS_OPTIONS -DPYRCC_PROGRAM=${PYTHON3_PATH}/Scripts/pyrcc5.exe) + # list(APPEND QGIS_OPTIONS -DQT_LRELEASE_EXECUTABLE=${CURRENT_INSTALLED_DIR}/tools/qt5-tools/bin/lrelease.exe) + + # qgis_gui depends on Qt5UiTools, and Qt5UiTools is a static library. + # If Qt5_EXCLUDE_STATIC_DEPENDENCIES is not set, it will add the QT release library that it depends on. + # so that in debug mode, it will reference both the qt debug library and the release library. + # In Debug mode, add Qt5_EXCLUDE_STATIC_DEPENDENCIES to avoid this bug + list(APPEND QGIS_OPTIONS_DEBUG -DQt5_EXCLUDE_STATIC_DEPENDENCIES:BOOL=ON) + + FIND_LIB_OPTIONS(GDAL gdal gdald LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + FIND_LIB_OPTIONS(GEOS geos_c geos_cd LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + # FIND_LIB_OPTIONS(GSL gsl gsld LIB ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + # FIND_LIB_OPTIONS(GSLCBLAS gslcblas gslcblasd LIB ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + FIND_LIB_OPTIONS(POSTGRES libpq libpq LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + FIND_LIB_OPTIONS(PROJ proj proj_d LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + # FIND_LIB_OPTIONS(PYTHON python39 python39_d LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + FIND_LIB_OPTIONS(QCA qca qcad LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + + FIND_LIB_OPTIONS(QTKEYCHAIN qt6keychain qt6keychaind LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + # FIND_LIB_OPTIONS(QSCINTILLA qscintilla2_qt5 qscintilla2_qt5d LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + + # if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # FIND_LIB_OPTIONS(ZSTD zstd_static zstd_staticd LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) + # endif() + + set(SPATIALINDEX_LIB_NAME spatialindex) + if( VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" ) + set( SPATIALINDEX_LIB_NAME "spatialindex-64" ) + else() + set( SPATIALINDEX_LIB_NAME "spatialindex-32" ) + endif() + FIND_LIB_OPTIONS(SPATIALINDEX ${SPATIALINDEX_LIB_NAME} ${SPATIALINDEX_LIB_NAME}d LIBRARY ${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}) +endif() + +list(APPEND QGIS_OPTIONS "-DWITH_INTERNAL_POLY2TRI:BOOL=OFF") + +if(VCPKG_CROSSCOMPILING) + list(APPEND QGIS_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}) + list(APPEND QGIS_OPTIONS -DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA + OPTIONS ${QGIS_OPTIONS} + OPTIONS_DEBUG ${QGIS_OPTIONS_DEBUG} + OPTIONS_RELEASE ${QGIS_OPTIONS_RELEASE} +) + +vcpkg_install_cmake() + +function(copy_path basepath targetdir) + file(GLOB ${basepath}_PATH ${CURRENT_PACKAGES_DIR}/${basepath}/*) + if( ${basepath}_PATH ) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${targetdir}/${PORT}/${basepath}) + file(COPY ${${basepath}_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/${targetdir}/${PORT}/${basepath}) + endif() + + if(EXISTS "${CURRENT_PACKAGES_DIR}/${basepath}/") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/${basepath}/) + endif() +endfunction() + +if(VCPKG_TARGET_IS_WINDOWS) + file(GLOB QGIS_TOOL_PATH ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(QGIS_TOOL_PATH) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) + file(COPY ${QGIS_TOOL_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) + file(REMOVE_RECURSE ${QGIS_TOOL_PATH}) + file(GLOB QGIS_TOOL_PATH ${CURRENT_PACKAGES_DIR}/bin/* ) + file(COPY ${QGIS_TOOL_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) + endif() + + file(GLOB QGIS_TOOL_PATH_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(QGIS_TOOL_PATH_DEBUG) + if("debug-tools" IN_LIST FEATURES) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/bin) + file(COPY ${QGIS_TOOL_PATH_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/bin) + file(REMOVE_RECURSE ${QGIS_TOOL_PATH_DEBUG}) + file(GLOB QGIS_TOOL_PATH_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/* ) + file(COPY ${QGIS_TOOL_PATH_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/bin) + else() + file(REMOVE_RECURSE ${QGIS_TOOL_PATH_DEBUG}) + endif() + endif() + + copy_path(doc share) + copy_path(i18n share) + copy_path(icons share) + copy_path(images share) + copy_path(plugins tools) + copy_path(resources share) + copy_path(svg share) + + # Extend vcpkg_copy_tool_dependencies to support the export of dll and exe dependencies in different directories to the same directory, + # and support the copy of debug dependencies + function(vcpkg_copy_tool_dependencies_ex TOOL_DIR OUTPUT_DIR SEARCH_DIR) + find_program(PS_EXE powershell PATHS ${DOWNLOADS}/tool) + if (PS_EXE-NOTFOUND) + message(FATAL_ERROR "Could not find powershell in vcpkg tools, please open an issue to report this.") + endif() + macro(search_for_dependencies PATH_TO_SEARCH) + file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) + foreach(TOOL ${TOOLS}) + vcpkg_execute_required_process( + COMMAND ${PS_EXE} -noprofile -executionpolicy Bypass -nologo + -file ${CMAKE_CURRENT_LIST_DIR}/applocal.ps1 + -targetBinary ${TOOL} + -installedDir ${PATH_TO_SEARCH} + -outputDir ${OUTPUT_DIR} + WORKING_DIRECTORY ${VCPKG_ROOT_DIR} + LOGNAME copy-tool-dependencies + ) + endforeach() + endmacro() + search_for_dependencies(${CURRENT_PACKAGES_DIR}/${SEARCH_DIR}) + search_for_dependencies(${CURRENT_INSTALLED_DIR}/${SEARCH_DIR}) + endfunction() + + vcpkg_copy_tool_dependencies_ex(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin bin) + vcpkg_copy_tool_dependencies_ex(${CURRENT_PACKAGES_DIR}/tools/${PORT}/plugins ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin bin) + if("debug-tools" IN_LIST FEATURES) + vcpkg_copy_tool_dependencies_ex(${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/bin ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/bin debug/bin) + vcpkg_copy_tool_dependencies_ex(${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/plugins ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/bin debug/bin) + endif() + if("server" IN_LIST FEATURES) + vcpkg_copy_tool_dependencies_ex(${CURRENT_PACKAGES_DIR}/tools/${PORT}/server ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin bin) + if("debug-tools" IN_LIST FEATURES) + vcpkg_copy_tool_dependencies_ex(${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/server ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/bin debug/bin) + endif() + endif() +endif() + +if(VCPKG_TARGET_IS_OSX) + copy_path(resources share) +endif() + +file(GLOB QGIS_CMAKE_PATH ${CURRENT_PACKAGES_DIR}/*.cmake) +if(QGIS_CMAKE_PATH) + file(COPY ${QGIS_CMAKE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmake/${PORT}) + file(REMOVE_RECURSE ${QGIS_CMAKE_PATH}) +endif() + +file(GLOB QGIS_CMAKE_PATH_DEBUG ${CURRENT_PACKAGES_DIR}/debug/*.cmake) +if( QGIS_CMAKE_PATH_DEBUG ) + file(REMOVE_RECURSE ${QGIS_CMAKE_PATH_DEBUG}) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include +) +file(REMOVE_RECURSE # Added for debug porpose + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/qgis/vcpkg.json b/vcpkg/ports/qgis/vcpkg.json new file mode 100644 index 000000000..0e065be7f --- /dev/null +++ b/vcpkg/ports/qgis/vcpkg.json @@ -0,0 +1,119 @@ +{ + "name": "qgis", + "version": "3.40.4", + "port-version": 0, + "homepage": "https://qgis.org", + "description": "QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)", + "dependencies": [ + "expat", + "libxml2", + "libzip", + "zlib", + "libspatialindex", + "libspatialite", + "gdal", + { + "name": "exiv2", + "features": [ + "xmp" + ] + }, + "libpq", + "protobuf", + "proj", + "geos", + "jhasse-poly2tri", + "meshoptimizer", + { + "name": "qca", + "default-features": false, + "features": [ + "ossl" + ] + }, + "qtkeychain-qt6", + { + "name": "libtasn1", + "platform": "osx | ios" + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "brotli", + "concurrent", + "doubleconversion", + { + "name": "egl", + "platform": "linux" + }, + { + "name": "egl", + "platform": "android" + }, + { + "name": "fontconfig", + "platform": "linux" + }, + "freetype", + { + "name": "gles2", + "platform": "android" + }, + { + "name": "gles3", + "platform": "ios" + }, + "gui", + "harfbuzz", + "jpeg", + "network", + "opengl", + { + "name": "openssl", + "platform": "!ios" + }, + "pcre2", + "png", + { + "name": "securetransport", + "platform": "ios" + }, + "sql", + "sql-sqlite", + "testlib", + "thread", + "widgets", + { + "name": "xcb", + "platform": "linux" + }, + { + "name": "xcb-xlib", + "platform": "linux" + }, + { + "name": "xrender", + "platform": "linux" + }, + "zstd" + ] + }, + "qtkeychain-qt6", + "qtlocation", + "qtsvg", + { + "name": "qttools", + "host": true + }, + "zlib", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/vcpkg/ports/qtbase/GLIB2-static.patch b/vcpkg/ports/qtbase/GLIB2-static.patch new file mode 100644 index 000000000..c384b741c --- /dev/null +++ b/vcpkg/ports/qtbase/GLIB2-static.patch @@ -0,0 +1,75 @@ +diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake +index 24a194c..91c8e41 100644 +--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake ++++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake +@@ -95,6 +95,18 @@ find_library(GLIB2_GIO_LIBRARIES + HINTS ${PC_GIO_LIBDIR} + ) + ++pkg_check_modules(PC_GMODULE QUIET gmodule-2.0) ++ ++find_path(GLIB2_GMODULE_INCLUDE_DIRS ++ NAMES gmodule.h ++ HINTS ${PC_GMODULE} ++ PATH_SUFFIXES glib-2.0) ++ ++find_library(GLIB2_GMODULE_LIBRARIES ++ NAMES gmodule-2.0 ++ HINTS ${PC_GMODULE} ++) ++ + # search the glibconfig.h include dir under the same root where the library is found + get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) + +@@ -126,6 +138,11 @@ if(GLIB2_GIO_LIBRARIES AND GLIB2_GIO_INCLUDE_DIRS) + set(GLIB2_GIO_FOUND TRUE) + endif() + ++if(GLIB2_GMODULE_LIBRARIES AND GLIB2_GMODULE_INCLUDE_DIRS) ++ set(GLIB2_GMODULE_FOUND TRUE) ++endif() ++ ++ + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(GLIB2 + REQUIRED_VARS GLIB2_LIBRARIES GTHREAD2_LIBRARIES GLIB2_INCLUDE_DIRS +@@ -137,6 +154,16 @@ if(GLIB2_FOUND AND NOT TARGET GLIB2::GLIB2) + IMPORTED_LOCATION "${GLIB2_LIBRARIES}" + INTERFACE_LINK_LIBRARIES "${GTHREAD2_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_INCLUDE_DIRS}") ++ #vcpkg specific ++ pkg_check_modules(PC_PCRE2_8BIT QUIET libpcre2-8) ++ find_library(PCRE2_8BIT_LIBRARIES ++ NAMES pcre2-8 ++ HINTS ${PC_PCRE2_8BIT} ++ ) ++ target_link_libraries(GLIB2::GLIB2 INTERFACE ${PCRE2_8BIT_LIBRARIES}) ++ find_package(Iconv) ++ find_package(Intl) ++ target_link_libraries(GLIB2::GLIB2 INTERFACE Intl::Intl Iconv::Iconv) + endif() + + if(GLIB2_GOBJECT_FOUND AND NOT TARGET GLIB2::GOBJECT) +@@ -153,12 +180,21 @@ if(GLIB2_GIO_FOUND AND NOT TARGET GLIB2::GIO) + INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_GIO_INCLUDE_DIRS}") + endif() + ++if(GLIB2_GMODULE_FOUND AND NOT TARGET GLIB2::GMODULE) ++ add_library(GLIB2::GMODULE UNKNOWN IMPORTED) ++ set_target_properties(GLIB2::GMODULE PROPERTIES ++ IMPORTED_LOCATION "${GLIB2_GMODULE_LIBRARIES}" ++ INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_GMODULE_INCLUDE_DIRS}") ++endif() ++ ++ + mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_INCLUDE_DIR + GLIB2_LIBRARIES GLIB2_LIBRARY + GLIB2_GOBJECT_INCLUDE_DIRS GLIB2_GOBJECT_INCLUDE_DIR + GLIB2_GOBJECT_LIBRARIES GLIB2_GOBJECT_LIBRARY + GLIB2_GIO_INCLUDE_DIRS GLIB2_GIO_INCLUDE_DIR +- GLIB2_GIO_LIBRARIES GLIB2_GIO_LIBRARY) ++ GLIB2_GIO_LIBRARIES GLIB2_GIO_LIBRARY ++ GLIB2_GMODULE_LIBRARIES GLIB2_GMODULE_INCLUDE_DIRS) + + include(FeatureSummary) + set_package_properties(GLIB2 PROPERTIES diff --git a/vcpkg/ports/qtbase/allow_outside_prefix.patch b/vcpkg/ports/qtbase/allow_outside_prefix.patch new file mode 100644 index 000000000..eeb503bcb --- /dev/null +++ b/vcpkg/ports/qtbase/allow_outside_prefix.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/QtBuildPathsHelpers.cmake b/cmake/QtBuildPathsHelpers.cmake +index bd186c28b..2c1994d2e 100644 +--- a/cmake/QtBuildPathsHelpers.cmake ++++ b/cmake/QtBuildPathsHelpers.cmake +@@ -141,11 +141,9 @@ function(qt_configure_process_path name default docstring) + elseif(rel_path MATCHES "^\.\./") + # INSTALL_SYSCONFDIR is allowed to be outside the prefix. + if(NOT name STREQUAL "INSTALL_SYSCONFDIR") +- message(FATAL_ERROR +- "Path component '${name}' is outside computed install prefix: ${rel_path} ") + endif() + # Keep the absolute path. + set(new_value "${${name}}") + else() + # Use the canonicalized path. + set(new_value "${rel_path}") + diff --git a/vcpkg/ports/qtbase/clang-cl_QGADGET_fix.diff b/vcpkg/ports/qtbase/clang-cl_QGADGET_fix.diff new file mode 100644 index 000000000..e400649b4 --- /dev/null +++ b/vcpkg/ports/qtbase/clang-cl_QGADGET_fix.diff @@ -0,0 +1,38 @@ +diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h +index e40cd85..ba68a01 100644 +--- a/src/corelib/kernel/qmetatype.h ++++ b/src/corelib/kernel/qmetatype.h +@@ -18,6 +18,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -826,7 +829,13 @@ + struct IsGadgetHelper { enum { IsRealGadget = false, IsGadgetOrDerivedFrom = false }; }; + + template ++#if defined(__clang__) && (__clang_major__ > 11) ++ // Clang does not reject T::QtGadgetHelper as ambiguous if a class inherits from two QGADGETS ++ // but is not a QGADGET itself ++ struct IsGadgetHelper> ++#else + struct IsGadgetHelper ++#endif + { + template + static char checkType(void (X::*)()); +@@ -841,7 +850,11 @@ + struct IsPointerToGadgetHelper { enum { IsRealGadget = false, IsGadgetOrDerivedFrom = false }; }; + + template ++#if defined(__clang__) && (__clang_major__ > 11) ++ struct IsPointerToGadgetHelper> ++#else + struct IsPointerToGadgetHelper ++#endif + { + using BaseType = T; + template diff --git a/vcpkg/ports/qtbase/clang-cl_source_location.patch b/vcpkg/ports/qtbase/clang-cl_source_location.patch new file mode 100644 index 000000000..5155fb4bb --- /dev/null +++ b/vcpkg/ports/qtbase/clang-cl_source_location.patch @@ -0,0 +1,14 @@ +diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h +index 823b2057b..4a8cd4fa8 100644 +--- a/src/corelib/kernel/qproperty.h ++++ b/src/corelib/kernel/qproperty.h +@@ -16,8 +16,8 @@ + + #include + +-#if __has_include() && __cplusplus >= 202002L && !defined(Q_QDOC) ++#if __has_include() && __cplusplus >= 202002L && !defined(Q_QDOC) && ( (defined(__cpp_consteval) && defined(_MSC_VER)) || !defined(_MSC_VER) ) + #include + #if defined(__cpp_lib_source_location) + #define QT_SOURCE_LOCATION_NAMESPACE std + #define QT_PROPERTY_COLLECT_BINDING_LOCATION diff --git a/vcpkg/ports/qtbase/cmake/qt_install_copyright.cmake b/vcpkg/ports/qtbase/cmake/qt_install_copyright.cmake new file mode 100644 index 000000000..8ec395fe6 --- /dev/null +++ b/vcpkg/ports/qtbase/cmake/qt_install_copyright.cmake @@ -0,0 +1,27 @@ +include_guard(GLOBAL) + +#Could probably be the beginning of a vcpkg_install_copyright? +function(qt_install_copyright SOURCE_PATH) + #Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.FDL") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.FDL") + endif() + if(LICENSE_PATH) + file(INSTALL "${LICENSE_PATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + elseif(EXISTS "${SOURCE_PATH}/LICENSES") + file(GLOB LICENSES "${SOURCE_PATH}/LICENSES/*") + vcpkg_install_copyright(FILE_LIST ${LICENSES}) + else() + message(WARNING "No license/copyright file found!") + endif() +endfunction() diff --git a/vcpkg/ports/qtbase/cmake/qt_install_submodule.cmake b/vcpkg/ports/qtbase/cmake/qt_install_submodule.cmake new file mode 100644 index 000000000..2f05a8b6f --- /dev/null +++ b/vcpkg/ports/qtbase/cmake/qt_install_submodule.cmake @@ -0,0 +1,362 @@ +include_guard(GLOBAL) + +include("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-cmake/vcpkg-port-config.cmake") +include("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-cmake-config/vcpkg-port-config.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/qt_install_copyright.cmake") + +if(NOT DEFINED QT6_DIRECTORY_PREFIX) + set(QT6_DIRECTORY_PREFIX "Qt6/") +endif() + +if(VCPKG_TARGET_IS_ANDROID AND NOT ANDROID_SDK_ROOT) + message(FATAL_ERROR "${PORT} requires ANDROID_SDK_ROOT to be set. Consider adding it to the triplet." ) +endif() + +function(qt_download_submodule_impl) + cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "" "SUBMODULE" "PATCHES") + + if("${_qarg_SUBMODULE}" IN_LIST QT_FROM_QT_GIT) + # qtinterfaceframework is not available in the release, so we fall back to a `git clone`. + vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL "https://code.qt.io/qt/${_qarg_SUBMODULE}.git" + REF "${${_qarg_SUBMODULE}_REF}" + PATCHES ${_qarg_PATCHES} + ) + if(PORT STREQUAL "qttools") # Keep this for beta & rc's + vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH_QLITEHTML + URL https://code.qt.io/playground/qlitehtml.git + REF "${${PORT}_qlitehtml_REF}" + FETCH_REF master + HEAD_REF master + ) + # port 'litehtml' is not in vcpkg! + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH_LITEHTML + REPO litehtml/litehtml + REF "${${PORT}_litehtml_REF}" + SHA512 "${${PORT}_litehtml_HASH}" + HEAD_REF master + ) + file(COPY "${SOURCE_PATH_QLITEHTML}/" DESTINATION "${SOURCE_PATH}/src/assistant/qlitehtml") + file(COPY "${SOURCE_PATH_LITEHTML}/" DESTINATION "${SOURCE_PATH}/src/assistant/qlitehtml/src/3rdparty/litehtml") + elseif(PORT STREQUAL "qtwebengine") + vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH_WEBENGINE + URL https://code.qt.io/qt/qtwebengine-chromium.git + REF "${${PORT}_chromium_REF}" + ) + if(NOT EXISTS "${SOURCE_PATH}/src/3rdparty/chromium") + file(RENAME "${SOURCE_PATH_WEBENGINE}/chromium" "${SOURCE_PATH}/src/3rdparty/chromium") + endif() + if(NOT EXISTS "${SOURCE_PATH}/src/3rdparty/gn") + file(RENAME "${SOURCE_PATH_WEBENGINE}/gn" "${SOURCE_PATH}/src/3rdparty/gn") + endif() + endif() + else() + if(VCPKG_USE_HEAD_VERSION) + set(sha512 SKIP_SHA512) + elseif(NOT DEFINED "${_qarg_SUBMODULE}_HASH") + message(FATAL_ERROR "No information for ${_qarg_SUBMODULE} -- add it to QT_PORTS and run qtbase in QT_UPDATE_VERSION mode first") + else() + set(sha512 SHA512 "${${_qarg_SUBMODULE}_HASH}") + endif() + + qt_get_url_filename("${_qarg_SUBMODULE}" urls filename) + vcpkg_download_distfile(archive + URLS ${urls} + FILENAME "${filename}" + ${sha512} + ) + vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE "${archive}" + PATCHES ${_qarg_PATCHES} + ) + endif() + set(SOURCE_PATH "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() + +function(qt_download_submodule) + cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "" "" "PATCHES") + + qt_download_submodule_impl(SUBMODULE "${PORT}" PATCHES ${_qarg_PATCHES}) + + set(SOURCE_PATH "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() + + +function(qt_cmake_configure) + cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "DISABLE_NINJA;DISABLE_PARALLEL_CONFIGURE" + "" + "TOOL_NAMES;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;OPTIONS_MAYBE_UNUSED") + + vcpkg_find_acquire_program(PERL) # Perl is probably required by all qt ports for syncqt + get_filename_component(PERL_PATH ${PERL} DIRECTORY) + vcpkg_add_to_path(${PERL_PATH}) + if(NOT PORT STREQUAL "qtwebengine" OR QT_IS_LATEST) # qtwebengine requires python2; since 6.3 python3 + vcpkg_find_acquire_program(PYTHON3) # Python is required by some qt ports + get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) + vcpkg_add_to_path(${PYTHON3_PATH}) + endif() + + if(NOT PORT MATCHES "^qtbase") + list(APPEND _qarg_OPTIONS "-DQT_SYNCQT:PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/syncqt.pl") + endif() + set(PERL_OPTION "-DHOST_PERL:PATH=${PERL}") + + set(ninja_option "") + if(_qarg_DISABLE_NINJA) + set(ninja_option WINDOWS_USE_MSBUILD) + endif() + + set(disable_parallel "") + if(_qarg_DISABLE_PARALLEL_CONFIGURE) + set(disable_parallel DISABLE_PARALLEL_CONFIGURE) + endif() + + if(VCPKG_CROSSCOMPILING) + list(APPEND _qarg_OPTIONS "-DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}") + list(APPEND _qarg_OPTIONS "-DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share") + endif() + + # Disable warning for CMAKE_(REQUIRE|DISABLE)_FIND_PACKAGE_ + string(REGEX MATCHALL "CMAKE_DISABLE_FIND_PACKAGE_[^:=]+" disabled_find_package "${_qarg_OPTIONS}") + list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${disabled_find_package}) + + string(REGEX MATCHALL "CMAKE_REQUIRE_FIND_PACKAGE_[^:=]+(:BOOL)?=OFF" require_find_package "${_qarg_OPTIONS}") + list(TRANSFORM require_find_package REPLACE "(:BOOL)?=OFF" "") + list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${require_find_package}) + + # Disable unused warnings for disabled features. Qt might decide to not emit the feature variables if other features are deactivated. + string(REGEX MATCHALL "(QT_)?FEATURE_[^:=]+(:BOOL)?=OFF" disabled_features "${_qarg_OPTIONS}") + list(TRANSFORM disabled_features REPLACE "(:BOOL)?=OFF" "") + list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${disabled_features}) + + list(APPEND _qarg_OPTIONS "-DQT_NO_FORCE_SET_CMAKE_BUILD_TYPE:BOOL=ON") + + if(VCPKG_TARGET_IS_ANDROID) + list(APPEND _qarg_OPTIONS "-DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}") + endif() + + if(NOT PORT MATCHES "qtbase") + list(APPEND _qarg_OPTIONS "-DQT_MKSPECS_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6/mkspecs") + endif() + + if(NOT DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) + list(APPEND _qarg_OPTIONS "-DCMAKE_OSX_DEPLOYMENT_TARGET=14") + endif() + + vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + ${ninja_option} + ${disable_parallel} + OPTIONS + -DQT_FORCE_WARN_APPLE_SDK_AND_XCODE_CHECK=ON + -DQT_NO_FORCE_SET_CMAKE_BUILD_TYPE:BOOL=ON + -DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to mess with users toolchain settings. + -DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON # Because Qt doesn't correctly scope find_package calls. + #-DQT_HOST_PATH= # For crosscompiling + #-DQT_PLATFORM_DEFINITION_DIR=mkspecs/win32-msvc + #-DQT_QMAKE_TARGET_MKSPEC=win32-msvc + #-DQT_USE_CCACHE + -DQT_BUILD_EXAMPLES:BOOL=OFF + -DQT_BUILD_TESTS:BOOL=OFF + -DQT_BUILD_BENCHMARKS:BOOL=OFF + ${PERL_OPTION} + -DINSTALL_BINDIR:STRING=bin + -DINSTALL_LIBEXECDIR:STRING=bin + -DINSTALL_PLUGINSDIR:STRING=${qt_plugindir} + -DINSTALL_QMLDIR:STRING=${qt_qmldir} + ${_qarg_OPTIONS} + OPTIONS_RELEASE + ${_qarg_OPTIONS_RELEASE} + -DINSTALL_DOCDIR:STRING=doc/${QT6_DIRECTORY_PREFIX} + -DINSTALL_INCLUDEDIR:STRING=include/${QT6_DIRECTORY_PREFIX} + -DINSTALL_DESCRIPTIONSDIR:STRING=share/Qt6/modules + -DINSTALL_MKSPECSDIR:STRING=share/Qt6/mkspecs + -DINSTALL_TRANSLATIONSDIR:STRING=translations/${QT6_DIRECTORY_PREFIX} + OPTIONS_DEBUG + # -DFEATURE_debug:BOOL=ON only needed by qtbase and auto detected? + -DINSTALL_DOCDIR:STRING=../doc/${QT6_DIRECTORY_PREFIX} + -DINSTALL_INCLUDEDIR:STRING=../include/${QT6_DIRECTORY_PREFIX} + -DINSTALL_TRANSLATIONSDIR:STRING=../translations/${QT6_DIRECTORY_PREFIX} + -DINSTALL_DESCRIPTIONSDIR:STRING=../share/Qt6/modules + -DINSTALL_MKSPECSDIR:STRING=../share/Qt6/mkspecs + ${_qarg_OPTIONS_DEBUG} + MAYBE_UNUSED_VARIABLES + INSTALL_BINDIR + INSTALL_DOCDIR + INSTALL_LIBEXECDIR + INSTALL_QMLDIR # No qml files + INSTALL_TRANSLATIONSDIR # No translations + INSTALL_PLUGINSDIR # No plugins + INSTALL_DESCRIPTIONSDIR + INSTALL_INCLUDEDIR + HOST_PERL + QT_SYNCQT + QT_NO_FORCE_SET_CMAKE_BUILD_TYPE + QT_FORCE_WARN_APPLE_SDK_AND_XCODE_CHECK + ${_qarg_OPTIONS_MAYBE_UNUSED} + INPUT_bundled_xcb_xinput + INPUT_freetype + INPUT_harfbuzz + INPUT_libjpeg + INPUT_libmd4c + INPUT_libpng + INPUT_opengl + INPUT_openssl + INPUT_xcb + INPUT_xkbcommon + ) + set(Z_VCPKG_CMAKE_GENERATOR "${Z_VCPKG_CMAKE_GENERATOR}" PARENT_SCOPE) +endfunction() + +function(qt_fix_prl_files) + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}/lib" package_dir) + file(TO_CMAKE_PATH "${package_dir}/lib" lib_path) + file(TO_CMAKE_PATH "${package_dir}/include/Qt6" include_path) + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" install_prefix) + file(GLOB_RECURSE prl_files "${CURRENT_PACKAGES_DIR}/*.prl" "${CURRENT_PACKAGES_DIR}/*.pri") + foreach(prl_file IN LISTS prl_files) + file(READ "${prl_file}" _contents) + string(REPLACE "${lib_path}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + string(REPLACE "${include_path}" "\$\$[QT_INSTALL_HEADERS]" _contents "${_contents}") + string(REPLACE "${install_prefix}" "\$\$[QT_INSTALL_PREFIX]" _contents "${_contents}") + string(REPLACE "[QT_INSTALL_PREFIX]/lib/objects-Debug" "[QT_INSTALL_LIBS]/objects-Debug" _contents "${_contents}") + string(REPLACE "[QT_INSTALL_PREFIX]/Qt6/qml" "[QT_INSTALL_QML]" _contents "${_contents}") + #Note: This only works without an extra if case since QT_INSTALL_PREFIX is the same for debug and release + file(WRITE "${prl_file}" "${_contents}") + endforeach() +endfunction() + +function(qt_fixup_and_cleanup) + cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "" + "" + "TOOL_NAMES") + vcpkg_copy_pdbs() + + ## Handle PRL files + qt_fix_prl_files() + + ## Handle CMake files. + set(COMPONENTS) + file(GLOB COMPONENTS_OR_FILES LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/share/Qt6*") + list(REMOVE_ITEM COMPONENTS_OR_FILES "${CURRENT_PACKAGES_DIR}/share/Qt6") + foreach(_glob IN LISTS COMPONENTS_OR_FILES) + if(IS_DIRECTORY "${_glob}") + string(REPLACE "${CURRENT_PACKAGES_DIR}/share/Qt6" "" _component "${_glob}") + debug_message("Adding cmake component: '${_component}'") + list(APPEND COMPONENTS ${_component}) + endif() + endforeach() + + foreach(_comp IN LISTS COMPONENTS) + if(EXISTS "${CURRENT_PACKAGES_DIR}/share/Qt6${_comp}") + vcpkg_cmake_config_fixup(PACKAGE_NAME "Qt6${_comp}" CONFIG_PATH "share/Qt6${_comp}" TOOLS_PATH "tools/Qt6/bin") + # Would rather put it into share/cmake as before but the import_prefix correction in vcpkg_cmake_config_fixup is working against that. + else() + message(STATUS "WARNING: Qt component ${_comp} not found/built!") + endif() + endforeach() + #fix debug plugin paths (should probably be fixed in vcpkg_cmake_config_fixup) + file(GLOB_RECURSE DEBUG_CMAKE_TARGETS "${CURRENT_PACKAGES_DIR}/share/**/*Targets-debug.cmake") + debug_message("DEBUG_CMAKE_TARGETS:${DEBUG_CMAKE_TARGETS}") + foreach(_debug_target IN LISTS DEBUG_CMAKE_TARGETS) + vcpkg_replace_string("${_debug_target}" "{_IMPORT_PREFIX}/${qt_plugindir}" "{_IMPORT_PREFIX}/debug/${qt_plugindir}" IGNORE_UNCHANGED) + vcpkg_replace_string("${_debug_target}" "{_IMPORT_PREFIX}/${qt_qmldir}" "{_IMPORT_PREFIX}/debug/${qt_qmldir}" IGNORE_UNCHANGED) + endforeach() + + file(GLOB_RECURSE STATIC_CMAKE_TARGETS "${CURRENT_PACKAGES_DIR}/share/Qt6Qml/QmlPlugins/*.cmake") + foreach(_plugin_target IN LISTS STATIC_CMAKE_TARGETS) + # restore a single get_filename_component which was remove by vcpkg_cmake_config_fixup + vcpkg_replace_string("${_plugin_target}" + [[get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)]] + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + IGNORE_UNCHANGED) + endforeach() + + set(qt_tooldest "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") + set(qt_searchdir "${CURRENT_PACKAGES_DIR}/bin") + ## Handle Tools + foreach(_tool IN LISTS _qarg_TOOL_NAMES) + if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + debug_message("Removed '${_tool}' from copy tools list since it was not found!") + list(REMOVE_ITEM _qarg_TOOL_NAMES ${_tool}) + endif() + endforeach() + if(_qarg_TOOL_NAMES) + set(tool_names ${_qarg_TOOL_NAMES}) + vcpkg_copy_tools(TOOL_NAMES ${tool_names} SEARCH_DIR "${qt_searchdir}" DESTINATION "${qt_tooldest}" AUTO_CLEAN) + endif() + + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/") + file(COPY "${CURRENT_PACKAGES_DIR}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") + endif() + file(GLOB_RECURSE _installed_dll_files RELATIVE "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin" "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/*.dll") + foreach(_dll_to_remove IN LISTS _installed_dll_files) + file(GLOB_RECURSE _packaged_dll_file "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${_dll_to_remove}") + if(EXISTS "${_packaged_dll_file}") + file(REMOVE "${_packaged_dll_file}") + endif() + endforeach() + file(GLOB_RECURSE _folders LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/") + file(GLOB_RECURSE _files "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/") + if(_files) + list(REMOVE_ITEM _folders ${_files}) + endif() + foreach(_dir IN LISTS _folders) + if(NOT "${_remaining_dll_files}" MATCHES "${_dir}") + file(REMOVE_RECURSE "${_dir}") + endif() + endforeach() + endif() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/lib/cmake/" + "${CURRENT_PACKAGES_DIR}/debug/include" + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*") + if(NOT _bin_files STREQUAL "") + message(STATUS "Remaining files in bin: '${_bin_files}'") + else() # Only clean if empty otherwise let vcpkg throw and error. + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" "${CURRENT_PACKAGES_DIR}/debug/bin/") + endif() + endif() + + vcpkg_fixup_pkgconfig() +endfunction() + +function(qt_install_submodule) + cmake_parse_arguments(PARSE_ARGV 0 "_qis" "DISABLE_NINJA" + "" + "PATCHES;TOOL_NAMES;CONFIGURE_OPTIONS;CONFIGURE_OPTIONS_DEBUG;CONFIGURE_OPTIONS_RELEASE;CONFIGURE_OPTIONS_MAYBE_UNUSED") + + set(qt_plugindir ${QT6_DIRECTORY_PREFIX}plugins) + set(qt_qmldir ${QT6_DIRECTORY_PREFIX}qml) + + qt_download_submodule(PATCHES ${_qis_PATCHES}) + + if(_qis_DISABLE_NINJA) + set(_opt DISABLE_NINJA) + endif() + qt_cmake_configure(${_opt} + OPTIONS ${_qis_CONFIGURE_OPTIONS} + OPTIONS_DEBUG ${_qis_CONFIGURE_OPTIONS_DEBUG} + OPTIONS_RELEASE ${_qis_CONFIGURE_OPTIONS_RELEASE} + OPTIONS_MAYBE_UNUSED ${_qis_CONFIGURE_OPTIONS_MAYBE_UNUSED} + ) + + vcpkg_cmake_install(ADD_BIN_TO_PATH) + + qt_fixup_and_cleanup(TOOL_NAMES ${_qis_TOOL_NAMES}) + + qt_install_copyright("${SOURCE_PATH}") + set(SOURCE_PATH "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() + +include("${CMAKE_CURRENT_LIST_DIR}/qt_port_details.cmake") diff --git a/vcpkg/ports/qtbase/cmake/qt_port_data.cmake b/vcpkg/ports/qtbase/cmake/qt_port_data.cmake new file mode 100644 index 000000000..254593037 --- /dev/null +++ b/vcpkg/ports/qtbase/cmake/qt_port_data.cmake @@ -0,0 +1,50 @@ +set(qtbase_HASH "ef364f939f23b622f67d21833c2dbf1fb74531d9a1e25b6d2e94ea5d747a40f20c6c3a24abef1e9710287366b7cb54dd090350d315601317779235c20743cc81") +set(qttools_HASH "77141b310f63932678f28682c490ccc75776493994d96582d546545c17937605efac312c008c75fda991b78c369320d0a2c4b543b568a459cc90051d1ed2b9da") +set(qtdeclarative_HASH "75c9fdc8ba26ef95ae8ff0c82b18589b74d7ff3065e86e5bd8427bc36336e569eaa22fa07863f99d0592eec0c1a69c3409c7b3941eae14361ff523c058e56084") +set(qtsvg_HASH "213af7fdf92fb64c9b824dbe044f51d89e661ccc02c17cf109e65b962a7b1de84c71e1b1b58d6cad0cc9fccee80b97efe9ebcab3491b478fb9b64bcfd33986a4") +set(qt5compat_HASH "e049508efda201e5d12a2dc0e023fc096611b18810f695be213a26bfbf8cdda1ae04c353c2a8b9be0c30b014e3d4f9280921acd1e8ec3834cd309143de82f570") +set(qtshadertools_HASH "5f326bb097e09f9f9259b550ccf5fb05634d748eebf8b8c416225e3cd328c2b532c764a41b98a4d47633be446edaeaa3d4e5da1f4951b31e3da6ddc4392a47fc") +set(qtquicktimeline_HASH "3f9aef0eb8b495cda9bcab22e7f544e9dd1894e556e162654c87903406cd3c73820f54a543bc3861d49c7863d2fc8d92f79bb8e90cdcc23a99cf64bbeb816885") +set(qtquick3d_HASH "5a5c04dfd1581905fb0b40cb35ef9e7370ffaf451287d84a9d444c0871f495ecfe59c8ab15cacc8e7314af45c16598fad5e63cd9466384c5ba245ad0c28315f2") +set(qttranslations_HASH "d5df6136d3f66c93c0dd6d98c7a467c8b939d7bf5c90b5acff69262163c1e7cccc0c4f2f83b5ef06179601578b4a109f2f0c76c3897a31d3fb2567995fc55328") +set(qtwayland_HASH "2edb6d3e85c06bcf689c3acfcc38b6ff0505569dfeec8bfb5a434fad563087ff917875ea56e639405af3cca8adc98206ab9f68dfaf8e2449300d010ffbb16699") +set(qtdoc_HASH "839fbff235f67ade032f25120fbd7f394d272bf752dfe982c202cb8b6cf411a1bc949f5035b2c1062468e40632b2061ac611c771d35567dd5970b013ff2090f8") +set(qtcoap_HASH "ce51ea39b7946b85cacddd3ebfe3a92615f31b032a779b799113c1e97aecdd3906e4fdc066296b0c0a369f4a023df4c951cc18dd47d2713e173118f2bd055cff") +set(qtopcua_HASH "ac11aab0f9333a4b666c9c523f5d74140bd52e236ed14cfce3dbfc030516b1cc654761048a7fd9e4238a9f1e0e47a72c6f2f8e98173f27042c6cdbb348c8d6d9") +set(qtimageformats_HASH "174bddd49dac507b7a2c9f1e1f7b384bff9ac515891ee49fd72acfa944b503cf5bd26acf388203e7d14b1f147b07ccbc2da992f71d51b7a18151245efc53a3a2") +set(qtmqtt_HASH "1934405a8e6b7188ce710e89eaf7ae00f1e1516b803b773ec95b962368a8da3967bac29dfe2a4377a76d0f8b9bf47599f566d7130eff311f38af2041d0c40a88") +set(qtnetworkauth_HASH "8f9f25883534af6ce7029a6c96501de3e944c8c6c3021f185c3a932653b4e4c40b3a0f8bc210d3ee175b690721a99b3d42de2f6fa9d1dbd1b730abf22fc48455") +set(qt3d_HASH "8316fbe5a39bc5113da4759e195a55c57d8340021a39576939c0a4a604f47b4edb3c0206f914d4a3177ff09471d1f3475ffc4c2fa935ed8d98a166e310bc78b4") +set(qtactiveqt_HASH "d49c16f4e055bcf389c719ae0e33a6ae0ef54f2433211f14864774c3694f82361783d18db6996b6f5abd52f5ac7f791b0eab015c946ceaa3ddfb9ef6abf64f19") +set(qtdatavis3d_HASH "a5d0cf5c223a5baa69dc7fc59b131eb3b971dc3701d20e81bf7e86ccb6e8f4d20a82079e514d1269091fa014896167d52912e3940210fd546a8a55439c75509a") +set(qtdeviceutilities_HASH "b32222c52169832a30a1d6bf0b19e5adc15bc9b1c7c12e4613ea73eba73b00528969f8a87830d0a9bf61663547ff263e2e0d6e5f4bc37b8624c3f96d9cbc51b6") +set(qtlottie_HASH "c663b830210359bd738a3ab2ae84d956646c249e199acac194c1ec725b3eb1acb2392eef0a9b252e8ece0adad104932d4f7207903e49ec041287618d3a6f9894") +set(qtscxml_HASH "c0138fc338b2d12fb4bcbba2c852b44e4257c56850f22af46d452871fb9bd9465bd824d86cd7e7772ef62b8ed48515790b496e1e873aa335deae8e25789cb4d0") +set(qtvirtualkeyboard_HASH "a128c8210eec799d81c76b20e32e3c09ccb345d822b5c59b1fbf0960a1e2bec50c43140d86aaae9419a1fc514fc3e14bd283f612bf9133676db1a21e7217f528") +set(qtcharts_HASH "84b372c8b52aea580b2b9727775753345affa80b73e0be843e65f7331bb809187d7183d93fdaf543197860210bc4e006f3a707663a160cf8ae05b37871abac7e") +set(qtconnectivity_HASH "5508f3fc57679a4f986f430dcd19c5da15af663a677d27c9cc6aba81629f4a6e1954be31c5d2a44ba22366d7731ff105d2eaa3a0565b3b02baea0f498c547733") +set(qtpositioning_HASH "8899b4bf8096211fca37f7a7855ae2c6f79d770602105d76a98b580ad8e2f2f55096095bd7f935f6f9ac36e23135e7594cf3c2e5b760c979560a108d43d57784") +set(qtlocation_HASH "c7cbd76b6b8b7d09387c7da0e6630959ae66f0c8af2cd26b255e86ec36c6efeec59e4af7b34faa05f2fa035d4dd075d13a8dd0bccaefac48d391b4fa786769c0") +set(qtmultimedia_HASH "2f001888b44274583dcd5bc6f467cf18efbb1a711f29d6baf354071199772ee49d835922f2fa0e9770898d42decddf04b379d8f05d1dfd923c5f9d58e3c7fcd8") +set(qtremoteobjects_HASH "5845afc5ea4894fa788ce07a89348bd5027c0cceca65dce99a6bf437b396c71f25e8e7374401c8d10fd88be2303766c6df29b62e826f4d5ba38971a042dd7b06") +set(qtsensors_HASH "88e9277aefdc609bda881cb836dfdc04d29a32a4e09998d67e2ebe7ec6f94aff508fb39c2b624f00bcc85ddccd61bb5ed3ffcc953dd28d00ef559d50e6104ae4") +set(qtserialbus_HASH "b0ce725382c15048913204e6173dd899af6f8233ff3a098f497dea6a3d9d2cd436ad7944165398fba59f92098f7e38e7c3c5efa47a7ffeec2bf3a464ae9d4539") +set(qtserialport_HASH "343537aedd9c84dd5d6889d45babff181d7ef05927fd9cfdbb9389066f8860e2522bc059ca2c5c9af4c88bca255e0fc40b5eea84b93c970123a94afc803a638d") +set(qtwebchannel_HASH "156d3d1f7e1a0b0df8c103db010cd8e40717e6fcf27dd20c27ca22900ae377a8da8bc86a9ec1d65765defb68032469415c345a571e9a3dcbc3919603972d01d6") +set(qtwebengine_HASH "01e8988c76ff40ca5e38f76e90791d7ef708c29f2e9f8e83ca8604b6335fbecdee71473678a63633ec1edec85088256b20e56a618ca95748ccbe1e7b9673c298") +set(qtwebsockets_HASH "7453c6657e9885393d57df3ebaf9d3ad12237b5fb848ac3547cc6c6ed607562d58564667a7fd10133d4cdb94151aa5c21660e33c7f48f01a4061001a47f85b60") +set(qtwebview_HASH "af16c85d76e55e3c39c747995b3c46354efe5f5a3e111df36f9b169ab8fe3ac878cfe223ee47aef9aa8bc302c7383fc9b1f9682c63034e42def3714b28a0aabf") +set(qtinterfaceframework_REF "373322fc654e875cb56828de554dfdda96e9fb4e") +set(qtapplicationmanager_HASH "7d404ac3f98d29004009d87996779a0c5c86b976e864257cd3a9018d84db8bc07bcedc74f0b15443f90b487d2229fdb7b80d1ae082b0fc8dea30f682b58cea1a") +set(qtlanguageserver_HASH "8b55a3558de28d6c2c61bf52e8f10d1a67cc6890fdd3846db99f6c766fd22fef1793687b88b146f5a64971d60eef4357409b893c91310d1b9abec883ab35c2bc") +set(qthttpserver_HASH "4e99164e285ed4e8ae64a4af2c717fc22a7b5934ac5a78fe3adbb04e29109d1294e9917aa089b9cb9e5492bdf7fad4888c837374c2fef691ea7294bccbe7b01a") +set(qtquick3dphysics_HASH "e8948f84e337bc4c496ba67f047c809ece8d74a3d2af388227c902b765a1d2969f86be2ebaaa89f271c4b73d2cf5151a4c488ff7dc4f4a965d5f6a4de052784a") +set(qtspeech_HASH "6434ccf743604bf4ac4bc31b26c7dbc7f765ec95174f0d9047bec822292f85e6b21ace825b52ce60bd388d9c333d427b206209f78c612782701567bb7d271e6d") +set(qtgrpc_HASH "488c7e6a20cd9c267b44923c317e545e71543f68153228a4fee1fa9c0a2f6d3e212db9482962999bb80e87313a1a851b787759852089f17dca8add7040627c55") +set(qtquickeffectmaker_HASH "cdcee80a0bf7347ef9b63acc277ce6ef134128ba56f247008803d9444a9e0713e23205ed0f9ecf2b7752d82183acb471a2589c8b0ec914259a22395f94755bfa") +set(qtgraphs_HASH "c1803e68e065fc4ed7de68e65f5dc86a0b926768779c0de57a7f4af46506f019c27d47095f87eb1516011868262d6654817c478e130739477658a3dbcef2fb35") + + +# Keep for beta/rc +#set(qttools_qlitehtml_REF bd70f93ce41443a6a90a269531393f575685283e) +#set(qtwebengine_chromium_REF 0b138dc30d0aec7930c76a2595065629948ad9f7) diff --git a/vcpkg/ports/qtbase/cmake/qt_port_details.cmake b/vcpkg/ports/qtbase/cmake/qt_port_details.cmake new file mode 100644 index 000000000..e1f263d57 --- /dev/null +++ b/vcpkg/ports/qtbase/cmake/qt_port_details.cmake @@ -0,0 +1,183 @@ +### Steps to update the qt6 ports +## 1. Change QT_VERSION below to the new version +## 2. Set QT_UPDATE_VERSION to 1 +## 3. Add any new Qt modules to QT_PORTS +## 4. Run a build of `qtbase` +## 5. Fix any intermediate failures by adding the module into QT_FROM_GITHUB, QT_FROM_GITHUB_BRANCH, or QT_FROM_QT_GIT as appropriate +## 6. The build should fail with "Done downloading version and emitting hashes." This will have changed out the vcpkg.json versions of the qt ports and rewritten qt_port_data.cmake +## 7. Set QT_UPDATE_VERSION back to 0 + +set(QT_VERSION 6.8.3) +set(QT_DEV_BRANCH 0) + +set(QT_UPDATE_VERSION 0) + +if(PORT MATCHES "(qtquickcontrols2)") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + +### Setting up the git tag. + +set(QT_PORTS qt + qtbase + qttools + qtdeclarative + qtsvg + qt5compat + qtshadertools + qtquicktimeline + qtquick3d + qttranslations + qtwayland + qtdoc + qtcoap + qtopcua + qtimageformats + qtmqtt + qtnetworkauth + qt3d) + # qtquickcontrols2 -> moved into qtdeclarative +if(QT_VERSION VERSION_GREATER_EQUAL 6.1) + list(APPEND QT_PORTS + ## New in 6.1 + qtactiveqt + qtdatavis3d + qtdeviceutilities + qtlottie + qtscxml + qtvirtualkeyboard + qtcharts) +endif() +if(QT_VERSION VERSION_GREATER_EQUAL 6.2) + list(APPEND QT_PORTS + ## New in 6.2 + qtconnectivity + qtpositioning + qtlocation # back in 6.5 as tech preview + qtmultimedia + qtremoteobjects + qtsensors + qtserialbus + qtserialport + qtwebchannel + qtwebengine + qtwebsockets + qtwebview) +endif() +if(QT_VERSION VERSION_GREATER_EQUAL 6.2.2) + list(APPEND QT_PORTS + ## New in 6.2.2 + qtinterfaceframework + qtapplicationmanager) +endif() +if(QT_VERSION VERSION_GREATER_EQUAL 6.3.0) + list(APPEND QT_PORTS + ## New in 6.3.0 + qtlanguageserver) +endif() +if(QT_VERSION VERSION_GREATER_EQUAL 6.4.0) + list(APPEND QT_PORTS + ## New in 6.4.0 + qthttpserver + qtquick3dphysics + qtspeech) +endif() +if(QT_VERSION VERSION_GREATER_EQUAL 6.5.0) + list(APPEND QT_PORTS + ## New in 6.5.0 + qtgrpc + qtquickeffectmaker + ) +endif() +if(QT_VERSION VERSION_GREATER_EQUAL 6.6.0) + list(APPEND QT_PORTS + ## New in 6.6.0 + qtgraphs + #qtvncserver # only commercial + #qtinsighttracker + ) +endif() +#qtinsighttracker +#qtvncserver +#qtgraphs + +# 1. By default, modules come from the official release +# 2. These modules are mirrored to github and have tags matching the release +set(QT_FROM_GITHUB qtcoap qtopcua qtmqtt qtapplicationmanager) +# 3. These modules are mirrored to github and have branches matching the release +set(QT_FROM_GITHUB_BRANCH qtdeviceutilities) +# 4. These modules are not mirrored to github and not part of the release +set(QT_FROM_QT_GIT qtinterfaceframework) +# For beta releases uncomment the next two lines and comment the lines with QT_FROM_GITHUB, QT_FROM_GITHUB_BRANCH, QT_FROM_QT_GIT +#set(QT_FROM_QT_GIT ${QT_PORTS}) +#list(POP_FRONT QT_FROM_QT_GIT) + +function(qt_get_url_filename qt_port out_urls out_filename) + if("${qt_port}" IN_LIST QT_FROM_GITHUB) + set(urls "https://github.com/qt/${qt_port}/archive/v${QT_VERSION}.tar.gz") + set(filename "qt-${qt_port}-v${QT_VERSION}.tar.gz") + elseif("${qt_port}" IN_LIST QT_FROM_GITHUB_BRANCH) + set(urls "https://github.com/qt/${qt_port}/archive/${QT_VERSION}.tar.gz") + set(filename "qt-${qt_port}-${QT_VERSION}.tar.gz") + else() + string(SUBSTRING "${QT_VERSION}" 0 3 qt_major_minor) + + if(NOT QT_DEV_BRANCH) + set(branch_subpath "archive") + else() + set(branch_subpath "development_releases") + endif() + + set(filename "${qt_port}-everywhere-src-${QT_VERSION}.tar.xz") + set(mirrors + "https://download.qt.io/" + "https://mirrors.ocf.berkeley.edu/qt/" + ) + set(url_subpath "${branch_subpath}/qt/${qt_major_minor}/${QT_VERSION}/submodules/${filename}") + list(TRANSFORM mirrors APPEND "${url_subpath}" OUTPUT_VARIABLE urls) + endif() + set(${out_urls} ${urls} PARENT_SCOPE) + set(${out_filename} "${filename}" PARENT_SCOPE) +endfunction() + +if(QT_UPDATE_VERSION) + if(NOT PORT STREQUAL "qtbase") + message(FATAL_ERROR "QT_UPDATE_VERSION must be used from the root 'qtbase' package") + endif() + set(VCPKG_USE_HEAD_VERSION 1) + set(msg "" CACHE INTERNAL "") + foreach(qt_port IN LISTS QT_PORTS) + set(port_json "${CMAKE_CURRENT_LIST_DIR}/../../${qt_port}/vcpkg.json") + file(READ "${port_json}" _control_contents) + string(REGEX REPLACE "\"version(-(string|semver))?\": [^\n]+\n" "\"version\": \"${QT_VERSION}\",\n" _control_contents "${_control_contents}") + string(REGEX REPLACE "\"port-version\": [^\n]+\n" "" _control_contents "${_control_contents}") + file(WRITE "${port_json}" "${_control_contents}") + if(qt_port STREQUAL "qt") + continue() + endif() + if("${qt_port}" IN_LIST QT_FROM_QT_GIT) + vcpkg_find_acquire_program(GIT) + execute_process( + COMMAND "${GIT}" ls-remote -t "https://code.qt.io/cgit/qt/${qt_port}.git" "v${QT_VERSION}" + OUTPUT_VARIABLE out + ) + string(SUBSTRING "${out}" 0 40 tag_sha) + string(APPEND msg "set(${qt_port}_REF ${tag_sha})\n") + else() + qt_get_url_filename("${qt_port}" urls filename) + vcpkg_download_distfile(archive + URLS ${urls} + FILENAME "${filename}" + SKIP_SHA512 + ) + file(SHA512 "${archive}" hash) + string(APPEND msg "set(${qt_port}_HASH \"${hash}\")\n") + endif() + endforeach() + message("${msg}") + file(WRITE "${CMAKE_CURRENT_LIST_DIR}/qt_port_data_new.cmake" "${msg}") + message(FATAL_ERROR "Done downloading version and emitting hashes.") +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/qt_port_data.cmake") diff --git a/vcpkg/ports/qtbase/config_install.patch b/vcpkg/ports/qtbase/config_install.patch new file mode 100644 index 000000000..fdfc70330 --- /dev/null +++ b/vcpkg/ports/qtbase/config_install.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/QtBuildPathsHelpers.cmake b/cmake/QtBuildPathsHelpers.cmake +index bd186c28b..edee52e8b 100644 +--- a/cmake/QtBuildPathsHelpers.cmake ++++ b/cmake/QtBuildPathsHelpers.cmake +@@ -100,7 +100,7 @@ function(qt_internal_set_up_global_paths) + if(QT_CONFIG_INSTALL_DIR) + string(APPEND QT_CONFIG_INSTALL_DIR "/") + endif() +- string(APPEND QT_CONFIG_INSTALL_DIR ${__config_path_part}) ++ string(APPEND QT_CONFIG_INSTALL_DIR "share") + + set(QT_BUILD_DIR "${QT_BUILD_DIR}" PARENT_SCOPE) + set(QT_INSTALL_DIR "${QT_INSTALL_DIR}" PARENT_SCOPE) diff --git a/vcpkg/ports/qtbase/dont_force_cmakecache_latest.patch b/vcpkg/ports/qtbase/dont_force_cmakecache_latest.patch new file mode 100644 index 000000000..752cefe6d --- /dev/null +++ b/vcpkg/ports/qtbase/dont_force_cmakecache_latest.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake +index 4f8106dfa..bec5c402e 100644 +--- a/cmake/QtPostProcessHelpers.cmake ++++ b/cmake/QtPostProcessHelpers.cmake +@@ -414,7 +414,7 @@ function(qt_generate_install_prefixes out_var) + + foreach(var ${vars}) + get_property(docstring CACHE "${var}" PROPERTY HELPSTRING) +- string(APPEND content "set(${var} \"${${var}}\" CACHE STRING \"${docstring}\" FORCE)\n") ++ string(APPEND content "set(${var} \"${${var}}\" CACHE STRING \"${docstring}\")\n") + endforeach() + + set(${out_var} "${content}" PARENT_SCOPE) diff --git a/vcpkg/ports/qtbase/env.patch b/vcpkg/ports/qtbase/env.patch new file mode 100644 index 000000000..6a3716759 --- /dev/null +++ b/vcpkg/ports/qtbase/env.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake +index 279ab07dd..951fd3d36 100644 +--- a/cmake/QtTestHelpers.cmake ++++ b/cmake/QtTestHelpers.cmake +@@ -653,9 +653,9 @@ function(qt_internal_collect_command_environment out_path out_plugin_path) + # The regular CMAKE_INSTALL_PREFIX can be different for example when building standalone tests. + # Any given CMAKE_INSTALL_PREFIX takes priority over qt_relocatable_install_prefix for the + # PATH environment variable. +- set(install_prefixes "${CMAKE_INSTALL_PREFIX}") ++ set(install_prefixes "${CMAKE_INSTALL_PREFIX}$<$:/debug>") + if(QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX) +- list(APPEND install_prefixes "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}") ++ list(APPEND install_prefixes "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}$<$:/debug>") + endif() + + file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" test_env_path) diff --git a/vcpkg/ports/qtbase/fix-host-aliasing.patch b/vcpkg/ports/qtbase/fix-host-aliasing.patch new file mode 100644 index 000000000..1823a351d --- /dev/null +++ b/vcpkg/ports/qtbase/fix-host-aliasing.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake +index 180ec33..a03e3b1 100644 +--- a/cmake/QtTargetHelpers.cmake ++++ b/cmake/QtTargetHelpers.cmake +@@ -281,10 +281,10 @@ function(qt_internal_add_target_aliases target) + set_target_properties("${target}" PROPERTIES _qt_versionfull_alias "${versionfull_alias}") + + get_target_property(type "${target}" TYPE) +- if (type STREQUAL EXECUTABLE) ++ if (type STREQUAL EXECUTABLE AND NOT TARGET "${versionfull_alias}") + add_executable("${versionless_alias}" ALIAS "${target}") + add_executable("${versionfull_alias}" ALIAS "${target}") +- else() ++ elseif(NOT type STREQUAL EXECUTABLE) + add_library("${versionless_alias}" ALIAS "${target}") + add_library("${versionfull_alias}" ALIAS "${target}") + endif() diff --git a/vcpkg/ports/qtbase/fix-link-lib-discovery.patch b/vcpkg/ports/qtbase/fix-link-lib-discovery.patch new file mode 100644 index 000000000..339d25490 --- /dev/null +++ b/vcpkg/ports/qtbase/fix-link-lib-discovery.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake +index b6f1242..eaa4d65 100644 +--- a/cmake/QtPriHelpers.cmake ++++ b/cmake/QtPriHelpers.cmake +@@ -37,6 +37,7 @@ function(qt_generate_qmake_libraries_pri_content module_name output_root_dir out + get_target_property(lib_target_type ${lib_target} TYPE) + if(lib_target_type MATCHES "^(INTERFACE|UNKNOWN)_LIBRARY") + get_target_property(iface_libs ${lib_target} INTERFACE_LINK_LIBRARIES) ++ string(REGEX REPLACE [[\$]+)>]] "\\1" iface_libs "${iface_libs}") + if(iface_libs) + list(PREPEND lib_targets ${iface_libs}) + endif() diff --git a/vcpkg/ports/qtbase/fix_cmake_build.patch b/vcpkg/ports/qtbase/fix_cmake_build.patch new file mode 100644 index 000000000..65410e3fc --- /dev/null +++ b/vcpkg/ports/qtbase/fix_cmake_build.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in +index ffc9d90f8..0b3a7d59e 100644 +--- a/cmake/QtBuildInternalsExtra.cmake.in ++++ b/cmake/QtBuildInternalsExtra.cmake.in +@@ -51,8 +51,8 @@ endif() + set(QT_WILL_INSTALL @QT_WILL_INSTALL@ CACHE BOOL + "Boolean indicating if doing a Qt prefix build (vs non-prefix build)." FORCE) + +-set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH +-"A path to the source tree of the previously configured QtBase project." FORCE) ++# set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH ++# "A path to the source tree of the previously configured QtBase project." FORCE) + + # Propagate decision of building tests and examples to other repositories. + set(QT_BUILD_TESTS @QT_BUILD_TESTS@ CACHE BOOL "Build the testing tree.") diff --git a/vcpkg/ports/qtbase/fix_deploy_windows.patch b/vcpkg/ports/qtbase/fix_deploy_windows.patch new file mode 100644 index 000000000..2d2f46ff0 --- /dev/null +++ b/vcpkg/ports/qtbase/fix_deploy_windows.patch @@ -0,0 +1,26 @@ +diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake +index 8a0d07feac..0e6a720c20 100644 +--- a/src/corelib/Qt6CoreMacros.cmake ++++ b/src/corelib/Qt6CoreMacros.cmake +@@ -2977,17 +2977,19 @@ function(_qt_internal_setup_deploy_support) + if(CMAKE_HOST_WIN32) ++ if(CMAKE_CROSSCOMPILING AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") +- if(CMAKE_CROSSCOMPILING) + set(qt_paths_ext ".bat") ++ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") ++ set(qt_paths_ext ".debug.bat") + else() + set(qt_paths_ext ".exe") + endif() + else() + set(qt_paths_ext "") + endif() + + + + set(target_qtpaths_path "") +- set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_BINS}") ++ set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/tools/Qt6/bin") + get_property(qt_major_version TARGET "${target}" PROPERTY INTERFACE_QT_MAJOR_VERSION) + if(qt_major_version) + set(target_qtpaths_with_major_version_path diff --git a/vcpkg/ports/qtbase/fix_egl.patch b/vcpkg/ports/qtbase/fix_egl.patch new file mode 100644 index 000000000..786831068 --- /dev/null +++ b/vcpkg/ports/qtbase/fix_egl.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake +index eafbc1ff9..dd4068838 100644 +--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake ++++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake +@@ -82,6 +82,7 @@ find_path(EGL_INCLUDE_DIR + find_library(EGL_LIBRARY + NAMES + EGL ++ libEGL # required to find angle on windows within vcpkg. + HINTS + ${PKG_EGL_LIBRARY_DIRS} + ) diff --git a/vcpkg/ports/qtbase/fix_egl_2.patch b/vcpkg/ports/qtbase/fix_egl_2.patch new file mode 100644 index 000000000..78b1c360f --- /dev/null +++ b/vcpkg/ports/qtbase/fix_egl_2.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake +index db48f79b9..4b1686132 100644 +--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake ++++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake +@@ -116,7 +116,7 @@ if(EGL_INCLUDE_DIR) + unset(_EGL_version_lines) + endif() + +-cmake_push_check_state(RESET) ++cmake_push_check_state() # To be able to fix the compile check in vcpkg-cmake-wrapper + list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}") + list(APPEND CMAKE_REQUIRED_INCLUDES "${EGL_INCLUDE_DIR}") + list(APPEND CMAKE_REQUIRED_DEFINITIONS "${EGL_DEFINITIONS}") diff --git a/vcpkg/ports/qtbase/harfbuzz.patch b/vcpkg/ports/qtbase/harfbuzz.patch new file mode 100644 index 000000000..a2f8e7424 --- /dev/null +++ b/vcpkg/ports/qtbase/harfbuzz.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindWrapSystemHarfbuzz.cmake b/cmake/FindWrapSystemHarfbuzz.cmake +index 3cb44aa76..9bf0d7165 100644 +--- a/cmake/FindWrapSystemHarfbuzz.cmake ++++ b/cmake/FindWrapSystemHarfbuzz.cmake +@@ -6,7 +6,7 @@ if(TARGET WrapSystemHarfbuzz::WrapSystemHarfbuzz) + endif() + set(WrapSystemHarfbuzz_REQUIRED_VARS __harfbuzz_found) + +-find_package(harfbuzz ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET) ++find_package(harfbuzz QUIET) # VCPKG is missing the version file for harfbuzz. + + # Gentoo has some buggy version of a harfbuzz Config file. Check if include paths are valid. + set(__harfbuzz_target_name "harfbuzz::harfbuzz") diff --git a/vcpkg/ports/qtbase/installed_dir.patch b/vcpkg/ports/qtbase/installed_dir.patch new file mode 100644 index 000000000..918673141 --- /dev/null +++ b/vcpkg/ports/qtbase/installed_dir.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in +index 6e37ae02..e7e84468 100644 +--- a/cmake/qt.toolchain.cmake.in ++++ b/cmake/qt.toolchain.cmake.in +@@ -65,6 +65,10 @@ get_filename_component(QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX + # one level higher is what we're looking for. + get_filename_component(QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE) + ++get_filename_component(vcpkg_installed_dir ++ ${CMAKE_CURRENT_LIST_DIR}/../../../ ++ ABSOLUTE) ++ + # REROOT_PATH_ISSUE_MARKER + # There's a subdirectory check in cmake's cmFindCommon::RerootPaths() function, that doesn't handle + # the case of CMAKE_PREFIX_PATH == CMAKE_FIND_ROOT_PATH for a particular pair of entries. diff --git a/vcpkg/ports/qtbase/macdeployqt-symlinks.patch b/vcpkg/ports/qtbase/macdeployqt-symlinks.patch new file mode 100644 index 000000000..ce6fe71f6 --- /dev/null +++ b/vcpkg/ports/qtbase/macdeployqt-symlinks.patch @@ -0,0 +1,33 @@ +diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp +index 6ff269b..caffd44 100644 +--- a/src/tools/macdeployqt/shared/shared.cpp ++++ b/src/tools/macdeployqt/shared/shared.cpp +@@ -1,4 +1,5 @@ + // Copyright (C) 2016 The Qt Company Ltd. ++ + // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + #include + #include +@@ -85,7 +86,21 @@ + } + } + +- if (QFile::copy(from, to)) { ++ QFileInfo fromFileInfo(from); ++ ++ if (fromFileInfo.isSymLink()) { ++ const QString fromSymLinkTarget = fromFileInfo.absoluteDir().relativeFilePath(fromFileInfo.symLinkTarget()); ++ if (QFile::link(fromSymLinkTarget, to)) { ++ return copyFilePrintStatus(fromFileInfo.absoluteDir().absoluteFilePath(fromSymLinkTarget), QFileInfo(to).absoluteDir().absoluteFilePath(fromSymLinkTarget)); ++ } ++ else { ++ LogError() << "symlink copy failed from" << from; ++ LogError() << " to" << to; ++ return false; ++ } ++ ++ } ++ else if (QFile::copy(from, to)) { + QFile dest(to); + dest.setPermissions(dest.permissions() | QFile::WriteOwner | QFile::WriteUser); + LogNormal() << " copied:" << from; diff --git a/vcpkg/ports/qtbase/portfile.cmake b/vcpkg/ports/qtbase/portfile.cmake new file mode 100644 index 000000000..e997ade1c --- /dev/null +++ b/vcpkg/ports/qtbase/portfile.cmake @@ -0,0 +1,588 @@ +# Reminder for myself and everybody else: +# Qt cross module dependency information within the Qt respository is wrong and/or incomplete. +# Always check the toplevel CMakeLists.txt for the find_package call and search for linkage against the Qt:: targets +# Often enough certain (bigger) dependencies are only used to build examples and/or tests. +# As such getting the correct dependency information relevant for vcpkg requires a manual search/check +set(QT_IS_LATEST ON) + +## All above goes into the qt_port_hashes in the future +include("${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_submodule.cmake") + +set(${PORT}_PATCHES + allow_outside_prefix.patch + config_install.patch + fix_cmake_build.patch + harfbuzz.patch + fix_egl.patch + fix_egl_2.patch + installed_dir.patch + GLIB2-static.patch # alternative is to force pkg-config + clang-cl_source_location.patch + clang-cl_QGADGET_fix.diff + fix-host-aliasing.patch + fix_deploy_windows.patch + fix-link-lib-discovery.patch + macdeployqt-symlinks.patch +) + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + list(APPEND ${PORT}_PATCHES env.patch) +endif() + +list(APPEND ${PORT}_PATCHES + dont_force_cmakecache_latest.patch + ) + +if(VCPKG_TARGET_IS_WINDOWS AND NOT "doubleconversion" IN_LIST FEATURES) + message(FATAL_ERROR "${PORT} requires feature doubleconversion on windows!" ) +endif() + +if(VCPKG_TARGET_IS_LINUX) + message(WARNING "qtbase currently requires packages from the system package manager. " + "They can be installed on Ubuntu systems via sudo apt-get install " + "'^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev " + "libxkbcommon-x11-dev libegl1-mesa-dev.") +endif() + +# Features can be found via searching for qt_feature in all configure.cmake files in the source: +# The files also contain information about the Platform for which it is searched +# Always use FEATURE_ in vcpkg_cmake_configure +# (using QT_FEATURE_X overrides Qts condition check for the feature.) +# Theoretically there is a feature for every widget to enable/disable it but that is way to much for vcpkg + +set(input_vars doubleconversion freetype harfbuzz libb2 jpeg libmd4c png sql-sqlite) +set(INPUT_OPTIONS) +foreach(_input IN LISTS input_vars) + if(_input MATCHES "(png|jpeg)" ) + list(APPEND INPUT_OPTIONS -DINPUT_lib${_input}:STRING=) + elseif(_input MATCHES "(sql-sqlite)") # Not yet used by the cmake build + else() + list(APPEND INPUT_OPTIONS -DINPUT_${_input}:STRING=) + endif() + if("${_input}" IN_LIST FEATURES) + string(APPEND INPUT_OPTIONS system) + elseif(_input STREQUAL "libb2" AND NOT VCPKG_TARGET_IS_WINDOWS) + string(APPEND INPUT_OPTIONS system) + elseif(_input STREQUAL "libmd4c") + string(APPEND INPUT_OPTIONS qt) # libmd4c is not yet in VCPKG (but required by qtdeclarative) + else() + string(APPEND INPUT_OPTIONS no) + endif() +endforeach() + +# General features: + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "appstore-compliant" FEATURE_appstore_compliant + "zstd" FEATURE_zstd + "framework" FEATURE_framework + "concurrent" FEATURE_concurrent + "concurrent" FEATURE_future + "dbus" FEATURE_dbus + "gui" FEATURE_gui + "thread" FEATURE_thread + "network" FEATURE_network + "sql" FEATURE_sql + "widgets" FEATURE_widgets + #"xml" FEATURE_xml # Required to build moc + "testlib" FEATURE_testlib + "zstd" CMAKE_REQUIRE_FIND_PACKAGE_zstd + ${require_features} +INVERTED_FEATURES + "zstd" CMAKE_DISABLE_FIND_PACKAGE_ZSTD + "dbus" CMAKE_DISABLE_FIND_PACKAGE_WrapDBus1 + ) + +list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libudev:BOOL=ON) +list(APPEND FEATURE_OPTIONS -DFEATURE_xml:BOOL=ON) + +if("dbus" IN_LIST FEATURES AND VCPKG_TARGET_IS_LINUX) + list(APPEND FEATURE_OPTIONS -DINPUT_dbus=linked) +elseif("dbus" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_dbus=runtime) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_dbus=no) +endif() + +if(VCPKG_QT_NAMESPACE) + list(APPEND FEATURE_OPTIONS "-DQT_NAMESPACE:STRING=${VCPKG_QT_NAMESPACE}") +endif() + +# Corelib features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_CORE_OPTIONS +FEATURES + "doubleconversion" FEATURE_doubleconversion + "glib" FEATURE_glib + "icu" FEATURE_icu + "pcre2" FEATURE_pcre2 + #"icu" CMAKE_REQUIRE_FIND_PACKAGE_ICU + "glib" CMAKE_REQUIRE_FIND_PACKAGE_GLIB2 +INVERTED_FEATURES + #"doubleconversion" CMAKE_DISABLE_FIND_PACKAGE_WrapDoubleConversion # Required + #"pcre2" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemPCRE2 # Bug in qt cannot be deactivated + "icu" CMAKE_DISABLE_FIND_PACKAGE_ICU + "glib" CMAKE_DISABLE_FIND_PACKAGE_GLIB2 + ) + +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LTTngUST:BOOL=ON) +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_PPS:BOOL=ON) +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Slog2:BOOL=ON) +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libsystemd:BOOL=ON) +list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapBacktrace:BOOL=ON) +#list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapAtomic:BOOL=ON) # Cannot be disabled on x64 platforms +#list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapRt:BOOL=ON) # Cannot be disabled on osx + +if (VCPKG_TARGET_IS_ANDROID) + list(APPEND FEATURE_CORE_OPTIONS -DFEATURE_getentropy:BOOL=OFF) +endif() + +# Network features: + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_NET_OPTIONS + FEATURES + "openssl" FEATURE_openssl + "brotli" FEATURE_brotli + "securetransport" FEATURE_securetransport + "dnslookup" FEATURE_dnslookup + #"brotli" CMAKE_REQUIRE_FIND_PACKAGE_WrapBrotli + #"openssl" CMAKE_REQUIRE_FIND_PACKAGE_WrapOpenSSL + INVERTED_FEATURES + "brotli" CMAKE_DISABLE_FIND_PACKAGE_WrapBrotli + "openssl" CMAKE_DISABLE_FIND_PACKAGE_WrapOpenSSL + "dnslookup" CMAKE_DISABLE_FIND_PACKAGE_WrapResolve + ) + +if("openssl" IN_LIST FEATURES) + list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=linked) +else() + list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=no) +endif() + +if ("dnslookup" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + list(APPEND FEATURE_NET_OPTIONS -DFEATURE_libresolv:BOOL=ON) +endif() + +list(APPEND FEATURE_NET_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libproxy:BOOL=ON) +list(APPEND FEATURE_NET_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GSSAPI:BOOL=ON) + +# Gui features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_GUI_OPTIONS + FEATURES + "freetype" FEATURE_freetype # required on windows + "harfbuzz" FEATURE_harfbuzz + "fontconfig" FEATURE_fontconfig # NOT WINDOWS + "jpeg" FEATURE_jpeg + "png" FEATURE_png + "opengl" FEATURE_opengl + "xlib" FEATURE_xlib + "xkb" FEATURE_xkbcommon + "xcb" FEATURE_xcb + "xcb-xlib" FEATURE_xcb_xlib + "xkbcommon-x11" FEATURE_xkbcommon_x11 + "xrender" FEATURE_xrender # requires FEATURE_xcb_native_painting; otherwise disabled. + "xrender" FEATURE_xcb_native_painting # experimental + "gles2" FEATURE_opengles2 + "gles3" FEATURE_opengles3 + #Cannot be required since Qt will look in CONFIG mode first but is controlled via CMAKE_DISABLE_FIND_PACKAGE_Vulkan below + #"vulkan" CMAKE_REQUIRE_FIND_PACKAGE_WrapVulkanHeaders + "egl" FEATURE_egl + #"fontconfig" CMAKE_REQUIRE_FIND_PACKAGE_Fontconfig + #"harfbuzz" CMAKE_REQUIRE_FIND_PACKAGE_WrapSystemHarfbuzz + #"jpeg" CMAKE_REQUIRE_FIND_PACKAGE_JPEG + #"png" CMAKE_REQUIRE_FIND_PACKAGE_PNG + #"xlib" CMAKE_REQUIRE_FIND_PACKAGE_X11 + #"xkb" CMAKE_REQUIRE_FIND_PACKAGE_XKB + #"xcb" CMAKE_REQUIRE_FIND_PACKAGE_XCB + #"xcb-xlib" CMAKE_REQUIRE_FIND_PACKAGE_X11_XCB + #"xkbcommon-x11" CMAKE_REQUIRE_FIND_PACKAGE_XKB_COMMON_X11 + #"xrender" CMAKE_REQUIRE_FIND_PACKAGE_XRender + INVERTED_FEATURES + "vulkan" CMAKE_DISABLE_FIND_PACKAGE_Vulkan + "opengl" CMAKE_DISABLE_FIND_PACKAGE_WrapOpenGL + "egl" CMAKE_DISABLE_FIND_PACKAGE_EGL + "gles2" CMAKE_DISABLE_FIND_PACKAGE_GLESv2 + "gles3" CMAKE_DISABLE_FIND_PACKAGE_GLESv3 + "fontconfig" CMAKE_DISABLE_FIND_PACKAGE_Fontconfig + #"freetype" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemFreetype # Bug in qt cannot be deactivated + "harfbuzz" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemHarfbuzz + "jpeg" CMAKE_DISABLE_FIND_PACKAGE_JPEG + #"png" CMAKE_DISABLE_FIND_PACKAGE_PNG # Unable to disable if Freetype requires it + "xlib" CMAKE_DISABLE_FIND_PACKAGE_X11 + "xkb" CMAKE_DISABLE_FIND_PACKAGE_XKB + "xcb" CMAKE_DISABLE_FIND_PACKAGE_XCB + "xcb-xlib" CMAKE_DISABLE_FIND_PACKAGE_X11_XCB + "xkbcommon-x11" CMAKE_DISABLE_FIND_PACKAGE_XKB_COMMON_X11 + "xrender" CMAKE_DISABLE_FIND_PACKAGE_XRender + # There are more X features but I am unsure how to safely disable them! Most of them seem to be found automaticall with find_package(X11) + ) + +if("gles2" IN_LIST FEATURES) + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_opengl='es2') + list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_desktop=OFF) +endif() + +if(NOT "opengl" IN_LIST FEATURES AND NOT "gles2" IN_LIST FEATURES) + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_opengl='no') + list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_desktop=OFF) + list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_dynamic=OFF) +endif() + +if("xcb" IN_LIST FEATURES) + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xcb=yes) +else() + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xcb=no) +endif() +if("xkb" IN_LIST FEATURES) + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=yes) +else() + list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=no) +endif() + +# Disable OpenGL ES 3.1 and 3.2 +list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles31:BOOL=OFF) +list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles32:BOOL=OFF) + +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_ATSPI2:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_DirectFB:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libdrm:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_gbm:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libinput:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Mtdev:BOOL=ON) +list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Tslib:BOOL=ON) +# sql-drivers features: + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_SQLDRIVERS_OPTIONS + FEATURES + "sql-sqlite" FEATURE_system_sqlite + "sql-odbc" FEATURE_sql_odbc + "sql-mysql" FEATURE_sql_mysql + "sql-oci" FEATURE_sql_oci + #"sql-psql" CMAKE_REQUIRE_FIND_PACKAGE_PostgreSQL + #"sql-sqlite" CMAKE_REQUIRE_FIND_PACKAGE_SQLite3 + INVERTED_FEATURES + "sql-psql" CMAKE_DISABLE_FIND_PACKAGE_PostgreSQL + "sql-sqlite" CMAKE_DISABLE_FIND_PACKAGE_SQLite3 + "sql-odbc" CMAKE_DISABLE_FIND_PACKAGE_ODBC + "sql-mysql" CMAKE_DISABLE_FIND_PACKAGE_MySQL + "sql-oci" CMAKE_DISABLE_FIND_PACKAGE_Oracle + ) + +set(DB_LIST DB2 Interbase Mimer) +foreach(_db IN LISTS DB_LIST) + list(APPEND FEATURE_SQLDRIVERS_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${_db}:BOOL=ON) +endforeach() + +# printsupport features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_PRINTSUPPORT_OPTIONS + FEATURES + "cups" FEATURE_cups + INVERTED_FEATURES + "cups" CMAKE_DISABLE_FIND_PACKAGE_Cups +) + + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_WIDGETS_OPTIONS + FEATURES + "gtk3" FEATURE_gtk3 + INVERTED_FEATURES + "gtk3" CMAKE_DISABLE_FIND_PACKAGE_GTK3 +) + +set(TOOL_NAMES + androiddeployqt + androidtestrunner + cmake_automoc_parser + moc + qdbuscpp2xml + qdbusxml2cpp + qlalr + qmake + qmake6 + qvkgen + rcc + tracegen + uic + qtpaths + qtpaths6 + windeployqt + windeployqt6 + macdeployqt + macdeployqt6 + androiddeployqt6 + syncqt + tracepointgen + ) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + #--trace-expand + ${FEATURE_OPTIONS} + ${FEATURE_CORE_OPTIONS} + ${FEATURE_NET_OPTIONS} + ${FEATURE_GUI_OPTIONS} + ${FEATURE_SQLDRIVERS_OPTIONS} + ${FEATURE_PRINTSUPPORT_OPTIONS} + ${FEATURE_WIDGETS_OPTIONS} + ${INPUT_OPTIONS} + -DQT_USE_BUNDLED_BundledFreetype:BOOL=FALSE + -DQT_USE_BUNDLED_BundledHarfbuzz:BOOL=FALSE + -DQT_USE_BUNDLED_BundledLibpng:BOOL=FALSE + -DQT_USE_BUNDLED_BundledPcre2:BOOL=FALSE + -DINPUT_bundled_xcb_xinput:STRING=no + -DFEATURE_force_debug_info:BOOL=ON + -DFEATURE_relocatable:BOOL=ON + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + -DFEATURE_debug:BOOL=ON + CONFIGURE_OPTIONS_MAYBE_UNUSED + FEATURE_appstore_compliant # only used for android/ios + ) + +# Install CMake helper scripts +file(COPY + "${CMAKE_CURRENT_LIST_DIR}/cmake/" + DESTINATION + "${CURRENT_PACKAGES_DIR}/share/${PORT}" + ) + +file(CONFIGURE OUTPUT "${CURRENT_PACKAGES_DIR}/share/${PORT}/port_status.cmake" CONTENT "set(qtbase_with_icu ${FEATURE_icu})\n") + +set(other_files qt-cmake + qt-cmake-create + qt-cmake-private + qt-cmake-standalone-test + qt-configure-module + qt-internal-configure-tests + qt-cmake-create + qt-internal-configure-examples + qt-internal-configure-tests + qmake + qmake6 + qtpaths + qtpaths6 +) + +if(CMAKE_HOST_WIN32) + set(script_suffix ".bat") +else() + set(script_suffix "") +endif() +list(TRANSFORM other_files APPEND "${script_suffix}") + +list(APPEND other_files + android_cmakelist_patcher.sh + android_emulator_launcher.sh + ensure_pro_file.cmake + qt-android-runner.py + qt-cmake-private-install.cmake + qt-testrunner.py + qt-wasmtestrunner.py + sanitizer-testrunner.py + syncqt.pl + target_qt.conf +) + +foreach(_config debug release) + if(_config MATCHES "debug") + set(path_suffix debug/) + else() + set(path_suffix) + endif() + if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin") + continue() + endif() + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}") + foreach(other_file IN LISTS other_files) + if(EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${other_file}") + set(target_file "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}${other_file}") + file(RENAME "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${other_file}" "${target_file}") + file(READ "${target_file}" _contents) + if(_config MATCHES "debug") + string(REPLACE "..\\share\\" "..\\..\\..\\..\\share\\" _contents "${_contents}") + string(REPLACE "../share/" "../../../../share/" _contents "${_contents}") + else() + string(REPLACE "..\\share\\" "..\\..\\..\\share\\" _contents "${_contents}") + string(REPLACE "../share/" "../../../share/" _contents "${_contents}") + endif() + string(REGEX REPLACE "set cmake_path=[^\n]+\n" "set cmake_path=cmake\n" _contents "${_contents}") + string(REGEX REPLACE "original_cmake_path=[^\n]+\n" "original_cmake_path=does-not-exist\n" _contents "${_contents}") + file(WRITE "${target_file}" "${_contents}") + endif() + endforeach() +endforeach() + +# Fixup qt.toolchain.cmake +set(qttoolchain "${CURRENT_PACKAGES_DIR}/share/Qt6/qt.toolchain.cmake") +file(READ "${qttoolchain}" toolchain_contents) +string(REGEX REPLACE "set\\\(__qt_initially_configured_toolchain_file [^\\\n]+\\\n" "" toolchain_contents "${toolchain_contents}") +string(REGEX REPLACE "set\\\(__qt_chainload_toolchain_file [^\\\n]+\\\n" "set(__qt_chainload_toolchain_file \"\${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}\")" toolchain_contents "${toolchain_contents}") +string(REGEX REPLACE "set\\\(VCPKG_CHAINLOAD_TOOLCHAIN_FILE [^\\\n]+\\\n" "" toolchain_contents "${toolchain_contents}") +string(REGEX REPLACE "set\\\(__qt_initial_c_compiler [^\\\n]+\\\n" "" toolchain_contents "${toolchain_contents}") +string(REGEX REPLACE "set\\\(__qt_initial_cxx_compiler [^\\\n]+\\\n" "" toolchain_contents "${toolchain_contents}") +string(REPLACE "${CURRENT_HOST_INSTALLED_DIR}" "\${vcpkg_installed_dir}/${HOST_TRIPLET}" toolchain_contents "${toolchain_contents}") +file(WRITE "${qttoolchain}" "${toolchain_contents}") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_CROSSCOMPILING) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/qmake" "${CURRENT_PACKAGES_DIR}/debug/bin/qmake") # qmake has been moved so this is the qmake helper script + endif() + file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*") + if(NOT _bin_files) # Only clean if empty otherwise let vcpkg throw and error. + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" "${CURRENT_PACKAGES_DIR}/debug/bin/") + else() + message(STATUS "Files in '/bin':${_bin_files}") + endif() +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/QtBuildInternals") + +if(NOT VCPKG_TARGET_IS_OSX) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/macos") +endif() +if(NOT VCPKG_TARGET_IS_IOS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/ios") +endif() + +file(RELATIVE_PATH installed_to_host "${CURRENT_INSTALLED_DIR}" "${CURRENT_HOST_INSTALLED_DIR}") +file(RELATIVE_PATH host_to_installed "${CURRENT_HOST_INSTALLED_DIR}" "${CURRENT_INSTALLED_DIR}") +if(installed_to_host) + string(APPEND installed_to_host "/") + string(APPEND host_to_installed "/") +endif() +set(_file "${CMAKE_CURRENT_LIST_DIR}/qt.conf.in") +set(REL_PATH "") +set(REL_HOST_TO_DATA "\${CURRENT_INSTALLED_DIR}/") +configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/qt_release.conf" @ONLY) # For vcpkg-qmake +set(BACKUP_CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}") +set(BACKUP_CURRENT_HOST_INSTALLED_DIR "${CURRENT_HOST_INSTALLED_DIR}") +set(CURRENT_INSTALLED_DIR "./../../../") +set(CURRENT_HOST_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${installed_to_host}") + +## Configure installed qt.conf +set(REL_HOST_TO_DATA "${host_to_installed}") +configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qt.conf") +set(REL_PATH debug/) +configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qt.debug.conf") + +set(CURRENT_INSTALLED_DIR "${BACKUP_CURRENT_INSTALLED_DIR}") +set(CURRENT_HOST_INSTALLED_DIR "${BACKUP_CURRENT_HOST_INSTALLED_DIR}") +set(REL_HOST_TO_DATA "\${CURRENT_INSTALLED_DIR}/") +configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/qt_debug.conf" @ONLY) # For vcpkg-qmake + +set(target_qt_conf "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/target_qt.conf") +if(EXISTS "${target_qt_conf}") + file(READ "${target_qt_conf}" qt_conf_contents) + string(REGEX REPLACE "Prefix=[^\n]+" "Prefix=./../../../" qt_conf_contents ${qt_conf_contents}) + string(REGEX REPLACE "HostData=[^\n]+" "HostData=./../${TARGET_TRIPLET}/share/Qt6" qt_conf_contents ${qt_conf_contents}) + string(REGEX REPLACE "HostPrefix=[^\n]+" "HostPrefix=./../../../../${_HOST_TRIPLET}" qt_conf_contents ${qt_conf_contents}) + file(WRITE "${target_qt_conf}" "${qt_conf_contents}") + if(NOT VCPKG_BUILD_TYPE) + set(target_qt_conf_debug "${CURRENT_PACKAGES_DIR}/tools/Qt6/target_qt_debug.conf") + configure_file("${target_qt_conf}" "${target_qt_conf_debug}" COPYONLY) + file(READ "${target_qt_conf_debug}" qt_conf_contents) + string(REGEX REPLACE "=(bin|lib|Qt6/plugins|Qt6/qml)" "=debug/\\1" qt_conf_contents ${qt_conf_contents}) + file(WRITE "${target_qt_conf_debug}" "${qt_conf_contents}") + + configure_file("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake${script_suffix}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.debug${script_suffix}" COPYONLY) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.debug${script_suffix}" "target_qt.conf" "target_qt_debug.conf") + endif() +endif() + +if(VCPKG_TARGET_IS_EMSCRIPTEN) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6Core/Qt6WasmMacros.cmake" "_qt_test_emscripten_version()" "") # this is missing a include(QtPublicWasmToolchainHelpers) +endif() + + +if(VCPKG_TARGET_IS_WINDOWS) + set(_DLL_FILES brotlicommon brotlidec bz2 freetype harfbuzz libpng16) + set(DLLS_TO_COPY "") + foreach(_file IN LISTS _DLL_FILES) + if(EXISTS "${CURRENT_INSTALLED_DIR}/bin/${_file}.dll") + list(APPEND DLLS_TO_COPY "${CURRENT_INSTALLED_DIR}/bin/${_file}.dll") + endif() + endforeach() + file(COPY ${DLLS_TO_COPY} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") +endif() + +set(hostinfofile "${CURRENT_PACKAGES_DIR}/share/Qt6HostInfo/Qt6HostInfoConfig.cmake") +file(READ "${hostinfofile}" _contents) +string(REPLACE [[set(QT6_HOST_INFO_LIBEXECDIR "bin")]] [[set(QT6_HOST_INFO_LIBEXECDIR "tools/Qt6/bin")]] _contents "${_contents}") +string(REPLACE [[set(QT6_HOST_INFO_BINDIR "bin")]] [[set(QT6_HOST_INFO_BINDIR "tools/Qt6/bin")]] _contents "${_contents}") +file(WRITE "${hostinfofile}" "${_contents}") + +# MANUAL FIX - see +# https://github.com/microsoft/vcpkg/issues/44792 +if(NOT VCPKG_CROSSCOMPILING OR EXISTS "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsAdditionalTargetInfo.cmake") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsAdditionalTargetInfo.cmake" + "CMAKE_CURRENT_LIST_DIR}/../../bin/syncqt" + "CMAKE_CURRENT_LIST_DIR}/../../tools/Qt6/bin/syncqt" + IGNORE_UNCHANGED) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsAdditionalTargetInfo.cmake" + "PACKAGE_PREFIX_DIR}/bin/syncqt" + "PACKAGE_PREFIX_DIR}/tools/Qt6/bin/syncqt" + IGNORE_UNCHANGED) +endif() + +set(configfile "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsTargets-debug.cmake") +if(EXISTS "${configfile}") + file(READ "${configfile}" _contents) + if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.exe") + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/qmake.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") + string(REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qmake.exe"]] [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qmake.debug.bat"]] _contents "${_contents}") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qtpaths.exe") + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/qtpaths.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") + string(REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qtpaths.exe"]] [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qtpaths.debug.bat"]] _contents "${_contents}") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/windeployqt.exe") + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/windeployqt.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") + string(REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/windeployqt.exe"]] [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/windeployqt.debug.bat"]] _contents "${_contents}") + endif() + file(WRITE "${configfile}" "${_contents}") +endif() + +if(VCPKG_CROSSCOMPILING) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6/Qt6Dependencies.cmake" "${CURRENT_HOST_INSTALLED_DIR}" "\${CMAKE_CURRENT_LIST_DIR}/../../../${HOST_TRIPLET}") +endif() + +function(remove_original_cmake_path file) + file(READ "${file}" _contents) + string(REGEX REPLACE "original_cmake_path=[^\n]*" "original_cmake_path=''" _contents "${_contents}") + file(WRITE "${file}" "${_contents}") +endfunction() + +if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT CMAKE_HOST_WIN32) + foreach(file "qt-cmake${script_suffix}" "qt-cmake-private${script_suffix}") + remove_original_cmake_path("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${file}") + if(NOT VCPKG_BUILD_TYPE) + remove_original_cmake_path("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/debug/${file}") + endif() + endforeach() +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + # dlls owned but not automatically installed by qtbase + # this is required to avoid ownership troubles in downstream qt modules + set(qtbase_owned_dlls + double-conversion.dll + icudt74.dll + icuin74.dll + icuuc74.dll + libcrypto-3-${VCPKG_TARGET_ARCHITECTURE}.dll + libcrypto-3.dll # for x86 + pcre2-16.dll + zlib1.dll + zstd.dll + ) + if("dbus" IN_LIST FEATURES) + list(APPEND qtbase_owned_dlls dbus-1-3.dll) + endif() + list(TRANSFORM qtbase_owned_dlls PREPEND "${CURRENT_INSTALLED_DIR}/bin/") + foreach(dll IN LISTS qtbase_owned_dlls) + if(NOT EXISTS "${dll}") # Need to remove non-existant dlls since dependencies could have been build statically + list(REMOVE_ITEM qtbase_owned_dlls "${dll}") + endif() + endforeach() + file(COPY ${qtbase_owned_dlls} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") +endif() diff --git a/vcpkg/ports/qtbase/qmake.debug.bat b/vcpkg/ports/qtbase/qmake.debug.bat new file mode 100644 index 000000000..a7ed903a3 --- /dev/null +++ b/vcpkg/ports/qtbase/qmake.debug.bat @@ -0,0 +1,2 @@ +@echo off +"%0\..\qmake.exe" -qtconf "%0\..\qt.debug.conf" %* diff --git a/vcpkg/ports/qtbase/qt.conf.in b/vcpkg/ports/qtbase/qt.conf.in new file mode 100644 index 000000000..8e76b8f6d --- /dev/null +++ b/vcpkg/ports/qtbase/qt.conf.in @@ -0,0 +1,31 @@ +[DevicePaths] +Prefix=${CURRENT_INSTALLED_DIR} +Headers=include/@QT6_DIRECTORY_PREFIX@ +Libraries=@REL_PATH@lib +Plugins=@REL_PATH@@QT6_DIRECTORY_PREFIX@plugins +Qml2Imports=@REL_PATH@@QT6_DIRECTORY_PREFIX@qml +Documentation=doc/@QT6_DIRECTORY_PREFIX@ +Binaries=@REL_PATH@bin +LibraryExecutables=tools/Qt6/bin +ArchData=share/Qt6 +Data=share/Qt6 +Translations=translations/@QT6_DIRECTORY_PREFIX@ +Examples=share/examples/@QT6_DIRECTORY_PREFIX@ +[Paths] +Prefix=${CURRENT_INSTALLED_DIR} +Headers=include/@QT6_DIRECTORY_PREFIX@ +Libraries=@REL_PATH@lib +Plugins=@REL_PATH@@QT6_DIRECTORY_PREFIX@plugins +Qml2Imports=@REL_PATH@@QT6_DIRECTORY_PREFIX@qml +Documentation=doc/@QT6_DIRECTORY_PREFIX@ +Binaries=@REL_PATH@bin +LibraryExecutables=tools/Qt6/bin +ArchData=share/Qt6 +Data=share/Qt6 +Translations=translations/@QT6_DIRECTORY_PREFIX@ +Examples=share/examples/@QT6_DIRECTORY_PREFIX@ +HostPrefix=${CURRENT_HOST_INSTALLED_DIR} +HostData=@REL_HOST_TO_DATA@share/Qt6 +HostBinaries=@REL_PATH@bin +HostLibraries=@REL_PATH@lib +HostLibraryExecutables=tools/Qt6/bin diff --git a/vcpkg/ports/qtbase/qtpaths.debug.bat b/vcpkg/ports/qtbase/qtpaths.debug.bat new file mode 100644 index 000000000..4fef8e754 --- /dev/null +++ b/vcpkg/ports/qtbase/qtpaths.debug.bat @@ -0,0 +1,2 @@ +@echo off +"%0\..\qtpaths.exe" --qtconf "%0\..\qt.debug.conf" %* diff --git a/vcpkg/ports/qtbase/vcpkg.json b/vcpkg/ports/qtbase/vcpkg.json new file mode 100644 index 000000000..2cbacaba3 --- /dev/null +++ b/vcpkg/ports/qtbase/vcpkg.json @@ -0,0 +1,570 @@ +{ + "name": "qtbase", + "version": "6.8.3", + "port-version": 1, + "description": "Qt Base (Core, Gui, Widgets, Network, ...)", + "homepage": "https://www.qt.io/", + "license": null, + "supports": "!uwp", + "dependencies": [ + { + "name": "libb2", + "platform": "!windows" + }, + { + "name": "pcre2", + "default-features": false + }, + { + "name": "qtbase", + "host": true, + "default-features": false + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "doubleconversion" + ] + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "cups" + ], + "platform": "osx" + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "thread" + ], + "platform": "osx" + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "pcre2" + ], + "platform": "windows & static" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "default-features": [ + { + "name": "appstore-compliant", + "platform": "uwp" + }, + "brotli", + "concurrent", + { + "name": "dbus", + "platform": "!(static & windows)" + }, + "dnslookup", + "doubleconversion", + { + "name": "egl", + "platform": "linux" + }, + { + "name": "egl", + "platform": "android" + }, + { + "name": "fontconfig", + "platform": "linux" + }, + "freetype", + { + "name": "gles2", + "platform": "android" + }, + "gui", + "harfbuzz", + "icu", + "jpeg", + "network", + { + "name": "opengl", + "platform": "!ios" + }, + { + "name": "openssl", + "platform": "!ios" + }, + "pcre2", + "png", + { + "name": "securetransport", + "platform": "ios" + }, + "sql", + "sql-psql", + "sql-sqlite", + "testlib", + "thread", + "widgets", + { + "name": "xcb", + "platform": "linux" + }, + { + "name": "xcb-xlib", + "platform": "linux" + }, + { + "name": "xrender", + "platform": "linux" + }, + "zstd" + ], + "features": { + "appstore-compliant": { + "description": "Disable code that is not allowed in platform app stores. This is on by default for platforms which require distribution through an app store by default, in particular Android, iOS, tvOS, and watchOS." + }, + "brotli": { + "description": "Support for downloading and decompressing resources compressed with Brotli through QNetworkAccessManager.", + "dependencies": [ + "brotli", + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + } + ] + }, + "concurrent": { + "description": "Provides a high-level multi-threading API. Qt Concurrent", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "thread" + ] + } + ] + }, + "cups": { + "description": "Provides support for the Common Unix Printing System.", + "supports": "linux | osx" + }, + "dbus": { + "description": "Qt D-Bus", + "dependencies": [ + { + "name": "dbus", + "default-features": false + }, + { + "name": "qtbase", + "host": true, + "default-features": false, + "features": [ + "dbus" + ] + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "thread" + ] + } + ] + }, + "dnslookup": { + "description": "Enable DNS lookup support", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + } + ] + }, + "doubleconversion": { + "description": "Enable double conversion support", + "dependencies": [ + "double-conversion" + ] + }, + "egl": { + "description": "EGL", + "supports": "linux", + "dependencies": [ + "egl" + ] + }, + "fontconfig": { + "description": "Use fontconfig", + "dependencies": [ + "fontconfig", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "framework": { + "description": "MAC framework build", + "supports": "osx & !static" + }, + "freetype": { + "description": "Supports the FreeType 2 font engine (and its supported font formats).", + "dependencies": [ + { + "name": "freetype", + "default-features": false + } + ] + }, + "gles2": { + "description": "OpenGL ES 2.0", + "supports": "!windows & !osx", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "gles3": { + "description": "OpenGL ES 3.0", + "supports": "!windows & !osx", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gles2" + ] + } + ] + }, + "glib": { + "description": "GLib", + "dependencies": [ + "glib" + ] + }, + "gtk3": { + "description": "GTK3 platform theme plugin", + "supports": "linux", + "dependencies": [ + "gtk3", + { + "name": "qtbase", + "default-features": false, + "features": [ + "glib" + ] + } + ] + }, + "gui": { + "description": "Qt Gui", + "dependencies": [ + { + "name": "opengl", + "platform": "!ios" + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "freetype" + ] + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "opengl" + ], + "platform": "osx" + }, + { + "name": "qtbase", + "default-features": false, + "features": [ + "thread" + ], + "platform": "windows" + } + ] + }, + "harfbuzz": { + "description": "Use harfbuzz", + "dependencies": [ + "harfbuzz", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "icu": { + "description": "Enable ICU support", + "dependencies": [ + "icu" + ] + }, + "jpeg": { + "description": "Enable JPEG", + "dependencies": [ + "libjpeg-turbo", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "network": { + "description": "Qt Network" + }, + "opengl": { + "description": "OpenGL", + "dependencies": [ + "opengl", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "openssl": { + "description": "Enable OpenSSL", + "dependencies": [ + "openssl", + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + } + ] + }, + "pcre2": { + "description": "Enable PCRE2 support", + "dependencies": [ + { + "name": "pcre2", + "default-features": false + } + ] + }, + "png": { + "description": "Enable PNG", + "dependencies": [ + "libpng", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "securetransport": { + "description": "Enable Secure Transport", + "supports": "ios | osx" + }, + "sql": { + "description": "Qt Sql", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "concurrent" + ] + } + ] + }, + "sql-mysql": { + "description": "Enable SQL Driver MySQL", + "dependencies": [ + "libmysql", + { + "name": "qtbase", + "default-features": false, + "features": [ + "sql" + ] + } + ] + }, + "sql-oci": { + "description": "Enable SQL Driver Oracle OCI", + "dependencies": [ + "ocilib", + { + "name": "qtbase", + "default-features": false, + "features": [ + "sql" + ] + } + ] + }, + "sql-odbc": { + "description": "Enable SQL Driver odbc", + "supports": "windows", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "sql" + ] + } + ] + }, + "sql-psql": { + "description": "Enable SQL Driver psql", + "dependencies": [ + "libpq", + { + "name": "qtbase", + "default-features": false, + "features": [ + "sql" + ] + } + ] + }, + "sql-sqlite": { + "description": "Enable SQL Driver sqlite", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "sql" + ] + }, + "sqlite3" + ] + }, + "testlib": { + "description": "Qt Testlib" + }, + "thread": { + "description": "Thread support; provides QThread and related classes." + }, + "vulkan": { + "description": "Enable Vulkan support", + "dependencies": [ + "vulkan" + ] + }, + "widgets": { + "description": "Qt Widgets", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ] + }, + "xcb": { + "description": "XCB", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "concurrent", + "xkbcommon-x11", + "xlib" + ] + } + ] + }, + "xcb-xlib": { + "description": "xcb-xlib", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "xlib" + ] + } + ] + }, + "xkb": { + "description": "XKB" + }, + "xkbcommon-x11": { + "description": "xkbcommon_x11", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "xkb" + ] + } + ] + }, + "xlib": { + "description": "XLib" + }, + "xrender": { + "description": "XRender for native painting", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "xcb" + ] + } + ] + }, + "zstd": { + "description": "Zstandard support", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/vcpkg/ports/qtbase/windeployqt.debug.bat b/vcpkg/ports/qtbase/windeployqt.debug.bat new file mode 100644 index 000000000..234bb4383 --- /dev/null +++ b/vcpkg/ports/qtbase/windeployqt.debug.bat @@ -0,0 +1,10 @@ +@echo off +setlocal enabledelayedexpansion +set mypath=%~dp0 +set mypath=%mypath:~0,-1% +set BAKCD=!CD! +cd /D "%mypath%\..\..\..\debug\bin" +set PATH=!CD!;%PATH% +cd /D "%BAKCD%" +"%mypath%\windeployqt6.exe" --qtpaths "%mypath%\qtpaths.debug.bat" %* +endlocal diff --git a/vcpkg/ports/qtdeclarative/portfile.cmake b/vcpkg/ports/qtdeclarative/portfile.cmake new file mode 100644 index 000000000..4e6e576e9 --- /dev/null +++ b/vcpkg/ports/qtdeclarative/portfile.cmake @@ -0,0 +1,44 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +vcpkg_buildpath_length_warning(44) + +set(${PORT}_PATCHES "") + +set(TOOL_NAMES + qml + qmlaotstats + qmlcachegen + qmleasing + qmlformat + qmlimportscanner + qmllint + qmlplugindump + qmlpreview + qmlprofiler + qmlscene + qmltestrunner + qmltime + qmltyperegistrar + qmldom + qmltc + qmlls + qmljsrootgen + svgtoqml + ) + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS + -DFEATURE_quickcontrols2_fusion:BOOL=ON + -DFEATURE_quickcontrols2_material:BOOL=ON + -DFEATURE_quickcontrols2_imagine:BOOL=OFF + -DFEATURE_quickcontrols2_universal:BOOL=OFF + -DFEATURE_quickcontrols2_fluentwinui3:BOOL=OFF + -DFEATURE_quickcontrols2_macos:BOOL=OFF + -DFEATURE_quickcontrols2_ios:BOOL=OFF + -DFEATURE_quickcontrols2_windows:BOOL=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_LTTngUST:BOOL=ON + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/vcpkg/ports/qtdeclarative/vcpkg.json b/vcpkg/ports/qtdeclarative/vcpkg.json new file mode 100644 index 000000000..fe1561e83 --- /dev/null +++ b/vcpkg/ports/qtdeclarative/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "qtdeclarative", + "version": "6.8.3", + "description": "Qt Declarative (Quick 2)", + "homepage": "https://www.qt.io/", + "license": null, + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "network", + "testlib" + ] + }, + { + "name": "qtdeclarative", + "host": true, + "default-features": false + }, + "qtlanguageserver", + { + "name": "qtshadertools", + "default-features": false + }, + "qtsvg" + ] +} diff --git a/vcpkg/ports/qtkeychain-qt6/portfile.cmake b/vcpkg/ports/qtkeychain-qt6/portfile.cmake new file mode 100644 index 000000000..25e75075f --- /dev/null +++ b/vcpkg/ports/qtkeychain-qt6/portfile.cmake @@ -0,0 +1,49 @@ +message(WARNING "qtkeychain is a third-party extension to Qt and is not affiliated with The Qt Company") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO frankosterfeld/qtkeychain + REF "${VERSION}" + SHA512 d1d87553db94bf54da1373016a847476e6cd608db6d427ed72532658e2272501daf45d7c9976efdde2f26ab3810ba9dbfec2518d46dee5a76ecaa369bfee2e4a + HEAD_REF master +) + +if(VCPKG_CROSSCOMPILING) + list(APPEND QTKEYCHAIN_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}) + list(APPEND QTKEYCHAIN_OPTIONS -DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share) + # remove when https://github.com/microsoft/vcpkg/pull/16111 is merged + if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS) + list(APPEND QTKEYCHAIN_OPTIONS -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 -DCMAKE_SYSTEM_NAME:STRING=Windows) + endif() +endif() + +list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TEST_APPLICATION:BOOL=OFF) +list(APPEND QTKEYCHAIN_OPTIONS -DLIBSECRET_SUPPORT:BOOL=OFF) + +# FIXME: Why does build translations fail on arm64-windows? +if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=OFF) +else() + list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=ON) +endif() + +vcpkg_cmake_configure( + DISABLE_PARALLEL_CONFIGURE + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_WITH_QT6=ON + ${QTKEYCHAIN_OPTIONS} +) +vcpkg_cmake_install() + +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Qt6Keychain PACKAGE_NAME Qt6Keychain) + +# Remove unneeded dirs +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/qtkeychain-qt6/vcpkg.json b/vcpkg/ports/qtkeychain-qt6/vcpkg.json new file mode 100644 index 000000000..dd42992d0 --- /dev/null +++ b/vcpkg/ports/qtkeychain-qt6/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "qtkeychain-qt6", + "version": "0.14.3", + "port-version": 0, + "description": "(Unaffiliated with Qt) Platform-independent Qt6 API for storing passwords securely", + "homepage": "https://github.com/frankosterfeld/qtkeychain", + "license": "BSD-3-Clause", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + { + "name": "qttools", + "host": true, + "features": [ + "linguist" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} \ No newline at end of file diff --git a/vcpkg/ports/qtmultimedia/ffmpeg-compile-def.patch b/vcpkg/ports/qtmultimedia/ffmpeg-compile-def.patch new file mode 100644 index 000000000..95e531510 --- /dev/null +++ b/vcpkg/ports/qtmultimedia/ffmpeg-compile-def.patch @@ -0,0 +1,13 @@ +diff --git a/src/plugins/multimedia/ffmpeg/CMakeLists.txt b/src/plugins/multimedia/ffmpeg/CMakeLists.txt +index 77c459a..af5229e 100644 +--- a/src/plugins/multimedia/ffmpeg/CMakeLists.txt ++++ b/src/plugins/multimedia/ffmpeg/CMakeLists.txt +@@ -273,7 +273,7 @@ if(BUILD_SHARED_LIBS) + else() + foreach(ffmpeg_lib IN LISTS ffmpeg_libs) + qt_internal_add_target_include_dirs(FFmpegMediaPluginImplPrivate ${ffmpeg_lib}) +- target_include_directories(FFmpegMediaPluginImplPrivate PUBLIC ++ target_compile_definitions(FFmpegMediaPluginImplPrivate PUBLIC + "$") + endforeach() + endif() diff --git a/vcpkg/ports/qtmultimedia/fix_avfoundation_target.patch b/vcpkg/ports/qtmultimedia/fix_avfoundation_target.patch new file mode 100644 index 000000000..943bc4798 --- /dev/null +++ b/vcpkg/ports/qtmultimedia/fix_avfoundation_target.patch @@ -0,0 +1,12 @@ +diff --git a/src/plugins/multimedia/darwin/CMakeLists.txt b/src/plugins/multimedia/darwin/CMakeLists.txt +index a1a0cb1..242ceac 100644 +--- a/src/plugins/multimedia/darwin/CMakeLists.txt ++++ b/src/plugins/multimedia/darwin/CMakeLists.txt +@@ -34,6 +34,6 @@ qt_internal_add_plugin(QDarwinMediaPlugin + ${FWMetal} + ${FWQuartzCore} +- AVFoundation::AVFoundation ++ ${FWAVFoundation} + ) + + qt_internal_extend_target(QDarwinMediaPlugin CONDITION NOT TVOS diff --git a/vcpkg/ports/qtmultimedia/portfile.cmake b/vcpkg/ports/qtmultimedia/portfile.cmake new file mode 100644 index 000000000..d60178653 --- /dev/null +++ b/vcpkg/ports/qtmultimedia/portfile.cmake @@ -0,0 +1,74 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES + static_find_modules.patch + fix_avfoundation_target.patch + remove-static-ssl-stub.patch + private_libs.patch + ffmpeg-compile-def.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "qml" CMAKE_REQUIRE_FIND_PACKAGE_Qt6Quick + "widgets" CMAKE_REQUIRE_FIND_PACKAGE_Qt6Widgets +INVERTED_FEATURES + "qml" CMAKE_DISABLE_FIND_PACKAGE_Qt6Quick + "widgets" CMAKE_DISABLE_FIND_PACKAGE_Qt6Widgets + "gstreamer" CMAKE_DISABLE_FIND_PACKAGE_GStreamer + "ffmpeg" CMAKE_DISABLE_FIND_PACKAGE_FFmpeg + # Features not yet added in the manifest: + "vaapi" CMAKE_DISABLE_FIND_PACKAGE_VAAPI # not in vpckg +) + +set(unused "") +if("gstreamer" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer='yes'") +else() + list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer='no'") + list(APPEND unused INPUT_gstreamer_gl INPUT_gstreamer_photography) +endif() +list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer_gl='no'") +list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer_photography='no'") + +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND FEATURE_OPTIONS "-DFEATURE_wmf=ON") +else() + list(APPEND FEATURE_OPTIONS "-DFEATURE_wmf=OFF") +endif() + +if("ffmpeg" IN_LIST FEATURES) + # Note: Requires pulsadio on linux and wmfsdk on windows + list(APPEND FEATURE_OPTIONS "-DINPUT_ffmpeg='yes'") + if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_ANDROID) + list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='no'") + else() + list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='yes'") + endif() +else() + list(APPEND FEATURE_OPTIONS "-DINPUT_ffmpeg='no'") + list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='no'") +endif() + +# alsa is not ready +if(NOT "ffmpeg" IN_LIST FEATURES AND NOT "gstreamer" IN_LIST FEATURES AND VCPKG_TARGET_IS_LINUX) + #list(APPEND FEATURE_OPTIONS "-DFEATURE_alsa=ON") # alsa is experimental so don't activate it (also missing the dep on it.) + message(FATAL_ERROR "You need to activate at least one backend.") +else() + list(APPEND FEATURE_OPTIONS "-DFEATURE_alsa=OFF") +endif() + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + --trace-expand + ${FEATURE_OPTIONS} + -DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + CONFIGURE_OPTIONS_MAYBE_UNUSED ${unused} + ) + +if("gstreamer" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6Multimedia/Qt6QGstreamerMediaPluginDependencies.cmake" "GStreamer\;FALSE\;\;\;;GStreamer\;FALSE\;\;App\;;GStreamer\;FALSE\;\;\;Gl" "GStreamer\;FALSE\;\;\;;GStreamer\;FALSE\;\;App\;;GStreamer\;FALSE\;\;\;Gl;EGL\;FALSE\;\;\;" IGNORE_UNCHANGED) +endif() diff --git a/vcpkg/ports/qtmultimedia/private_libs.patch b/vcpkg/ports/qtmultimedia/private_libs.patch new file mode 100644 index 000000000..3ffc253f4 --- /dev/null +++ b/vcpkg/ports/qtmultimedia/private_libs.patch @@ -0,0 +1,19 @@ +diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake +index 6316dde..54f807b 100644 +--- a/cmake/FindFFmpeg.cmake ++++ b/cmake/FindFFmpeg.cmake +@@ -264,9 +264,11 @@ function(__ffmpeg_internal_set_dependencies _component) + string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_dependency ${out}) + string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_dependency_lib ${out}) + +- string(REGEX REPLACE ".*Libs.private:([^\n\r]+).*" "\\1" out "${pcfile}") +- string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_private_dependency ${out}) +- string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_private_dependency_lib ${out}) ++ if(out MATCHES "Libs.private:") ++ string(REGEX REPLACE ".*Libs.private:([^\n\r]+).*" "\\1" out "${pcfile}") ++ string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_private_dependency ${out}) ++ string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_private_dependency_lib ${out}) ++ endif() + + list(APPEND deps_no_suffix ${libs_dependency} ${libs_private_dependency}) + foreach(dependency ${deps_no_suffix}) diff --git a/vcpkg/ports/qtmultimedia/remove-static-ssl-stub.patch b/vcpkg/ports/qtmultimedia/remove-static-ssl-stub.patch new file mode 100644 index 000000000..b74b66c3d --- /dev/null +++ b/vcpkg/ports/qtmultimedia/remove-static-ssl-stub.patch @@ -0,0 +1,26 @@ +diff --git a/src/plugins/multimedia/ffmpeg/cmake/QtAddFFmpegStubs.cmake b/src/plugins/multimedia/ffmpeg/cmake/QtAddFFmpegStubs.cmake +index 5778ae4d23..8c0df4b44d 100644 +--- a/src/plugins/multimedia/ffmpeg/cmake/QtAddFFmpegStubs.cmake ++++ b/src/plugins/multimedia/ffmpeg/cmake/QtAddFFmpegStubs.cmake +@@ -70,7 +70,10 @@ macro(qt_internal_multimedia_find_openssl_soversion) + if (NOT OPENSSL_SSL_LIBRARY) + message(FATAL_ERROR "OPENSSL_SSL_LIBRARY is not found") + endif() +- ++ set(openssl_is_shared ON) ++ if(OPENSSL_SSL_LIBRARY MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$") ++ set(openssl_is_shared OFF) ++ endif() + get_filename_component(ssl_lib_realpath "${OPENSSL_SSL_LIBRARY}" REALPATH) + + string(REGEX MATCH "[0-9]+(\\.[0-9]+)*[a-z]?$" ssl_soversion "${ssl_lib_realpath}") +@@ -187,6 +190,9 @@ function(qt_internal_multimedia_add_ffmpeg_stubs) + + if (ffmpeg_has_openssl) + qt_internal_multimedia_find_openssl_soversion() ++ if(NOT openssl_is_shared) ++ list(REMOVE_ITEM FFMPEG_STUBS ssl crypto) ++ endif() + endif() + + foreach (stub ${FFMPEG_STUBS}) diff --git a/vcpkg/ports/qtmultimedia/static_find_modules.patch b/vcpkg/ports/qtmultimedia/static_find_modules.patch new file mode 100644 index 000000000..1fc348de6 --- /dev/null +++ b/vcpkg/ports/qtmultimedia/static_find_modules.patch @@ -0,0 +1,82 @@ +diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake +index 47d8769..46a5c9b 100644 +--- a/cmake/FindFFmpeg.cmake ++++ b/cmake/FindFFmpeg.cmake +@@ -215,7 +215,7 @@ foreach (_component ${FFmpeg_FIND_COMPONENTS}) + find_component(${_component} "lib${library}" ${library} "lib${library}/${library}.h") + + if (${_component}_FOUND) +- list(APPEND FFMPEG_LIBRARIES ${${_component}_LIBRARY_NAME}) ++ list(APPEND FFMPEG_LIBRARIES ${${_component}_LIBRARY}) + list(APPEND FFMPEG_DEFINITIONS ${${_component}_DEFINITIONS}) + list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIR}) + list(APPEND FFMPEG_LIBRARY_DIRS ${${_component}_LIBRARY_DIR}) +@@ -306,18 +306,19 @@ endfunction() + string(TOLOWER ${_component} _lowerComponent) + if (NOT TARGET FFmpeg::${_lowerComponent}) +- add_library(FFmpeg::${_lowerComponent} INTERFACE IMPORTED) ++ add_library(FFmpeg::${_lowerComponent} UNKNOWN IMPORTED) + set_target_properties(FFmpeg::${_lowerComponent} PROPERTIES + INTERFACE_COMPILE_OPTIONS "${${_component}_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES ${${_component}_INCLUDE_DIR} +- INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY_NAME}" +- INTERFACE_LINK_DIRECTORIES "${${_component}_LIBRARY_DIR}" ++ IMPORTED_LOCATION "${${_component}_LIBRARY}" + ) + + __ffmpeg_internal_set_dependencies(${_component}) +- target_link_libraries(FFmpeg::${_lowerComponent} INTERFACE "${${_component}_LIBRARY_NAME}") ++ if(WIN32 AND _lowerComponent STREQUAL "avutil") ++ target_link_libraries(FFmpeg::${_lowerComponent} INTERFACE "Bcrypt.lib") ++ endif() + if (UNIX AND NOT APPLE) + target_link_options(FFmpeg::${_lowerComponent} INTERFACE "-Wl,--exclude-libs=lib${_lowerComponent}") + endif () + endif() + endif() + endforeach () +@@ -361,14 +364,18 @@ if (shared_libs_desired AND NOT FFMPEG_SHARED_COMPONENTS) + endif() + + if (NOT TARGET FFmpeg::FFmpeg) +- add_library(FFmpeg INTERFACE) ++ add_library(FFmpeg INTERFACE IMPORTED) + set_target_properties(FFmpeg PROPERTIES + INTERFACE_COMPILE_OPTIONS "${FFMPEG_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIRS}" +- INTERFACE_LINK_LIBRARIES "${FFMPEG_LIBRARIES}" + INTERFACE_LINK_DIRECTORIES "${FFMPEG_LIBRARY_DIRS}" + ) ++ target_link_libraries(FFmpeg INTERFACE ${FFMPEG_LIBRARIES}) +- add_library(FFmpeg::FFmpeg ALIAS FFmpeg) ++ if(WIN32) ++ target_link_libraries(FFmpeg INTERFACE "Bcrypt.lib") ++ endif() ++ add_library(FFmpeg::FFmpeg INTERFACE IMPORTED) ++ target_link_libraries(FFmpeg::FFmpeg INTERFACE FFmpeg) + endif() + + # Compile the list of required vars +diff --git a/cmake/FindGObject.cmake b/cmake/FindGObject.cmake +index 19a8a67..09e95d1 100644 +--- a/cmake/FindGObject.cmake ++++ b/cmake/FindGObject.cmake +@@ -13,8 +13,8 @@ + # ``GObject::GObject`` + # The gobject-2.0 library + +-include(CMakeFindDependencyMacro) +-find_dependency(GLIB2) ++find_package(GLIB2) ++find_package(libffi) + qt_internal_disable_find_package_global_promotion(GLIB2::GLIB2) + + if(NOT TARGET GObject::GObject) +@@ -40,6 +40,7 @@ if(NOT TARGET GObject::GObject) + target_link_libraries(GObject::GObject INTERFACE + ${GObject_LIBRARY} + GLIB2::GLIB2 ++ libffi + ) + endif() + include(FindPackageHandleStandardArgs) diff --git a/vcpkg/ports/qtmultimedia/vcpkg.json b/vcpkg/ports/qtmultimedia/vcpkg.json new file mode 100644 index 000000000..63349c87a --- /dev/null +++ b/vcpkg/ports/qtmultimedia/vcpkg.json @@ -0,0 +1,86 @@ +{ + "name": "qtmultimedia", + "version": "6.8.3", + "description": "Qt Multimedia is an add-on module that provides a rich set of QML types and C++ classes to handle multimedia content.", + "homepage": "https://www.qt.io/", + "license": null, + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "concurrent", + "gui", + "network" + ] + }, + { + "name": "qtshadertools", + "default-features": false + } + ], + "default-features": [ + "widgets" + ], + "features": { + "ffmpeg": { + "description": "Build with ffmpeg", + "dependencies": [ + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avdevice", + "avformat", + "swresample", + "swscale" + ] + }, + { + "name": "pulseaudio", + "platform": "linux" + }, + { + "name": "qtdeclarative", + "default-features": false + } + ] + }, + "gstreamer": { + "description": "Build with gstreamer", + "supports": "linux", + "dependencies": [ + "egl", + { + "name": "gstreamer", + "default-features": false, + "features": [ + "plugins-base" + ] + } + ] + }, + "qml": { + "description": "Build QML imports", + "dependencies": [ + { + "name": "qtdeclarative", + "default-features": false + } + ] + }, + "widgets": { + "description": "Build Multimedia Widgets", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "widgets" + ] + } + ] + } + } +} diff --git a/vcpkg/ports/qtpositioning/devendor-poly2tri.patch b/vcpkg/ports/qtpositioning/devendor-poly2tri.patch new file mode 100644 index 000000000..85e18ca98 --- /dev/null +++ b/vcpkg/ports/qtpositioning/devendor-poly2tri.patch @@ -0,0 +1,37 @@ +diff --color -Naur a/src/3rdparty/clip2tri/CMakeLists.txt b/src/3rdparty/clip2tri/CMakeLists.txt +--- a/src/3rdparty/clip2tri/CMakeLists.txt 2023-05-13 16:59:42.377052155 +0200 ++++ b/src/3rdparty/clip2tri/CMakeLists.txt 2023-05-13 23:05:44.950379088 +0200 +@@ -4,6 +4,7 @@ + ## Bundled_Clip2Tri Generic Library: + ##################################################################### + ++find_package(poly2tri) + qt_internal_add_3rdparty_library(Bundled_Clip2Tri + QMAKE_LIB_NAME _clip2tri + STATIC +@@ -13,11 +14,12 @@ + clip2tri.cpp clip2tri.h + INCLUDE_DIRECTORIES + ../clipper +- ../poly2tri + LIBRARIES + Qt::Bundled_Clipper # special case +- Qt::Bundled_Poly2Tri # special case ++ poly2tri::poly2tri + ) ++target_link_libraries(Bundled_Clip2Tri PRIVATE poly2tri::poly2tri) ++set_target_properties(poly2tri::poly2tri PROPERTIES INTERFACE_QT_PACKAGE_NAME poly2tri) + qt_disable_warnings(Bundled_Clip2Tri) + qt_set_symbol_visibility_hidden(Bundled_Clip2Tri) + +diff --color -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt +--- a/src/CMakeLists.txt 2023-05-13 16:59:42.379052157 +0200 ++++ b/src/CMakeLists.txt 2023-05-13 17:00:19.256085781 +0200 +@@ -2,7 +2,6 @@ + # SPDX-License-Identifier: BSD-3-Clause + + # special case begin +-add_subdirectory(3rdparty/poly2tri) + add_subdirectory(3rdparty/clipper) + add_subdirectory(3rdparty/clip2tri) + add_subdirectory(positioning) diff --git a/vcpkg/ports/qtpositioning/foregroundservice.patch b/vcpkg/ports/qtpositioning/foregroundservice.patch new file mode 100644 index 000000000..640f85297 --- /dev/null +++ b/vcpkg/ports/qtpositioning/foregroundservice.patch @@ -0,0 +1,15 @@ +diff --git a/src/plugins/position/android/src/jnipositioning.cpp b/src/plugins/position/android/src/jnipositioning.cpp +index 2b2919f..bc42c2e 100644 +--- a/src/plugins/position/android/src/jnipositioning.cpp ++++ b/src/plugins/position/android/src/jnipositioning.cpp +@@ -589,10 +589,6 @@ namespace AndroidPositioning { + { + QLocationPermission permission; + +- // The needed permission depends on whether we run as a service or as an activity +- if (!QNativeInterface::QAndroidApplication::isActivityContext()) +- permission.setAvailability(QLocationPermission::Always); // background location +- + bool permitted = false; + if (accuracy & AccuracyType::Precise) { + permission.setAccuracy(QLocationPermission::Precise); diff --git a/vcpkg/ports/qtpositioning/portfile.cmake b/vcpkg/ports/qtpositioning/portfile.cmake new file mode 100644 index 000000000..a5b211b1f --- /dev/null +++ b/vcpkg/ports/qtpositioning/portfile.cmake @@ -0,0 +1,25 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES + devendor-poly2tri.patch + foregroundservice.patch) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "qml" CMAKE_REQUIRE_FIND_PACKAGE_Qt6Quick +INVERTED_FEATURES + "qml" CMAKE_DISABLE_FIND_PACKAGE_Qt6Quick +) + +list(APPEND FEATURE_OPTIONS "-DCMAKE_DISABLE_FIND_PACKAGE_Gypsy=ON" + "-DCMAKE_DISABLE_FIND_PACKAGE_Gconf=ON" +) + + + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS ${FEATURE_OPTIONS} + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/vcpkg/ports/qtpositioning/vcpkg.json b/vcpkg/ports/qtpositioning/vcpkg.json new file mode 100644 index 000000000..6634396a5 --- /dev/null +++ b/vcpkg/ports/qtpositioning/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "qtpositioning", + "version": "6.8.3", + "description": "The Qt Positioning API provides positioning information via QML and C++ interfaces.", + "homepage": "https://www.qt.io/", + "license": null, + "dependencies": [ + "jhasse-poly2tri", + { + "name": "qtbase", + "default-features": false + }, + { + "name": "qtserialport", + "default-features": false, + "platform": "!ios" + } + ], + "features": { + "qml": { + "description": "Build QML imports", + "dependencies": [ + { + "name": "qtdeclarative", + "default-features": false + } + ] + } + } +} diff --git a/vcpkg/triplets/arm-android.cmake b/vcpkg/triplets/arm-android.cmake new file mode 100644 index 000000000..2c2b7085f --- /dev/null +++ b/vcpkg/triplets/arm-android.cmake @@ -0,0 +1,31 @@ +set(VCPKG_TARGET_ARCHITECTURE arm) +set(VCPKG_CRT_LINKAGE dynamic) + +include("${CMAKE_CURRENT_LIST_DIR}/static-ports.cmake") +if (PORT IN_LIST STATIC_PORTS) + set(VCPKG_LIBRARY_LINKAGE static) +else() + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +set(VCPKG_CMAKE_SYSTEM_NAME Android) +set(VCPKG_BUILD_TYPE release) + +# Note to myself and others: this is correct even on macOS host +set(VCPKG_MAKE_BUILD_TRIPLET "--host=armv7a-linux-androideabi") + +set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DANDROID_ABI=armeabi-v7a -DANDROID_ARM_NEON=ON) + +set(ANDROIDAPI "28") # when changed change CMakeLists.txt +set(ANDROID_PLATFORM "android-${ANDROIDAPI}") +set(ANDROID_NDK_PLATFORM "android-${ANDROIDAPI}") +set(ANDROID_STL "c++_shared") + +if (NOT DEFINED ENV{ANDROID_SDK_ROOT}) + message(FATAL_ERROR "Set required environment variable ANDROID_SDK_ROOT.") +endif () +set(ANDROID_SDK_ROOT $ENV{ANDROID_SDK_ROOT}) + +set(VCPKG_CXX_FLAGS "-fstack-protector-strong") +set(VCPKG_C_FLAGS "-fstack-protector-strong") +set(VCPKG_LINKER_FLAGS "-lunwind -Wl,--exclude-libs=libunwind.a") diff --git a/vcpkg/triplets/arm64-android.cmake b/vcpkg/triplets/arm64-android.cmake new file mode 100644 index 000000000..a0123c870 --- /dev/null +++ b/vcpkg/triplets/arm64-android.cmake @@ -0,0 +1,29 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +include("${CMAKE_CURRENT_LIST_DIR}/static-ports.cmake") +if (PORT IN_LIST STATIC_PORTS) + set(VCPKG_LIBRARY_LINKAGE static) +else() + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() +set(VCPKG_CMAKE_SYSTEM_NAME Android) +set(VCPKG_BUILD_TYPE release) + +# Note to myself and others: this is correct even on macOS host +set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-linux-android") + +set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DANDROID_ABI=arm64-v8a) + +set(ANDROIDAPI "28") # when changed change CMakeLists.txt +set(ANDROID_PLATFORM "android-${ANDROIDAPI}") +set(ANDROID_NDK_PLATFORM "android-${ANDROIDAPI}") +set(VCPKG_CMAKE_SYSTEM_VERSION "${ANDROIDAPI}") +set(ANDROID_STL "c++_shared") + +if (NOT DEFINED ENV{ANDROID_SDK_ROOT}) + message(FATAL_ERROR "Set required environment variable ANDROID_SDK_ROOT.") +endif () +set(ANDROID_SDK_ROOT $ENV{ANDROID_SDK_ROOT}) + +set(VCPKG_CXX_FLAGS "-fstack-protector-strong") +set(VCPKG_C_FLAGS "-fstack-protector-strong") \ No newline at end of file diff --git a/vcpkg/triplets/arm64-ios.cmake b/vcpkg/triplets/arm64-ios.cmake new file mode 100644 index 000000000..8469a37c2 --- /dev/null +++ b/vcpkg/triplets/arm64-ios.cmake @@ -0,0 +1,11 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CMAKE_SYSTEM_NAME iOS) +set(VCPKG_OSX_ARCHITECTURES arm64) + +set(VCPKG_OSX_DEPLOYMENT_TARGET 16.0) + +set(VCPKG_BUILD_TYPE release) +set(VCPKG_CXX_FLAGS "-fvisibility=hidden") +set(VCPKG_C_FLAGS "-fvisibility=hidden") diff --git a/vcpkg/triplets/arm64-osx.cmake b/vcpkg/triplets/arm64-osx.cmake new file mode 100644 index 000000000..058bcc539 --- /dev/null +++ b/vcpkg/triplets/arm64-osx.cmake @@ -0,0 +1,14 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_OSX_ARCHITECTURES arm64) +set(VCPKG_BUILD_TYPE release) + +set(VCPKG_OSX_DEPLOYMENT_TARGET 11.0) + +# See https://github.com/microsoft/vcpkg/issues/10038 +set(VCPKG_C_FLAGS -mmacosx-version-min=${VCPKG_OSX_DEPLOYMENT_TARGET}) +set(VCPKG_CXX_FLAGS -mmacosx-version-min=${VCPKG_OSX_DEPLOYMENT_TARGET}) + diff --git a/vcpkg/triplets/static-ports.cmake b/vcpkg/triplets/static-ports.cmake new file mode 100644 index 000000000..4ab6e6a7f --- /dev/null +++ b/vcpkg/triplets/static-ports.cmake @@ -0,0 +1,13 @@ +set(STATIC_PORTS + gdal + catch2 + libiconv + freexl + libspatialite + qhull + harfbuzz + libb2 + freeglut + qca # OSSL plugin not discovered unless static + qgis +) diff --git a/vcpkg/triplets/x64-linux.cmake b/vcpkg/triplets/x64-linux.cmake new file mode 100644 index 000000000..ef7c6c546 --- /dev/null +++ b/vcpkg/triplets/x64-linux.cmake @@ -0,0 +1,14 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) + +include("${CMAKE_CURRENT_LIST_DIR}/static-ports.cmake") +if (PORT IN_LIST STATIC_PORTS) + set(VCPKG_LIBRARY_LINKAGE static) +else() + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_BUILD_TYPE release) + +set(VCPKG_FIXUP_ELF_RPATH ON) diff --git a/vcpkg/triplets/x64-osx.cmake b/vcpkg/triplets/x64-osx.cmake new file mode 100644 index 000000000..bfd3bb43f --- /dev/null +++ b/vcpkg/triplets/x64-osx.cmake @@ -0,0 +1,14 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_OSX_ARCHITECTURES x86_64) +set(VCPKG_BUILD_TYPE release) + +set(VCPKG_OSX_DEPLOYMENT_TARGET 11.0) + +# See https://github.com/microsoft/vcpkg/issues/10038 +set(VCPKG_C_FLAGS -mmacosx-version-min=${VCPKG_OSX_DEPLOYMENT_TARGET}) +set(VCPKG_CXX_FLAGS -mmacosx-version-min=${VCPKG_OSX_DEPLOYMENT_TARGET}) + diff --git a/vcpkg/triplets/x64-windows.cmake b/vcpkg/triplets/x64-windows.cmake new file mode 100644 index 000000000..f6c40253a --- /dev/null +++ b/vcpkg/triplets/x64-windows.cmake @@ -0,0 +1,4 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_BUILD_TYPE release)