Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support providing a custom OpenCV tarball #349

Merged
merged 3 commits into from
Jun 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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