Allow usage of mirrors for all dependencies

This commit is contained in:
2023-10-29 19:02:11 +01:00
parent a6b31d69be
commit 45cb095561
17 changed files with 111 additions and 24 deletions

View File

@@ -1,10 +1,15 @@
Find_Package(OpenCV)
if(NOT DEFINED OPENCV_REPO)
set(OPENCV_REPO https://github.com/opencv/opencv.git)
endif ()
if (NOT OpenCV_FOUND)
FetchContent_Declare(
opencv
EXCLUDE_FROM_ALL
GIT_REPOSITORY https://github.com/opencv/opencv.git
GIT_TAG v4.5.0
GIT_REPOSITORY ${OPENCV_REPO}
GIT_TAG v4.8.1
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(opencv)