Hey I took the example from Using CMake and managing dependencies · Elias Daler's blog
Just added the Source Dir to the example
cmake_minimum_required (VERSION 3.21.0)
project(parent)
include(FetchContent)
FetchContent_Declare(foobar
GIT_REPOSITORY "https://github.com/opencv/opencv.git"
GIT_TAG "origin/master" # it's much better to use a specific Git revision or Git tag for reproducibility
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../opencv"
)
FetchContent_MakeAvailable(foobar)
add_executable (Test "Test.cpp" "Test.h")
target_link_libraries(Test PRIVATE foobar_target)
even with this there is no connection to the upstream branch. Am I missing something here?