diff --git a/CMakeLists.txt b/CMakeLists.txt index 755ac271e..72cc737c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,9 +153,11 @@ function(link_to_source base_name) endif() else() if (IS_DIRECTORY ${target}) - file(GLOB_RECURSE files FOLLOW_SYMLINKS LIST_DIRECTORIES false RELATIVE ${target} "${target}/*") + file(GLOB_RECURSE files FOLLOW_SYMLINKS RELATIVE ${target} "${target}/*") foreach(file IN LISTS files) - configure_file("${target}/${file}" "${link}/${file}" COPYONLY) + if(NOT IS_DIRECTORY "${target}/${file}") + configure_file("${target}/${file}" "${link}/${file}" COPYONLY) + endif() endforeach(file) else() configure_file(${target} ${link} COPYONLY)