Skip to content

Commit

Permalink
Support providing a custom OpenCV tarball (#349)
Browse files Browse the repository at this point in the history
* Update BuildMyOpenCV.cmake

* Update BuildMyOpenCV.cmake

* Use dafault values
  • Loading branch information
umireon authored Jun 24, 2023
1 parent f1db090 commit 99e67cb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmake/BuildMyOpenCV.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
include(ExternalProject)

set(OPENCV_URL
https://github.com/opencv/opencv/archive/refs/tags/4.7.0.tar.gz
CACHE STRING "URL of an OpenCV tarball")

set(OPENCV_MD5
13e13244cb0cc6ec4f01eacd38d05d17
CACHE STRING "MD5 Hash of an OpenCV tarball")

string(REPLACE ";" "$<SEMICOLON>" CMAKE_OSX_ARCHITECTURES_ "${CMAKE_OSX_ARCHITECTURES}")

if(MSVC)
Expand Down Expand Up @@ -36,7 +44,8 @@ endif()
ExternalProject_Add(
OpenCV_Build
DOWNLOAD_EXTRACT_TIMESTAMP true
URL https://github.com/opencv/opencv/archive/refs/tags/4.7.0.tar.gz
URL ${OPENCV_URL}
URL_HASH MD5=${OPENCV_MD5}
PATCH_COMMAND ${OpenCV_INSTALL_CCACHE}
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config ${OpenCV_BUILD_TYPE}
BUILD_BYPRODUCTS
Expand Down

0 comments on commit 99e67cb

Please sign in to comment.