I have a git-bare-repository on my desktop and I would like to clone it with CMake. My repository has this path C:\Users\demoUser\Desktop\learnGIT\prog
. My CMakeLists.txt looks like this:
cmake_minimum_required(VERSION 2.8)
project(Demo)
include(ExternalProject)
ExternalProject_Add(demo
GIT_REPOSITORY C:/Users/demoUser/Desktop/learnGIT/prog
GIT_TAG master
UPDATE_COMMAND ""
INSTALL_COMMAND ""
)
but in the generated folder prog-build
is just wast. The generated folder structure doesn't include any of my files from the repository.
Does somebody has an idea?
You have to have a target in your project that depends on external project
add_dependencies(TargetName ExternalProjectName)
The git clone
happens on TargetName
build (not on CMake reload)