File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 run : |
2121 cd ..
2222 ls
23- docker run -dit --name emscripten-webarkit-testing -v $(pwd):/src emscripten/emsdk:3.1.38 bash
23+ docker run -dit --name emscripten-webarkit-testing -v $(pwd):/src emscripten/emsdk:3.1.69 bash
2424 docker exec emscripten-webarkit-testing emcmake cmake -B WebARKitLib/WebARKit/build -S WebARKitLib/WebARKit -DEMSCRIPTEN_COMP=1 ..
2525 docker exec emscripten-webarkit-testing emmake make -C WebARKitLib/WebARKit/build
2626
Original file line number Diff line number Diff line change @@ -9,21 +9,33 @@ if(VERSION GREATER 3.24)
99endif ()
1010
1111include (FetchContent )
12+ include (${CMAKE_CURRENT_SOURCE_DIR } /../cmake/OpenCVEm.cmake )
13+
14+ option (WEBARKIT_SIMD "Use the SIMD-enabled emscripten OpenCV build" OFF )
1215
1316if (${EMSCRIPTEN_COMP} EQUAL 1)
14- message ("Fetching opencv for emscripten compilation from webarkit/opencv-em ..." )
15- FetchContent_Declare (
16- build_opencv
17- URL https://github.com/webarkit/opencv-em/releases/download/0.1.6/opencv-js-4.10.0-emcc-3.1.38.zip
18- )
17+ if (WEBARKIT_SIMD)
18+ set (OPENCV_FETCH_DESC "SIMD emscripten" )
19+ set (OPENCV_FETCH_URL ${OPENCV_EMSCRIPTEN_SIMD_URL} )
20+ set (OPENCV_FETCH_HASH ${OPENCV_EMSCRIPTEN_SIMD_HASH} )
21+ else ()
22+ set (OPENCV_FETCH_DESC "emscripten" )
23+ set (OPENCV_FETCH_URL ${OPENCV_EMSCRIPTEN_URL} )
24+ set (OPENCV_FETCH_HASH ${OPENCV_EMSCRIPTEN_HASH} )
25+ endif ()
1926else ()
20- message ("Fetching opencv from webarkit/opencv-em ..." )
21- FetchContent_Declare (
22- build_opencv
23- URL https://github.com/webarkit/opencv-em/releases/download/0.1.6/opencv-4.10.0.zip
24- )
27+ set (OPENCV_FETCH_DESC "native" )
28+ set (OPENCV_FETCH_URL ${OPENCV_NATIVE_URL} )
29+ set (OPENCV_FETCH_HASH ${OPENCV_NATIVE_HASH} )
2530endif ()
2631
32+ message ("Fetching ${OPENCV_FETCH_DESC} opencv from webarkit/opencv-em ${OPENCV_EM_RELEASE} ..." )
33+ FetchContent_Declare (
34+ build_opencv
35+ URL ${OPENCV_FETCH_URL}
36+ URL_HASH ${OPENCV_FETCH_HASH}
37+ )
38+
2739FetchContent_MakeAvailable (build_opencv)
2840
2941get_filename_component (PARENT_DIR ./ ABSOLUTE )
Original file line number Diff line number Diff line change 1+ # Shared webarkit/opencv-em release coordinates.
2+ # Bump OPENCV_EM_RELEASE (and the three hashes below) to upgrade opencv-em.
3+ set (OPENCV_EM_RELEASE "0.2.0" )
4+ set (OPENCV_EM_BASE_URL "https://github.com/webarkit/opencv-em/releases/download/${OPENCV_EM_RELEASE} " )
5+
6+ set (OPENCV_NATIVE_URL "${OPENCV_EM_BASE_URL} /opencv-4.12.0.zip" )
7+ set (OPENCV_NATIVE_HASH "SHA256=eb68b3c6cac2781f6bbbe747d9ac8f27c5d716471da82d6c4fd79f26a18263b4" )
8+
9+ set (OPENCV_EMSCRIPTEN_URL "${OPENCV_EM_BASE_URL} /opencv-js-4.12.0-emcc-3.1.69.zip" )
10+ set (OPENCV_EMSCRIPTEN_HASH "SHA256=3a9509615bed922b058e3201007c8b9b29c1e5aa3dd0750676b7d847738ce2c7" )
11+
12+ set (OPENCV_EMSCRIPTEN_SIMD_URL "${OPENCV_EM_BASE_URL} /opencv-js-4.12.0-emcc-3.1.69-simd.zip" )
13+ set (OPENCV_EMSCRIPTEN_SIMD_HASH "SHA256=3600fd9d0422cb1fc19306bb1f876a578dff970f207947b346180993dfa27026" )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ endif()
1010
1111# Fetch googletest v1.13.0 commit b796f7d44681514f58a683a3a71ff17c94edb0c1
1212include (FetchContent )
13+ include (${CMAKE_CURRENT_SOURCE_DIR } /../cmake/OpenCVEm.cmake )
1314FetchContent_Declare (
1415 googletest
1516 URL https://github.com/google/googletest/archive/b796f7d44681514f58a683a3a71ff17c94edb0c1.zip
@@ -19,7 +20,8 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
1920
2021FetchContent_Declare (
2122 build_opencv
22- URL https://github.com/webarkit/opencv-em/releases/download/0.1.6/opencv-4.10.0.zip
23+ URL ${OPENCV_NATIVE_URL}
24+ URL_HASH ${OPENCV_NATIVE_HASH}
2325)
2426
2527FetchContent_MakeAvailable (googletest build_opencv)
You can’t perform that action at this time.
0 commit comments