File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 5757 id : opencv-cache
5858 uses : actions/cache/restore@v5
5959 with :
60- path : |
61- ${{ github.workspace }}/opencv_artifacts/include
62- ${{ github.workspace }}/opencv_artifacts/lib
63- ${{ github.workspace }}/opencv_artifacts/bin
60+ path : ${{ github.workspace }}/opencv_artifacts
6461 key : opencv-${{ env.OPENCV_VERSION }}-windows-x64-${{ hashFiles('cmake/opencv_build_options.cmake') }}
6562
6663 - name : Build OpenCV
8683 if : steps.opencv-cache.outputs.cache-hit != 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
8784 uses : actions/cache/save@v5
8885 with :
89- path : |
90- ${{ github.workspace }}/opencv_artifacts/include
91- ${{ github.workspace }}/opencv_artifacts/lib
92- ${{ github.workspace }}/opencv_artifacts/bin
86+ path : ${{ github.workspace }}/opencv_artifacts
9387 key : opencv-${{ env.OPENCV_VERSION }}-windows-x64-${{ hashFiles('cmake/opencv_build_options.cmake') }}
9488
9589 # Commented out: FFmpeg backend is included in opencv_videoio_ffmpeg DLLs
Original file line number Diff line number Diff line change @@ -43,4 +43,7 @@ set(BUILD_opencv_wechat_qrcode ON CACHE BOOL "" FORCE)
4343
4444# Disable unused 3rd-party integrations
4545set (WITH_GSTREAMER OFF CACHE BOOL "" FORCE)
46- set (WITH_ADE OFF CACHE BOOL "" FORCE)
46+ set (WITH_ADE OFF CACHE BOOL "" FORCE)
47+
48+ # Use a flat install layout (avoids x64/vc17/ subdirectories; libs go to staticlib/)
49+ set (OpenCV_INSTALL_BINARIES_PREFIX "" CACHE STRING "" FORCE)
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ if(APPLE)
1616 find_package (Protobuf REQUIRED)
1717endif ()
1818
19+ # On Windows, OpenCV is built as a static library; tell the Windows Pack config to look for static libs.
20+ if (WIN32 )
21+ set (OpenCV_STATIC ON )
22+ endif ()
23+
1924find_package (OpenCV REQUIRED)
2025
2126# iconv support isn't automatic on some systems
You can’t perform that action at this time.
0 commit comments