diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01fb5071..e96b8166 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,4 @@ name: release -#on: pull_request on: push: tags: @@ -16,7 +15,7 @@ env: ENABLE_BITCODE: OFF ENABLE_ARC: OFF ENABLE_VISIBILITY: OFF - EMSCRIPTEN_VERSION: 3.1.28 + EMSCRIPTEN_VERSION: 6.0.12 permissions: contents: read @@ -1623,6 +1622,7 @@ jobs: - { msvc-version: vs2017, windows-version: 2022, toolset-version: v141, windows-sdk-version: 22621 } - { msvc-version: vs2019, windows-version: 2022, toolset-version: v142, windows-sdk-version: 22621 } - { msvc-version: vs2022, windows-version: 2022, toolset-version: v143, windows-sdk-version: 26100 } + - { msvc-version: vs2026, windows-version: 2025-vs2026, toolset-version: v145, windows-sdk-version: 26100 } include: - opencv-version: 5.0.0 os-compiler: @@ -1636,10 +1636,16 @@ jobs: windows-version: 2022 toolset-version: v143 windows-sdk-version: 26100 + - opencv-version: 5.0.0 + os-compiler: + msvc-version: vs2026 + windows-version: 2025-vs2026 + toolset-version: v145 + windows-sdk-version: 26100 runs-on: windows-${{ matrix.os-compiler.windows-version }} env: UseMultiToolTask: true - COMMON_CMAKE_OPTIONS: -T ${{ matrix.os-compiler.toolset-version }},host=x64 -DCMAKE_INSTALL_PREFIX=install + COMMON_CMAKE_OPTIONS: -G "${{ matrix.os-compiler.msvc-version == 'vs2026' && 'Visual Studio 18 2026' || 'Visual Studio 17 2022' }}" -T ${{ matrix.os-compiler.toolset-version }},host=x64 "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" -DCMAKE_INSTALL_PREFIX=install steps: - uses: actions/checkout@v7 - uses: actions/download-artifact@v8 @@ -1690,7 +1696,7 @@ jobs: cmake --build . --config Release -j 4 cmake --build . --config Release --target install - name: build-arm64 - if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' + if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' || matrix.os-compiler.msvc-version == 'vs2026' run: | cd ${{ env.SOURCE_DIR }} mkdir build-arm64; cd build-arm64 @@ -1707,7 +1713,7 @@ jobs: Copy-Item -Verbose -Recurse -Path "${{ env.SOURCE_DIR }}\build-x64\install\*" -Destination "${{ env.PACKAGE_NAME }}\x64" 7z a -r ${{ env.PACKAGE_NAME }}.zip ${{ env.PACKAGE_NAME }} - name: package - if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' + if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' || matrix.os-compiler.msvc-version == 'vs2026' run: | mkdir ${{ env.PACKAGE_NAME }} mkdir ${{ env.PACKAGE_NAME }}/x86 @@ -1730,7 +1736,7 @@ jobs: cmake ${{ env.COMMON_CMAKE_OPTIONS }} -A x64,version=10.0.${{ matrix.os-compiler.windows-sdk-version }}.0 -DOpenCV_DIR="$env:GITHUB_WORKSPACE\${{ env.PACKAGE_NAME }}\x64" -DOpenCV_STATIC=ON .. cmake --build . --config Release -j 4 - name: test-arm64 - if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' + if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' || matrix.os-compiler.msvc-version == 'vs2026' run: | cd test mkdir build-arm64; cd build-arm64 @@ -1752,9 +1758,10 @@ jobs: os-ubuntu: - { ubuntu-id: 2204, ubuntu-version: 22.04 } - { ubuntu-id: 2404, ubuntu-version: 24.04 } + - { ubuntu-id: 2604, ubuntu-version: 26.04 } runs-on: ubuntu-${{ matrix.os-ubuntu.ubuntu-version }} env: - COMMON_CMAKE_OPTIONS: -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release + COMMON_CMAKE_OPTIONS: -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release steps: - uses: actions/checkout@v7 - uses: actions/download-artifact@v8 @@ -1802,14 +1809,20 @@ jobs: webassembly: needs: [setup] + name: "${{ matrix.arch.name }} (${{ matrix.opencv-version }})" runs-on: ubuntu-latest strategy: fail-fast: false matrix: opencv-version: [2.4.13.7, 3.4.20, 4.14.0, 5.0.0] + arch: + - { name: webassembly, flags: "" } + - { name: webassembly64, flags: "-m64" } env: COMMON_CMAKE_OPTIONS: | - -DCMAKE_TOOLCHAIN_FILE=../emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ + -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.arch.flags }}" \ -DCMAKE_INSTALL_PREFIX=install \ -DCMAKE_BUILD_TYPE=Release \ steps: @@ -1827,7 +1840,7 @@ jobs: run: | unzip -q opencv-mobile-${{ matrix.opencv-version }}.zip echo "SOURCE_DIR=opencv-mobile-${{ matrix.opencv-version }}" >> $GITHUB_ENV - echo "PACKAGE_NAME=opencv-mobile-${{ matrix.opencv-version }}-webassembly" >> $GITHUB_ENV + echo "PACKAGE_NAME=opencv-mobile-${{ matrix.opencv-version }}-${{ matrix.arch.name }}" >> $GITHUB_ENV - name: build run: | source emsdk/emsdk_env.sh @@ -1835,10 +1848,10 @@ jobs: patch -p1 -i ../patches/opencv-${{ matrix.opencv-version }}-unsafe-xadd.patch mkdir build && cd build cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCPU_BASELINE="" -DCPU_DISPATCH="" -DWITH_PTHREADS_PF=OFF -DCV_ENABLE_INTRINSICS=OFF -DBUILD_WASM_INTRIN_TESTS=OFF \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0" \ - `cat ../options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. + -DCPU_BASELINE="" -DCPU_DISPATCH="" -DCV_ENABLE_INTRINSICS=OFF -DBUILD_WASM_INTRIN_TESTS=OFF \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions" \ + `cat ../options.txt` -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=OFF -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. cmake --build . -j $(nproc) cmake --build . --target install - name: build-simd @@ -1847,10 +1860,10 @@ jobs: cd ${{ env.SOURCE_DIR }} mkdir build-simd && cd build-simd cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCPU_BASELINE="" -DCPU_DISPATCH="" -DWITH_PTHREADS_PF=OFF -DCV_ENABLE_INTRINSICS=ON -DBUILD_WASM_INTRIN_TESTS=OFF \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0 -msimd128" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0 -msimd128" \ - `cat ../options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. + -DCPU_BASELINE="" -DCPU_DISPATCH="" -DCV_ENABLE_INTRINSICS=ON -DBUILD_WASM_INTRIN_TESTS=OFF \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -msimd128" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -msimd128" \ + `cat ../options.txt` -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=OFF -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. cmake --build . -j $(nproc) cmake --build . --target install - name: build-threads @@ -1860,10 +1873,10 @@ jobs: patch -p1 -R -i ../patches/opencv-${{ matrix.opencv-version }}-unsafe-xadd.patch mkdir build-threads && cd build-threads cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCPU_BASELINE="" -DCPU_DISPATCH="" -DWITH_PTHREADS_PF=ON -DCV_ENABLE_INTRINSICS=OFF -DBUILD_WASM_INTRIN_TESTS=OFF \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4" \ - `cat ../options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. + -DCPU_BASELINE="" -DCPU_DISPATCH="" -DCV_ENABLE_INTRINSICS=OFF -DBUILD_WASM_INTRIN_TESTS=OFF \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4" \ + `cat ../options.txt` -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=ON -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. cmake --build . -j $(nproc) cmake --build . --target install - name: build-simd-threads @@ -1872,10 +1885,10 @@ jobs: cd ${{ env.SOURCE_DIR }} mkdir build-simd-threads && cd build-simd-threads cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCPU_BASELINE="" -DCPU_DISPATCH="" -DWITH_PTHREADS_PF=ON -DCV_ENABLE_INTRINSICS=ON -DBUILD_WASM_INTRIN_TESTS=OFF \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -msimd128" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -msimd128" \ - `cat ../options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. + -DCPU_BASELINE="" -DCPU_DISPATCH="" -DCV_ENABLE_INTRINSICS=ON -DBUILD_WASM_INTRIN_TESTS=OFF \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4 -msimd128" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4 -msimd128" \ + `cat ../options.txt` -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=ON -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. cmake --build . -j $(nproc) cmake --build . --target install - name: package @@ -1899,38 +1912,42 @@ jobs: run: echo "OPENCV_SUBDIR=lib/cmake/opencv5" >> $GITHUB_ENV - name: test run: | + source emsdk/emsdk_env.sh cd test mkdir build && cd build cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0" \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions" \ -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/basic/${{ env.OPENCV_SUBDIR }} .. cmake --build . -j $(nproc) - name: test-simd run: | + source emsdk/emsdk_env.sh cd test mkdir build-simd && cd build-simd cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0 -msimd128" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0 -msimd128" \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -msimd128" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -msimd128" \ -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/simd/${{ env.OPENCV_SUBDIR }} .. cmake --build . -j $(nproc) - name: test-threads run: | + source emsdk/emsdk_env.sh cd test mkdir build-threads && cd build-threads cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4" \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4" \ -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/threads/${{ env.OPENCV_SUBDIR }} .. cmake --build . -j $(nproc) - name: test-simd-threads run: | + source emsdk/emsdk_env.sh cd test mkdir build-simd-threads && cd build-simd-threads cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -msimd128" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -msimd128" \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4 -msimd128" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4 -msimd128" \ -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/simd-threads/${{ env.OPENCV_SUBDIR }} .. cmake --build . -j $(nproc) - name: upload diff --git a/README.md b/README.md index 25687bcd..76104baf 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ https://github.com/nihui/opencv-mobile/releases/latest -OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 packages are provided for VS2019 and VS2022 only. +OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 packages are provided for VS2019, VS2022 and VS2026 only. @@ -229,7 +229,7 @@ OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 - @@ -251,11 +251,22 @@ OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.14.0-ubuntu-2404.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-5.0.0-ubuntu-2404.zip) + + + + + - @@ -299,12 +310,23 @@ OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 - + + + + + - + + + + + @@ -335,7 +368,9 @@ OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 * [KleidiCV](https://gitlab.arm.com/kleidi/kleidicv) HAL enabled for Android arm64-v8a, all Apple arm64/arm64e platforms and Linux aarch64 targets * iOS / MacOS / Mac-Catalyst / watchOS / tvOS / visionOS package build with Xcode 15.2 * ARM Linux package build with cross-compiler on Ubuntu-24.04 -* WebAssembly package build with Emscripten 3.1.28 +* Ubuntu packages build on Ubuntu-22.04, Ubuntu-24.04 and Ubuntu-26.04 respectively +* VS2026 package includes x86, x64 and arm64 builds +* WebAssembly (32-bit) and WebAssembly64 packages build with Emscripten 6.0.12; both include basic, simd, threads and simd-threads variants ### opencv-mobile package for development boards @@ -533,6 +568,8 @@ find_package(OpenCV REQUIRED) target_link_libraries(your_target ${OpenCV_LIBS}) ``` +For WebAssembly64, pass ```-m64``` when compiling and linking your application, and use a memory64-capable runtime. The existing WebAssembly package remains 32-bit. + # How-to-build your custom package We reduce the binary size of opencv-mobile in 3 ways diff --git a/patches/opencv-2.4.13.7-newer-msvc.patch b/patches/opencv-2.4.13.7-newer-msvc.patch index cbdffc7e..0b84918e 100644 --- a/patches/opencv-2.4.13.7-newer-msvc.patch +++ b/patches/opencv-2.4.13.7-newer-msvc.patch @@ -1,7 +1,7 @@ diff -Nuarp opencv-2.4.13.7.orig/cmake/OpenCVConfig.cmake opencv-2.4.13.7/cmake/OpenCVConfig.cmake --- opencv-2.4.13.7.orig/cmake/OpenCVConfig.cmake 2018-07-02 20:41:56.000000000 +0800 +++ opencv-2.4.13.7/cmake/OpenCVConfig.cmake 2023-08-13 22:11:10.193931771 +0800 -@@ -85,6 +85,10 @@ elseif(MSVC) +@@ -85,6 +85,12 @@ elseif(MSVC) set(OpenCV_RUNTIME vc14) elseif(MSVC_VERSION MATCHES "^191[0-9]$") set(OpenCV_RUNTIME vc15) @@ -9,13 +9,15 @@ diff -Nuarp opencv-2.4.13.7.orig/cmake/OpenCVConfig.cmake opencv-2.4.13.7/cmake/ + set(OpenCV_RUNTIME vc16) + elseif(MSVC_VERSION MATCHES "^19[34][0-9]$") + set(OpenCV_RUNTIME vc17) ++ elseif(MSVC_VERSION MATCHES "^195[0-9]$") ++ set(OpenCV_RUNTIME vc18) endif() elseif(MINGW) set(OpenCV_RUNTIME mingw) diff -Nuarp opencv-2.4.13.7.orig/cmake/OpenCVDetectCXXCompiler.cmake opencv-2.4.13.7/cmake/OpenCVDetectCXXCompiler.cmake --- opencv-2.4.13.7.orig/cmake/OpenCVDetectCXXCompiler.cmake 2018-07-02 20:41:56.000000000 +0800 +++ opencv-2.4.13.7/cmake/OpenCVDetectCXXCompiler.cmake 2023-08-13 22:11:03.358965110 +0800 -@@ -104,6 +104,10 @@ elseif(MSVC) +@@ -104,6 +104,12 @@ elseif(MSVC) set(OpenCV_RUNTIME vc14) elseif(MSVC_VERSION MATCHES "^191[0-9]$") set(OpenCV_RUNTIME vc15) @@ -23,6 +25,8 @@ diff -Nuarp opencv-2.4.13.7.orig/cmake/OpenCVDetectCXXCompiler.cmake opencv-2.4. + set(OpenCV_RUNTIME vc16) + elseif(MSVC_VERSION MATCHES "^19[34][0-9]$") + set(OpenCV_RUNTIME vc17) ++ elseif(MSVC_VERSION MATCHES "^195[0-9]$") ++ set(OpenCV_RUNTIME vc18) endif() elseif(MINGW) set(OpenCV_RUNTIME mingw) diff --git a/patches/opencv-3.4.20-newer-msvc.patch b/patches/opencv-3.4.20-newer-msvc.patch index 53212e9e..313c22ab 100644 --- a/patches/opencv-3.4.20-newer-msvc.patch +++ b/patches/opencv-3.4.20-newer-msvc.patch @@ -1,15 +1,18 @@ diff -Nuarp opencv-3.4.20.orig/cmake/OpenCVDetectCXXCompiler.cmake opencv-3.4.20/cmake/OpenCVDetectCXXCompiler.cmake --- opencv-3.4.20.orig/cmake/OpenCVDetectCXXCompiler.cmake 2023-06-27 19:29:13.000000000 +0800 +++ opencv-3.4.20/cmake/OpenCVDetectCXXCompiler.cmake 2024-06-10 14:47:05.286016469 +0800 -@@ -169,7 +169,7 @@ elseif(MSVC) +@@ -169,8 +169,10 @@ elseif(MSVC) set(OpenCV_RUNTIME vc15) elseif(MSVC_VERSION MATCHES "^192[0-9]$") set(OpenCV_RUNTIME vc16) - elseif(MSVC_VERSION MATCHES "^193[0-9]$") + elseif(MSVC_VERSION MATCHES "^19[34][0-9]$") set(OpenCV_RUNTIME vc17) ++ elseif(MSVC_VERSION MATCHES "^195[0-9]$") ++ set(OpenCV_RUNTIME vc18) else() message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME") + endif() diff -Nuarp opencv-3.4.20.orig/cmake/templates/OpenCVConfig.root-WIN32.cmake.in opencv-3.4.20/cmake/templates/OpenCVConfig.root-WIN32.cmake.in --- opencv-3.4.20.orig/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 2023-06-27 19:29:13.000000000 +0800 +++ opencv-3.4.20/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 2024-06-10 14:46:17.345712729 +0800 @@ -22,3 +25,28 @@ diff -Nuarp opencv-3.4.20.orig/cmake/templates/OpenCVConfig.root-WIN32.cmake.in set(OpenCV_RUNTIME vc17) check_one_config(has_VS2022) if(NOT has_VS2022) +@@ -151,6 +151,24 @@ elseif(MSVC) + endif() + endif() + endif() ++ elseif(MSVC_VERSION MATCHES "^195[0-9]$") ++ set(OpenCV_RUNTIME vc18) ++ check_one_config(has_VS2026) ++ if(NOT has_VS2026) ++ set(OpenCV_RUNTIME vc17) # selecting previous compatible runtime version ++ check_one_config(has_VS2022) ++ if(NOT has_VS2022) ++ set(OpenCV_RUNTIME vc16) # selecting previous compatible runtime version ++ check_one_config(has_VS2019) ++ if(NOT has_VS2019) ++ set(OpenCV_RUNTIME vc15) # selecting previous compatible runtime version ++ check_one_config(has_VS2017) ++ if(NOT has_VS2017) ++ set(OpenCV_RUNTIME vc14) # selecting previous compatible runtime version ++ endif() ++ endif() ++ endif() ++ endif() + endif() + elseif(MINGW) + set(OpenCV_RUNTIME mingw)
+ Ubuntu-22.04
Ubuntu-26.04 + + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-ubuntu-2604.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-ubuntu-2604.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.14.0-ubuntu-2604.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-5.0.0-ubuntu-2604.zip) +
+ VS2015
VS2026 + + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-windows-vs2026.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-windows-vs2026.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.14.0-windows-vs2026.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-5.0.0-windows-vs2026.zip) + +
WebAssemblyWebAssembly (32-bit) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-webassembly.zip) @@ -312,6 +334,17 @@ OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.14.0-webassembly.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-5.0.0-webassembly.zip) +
WebAssembly64 + + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-webassembly64.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-webassembly64.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.14.0-webassembly64.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-5.0.0-webassembly64.zip) +