Skip to content

Commit

Permalink
Fix vp_add_subdirectory that produced an issue on macos complaining a…
Browse files Browse the repository at this point in the history
…bout apps/ folder that already exists
  • Loading branch information
fspindle committed May 14, 2024
1 parent b476f69 commit 1056d74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/VISPUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,10 @@ macro(vp_add_subdirectories lst subdir)
file(GLOB __subdirs RELATIVE "${__path}/${subdir}" "${__path}/${subdir}/*")
foreach(__s ${__subdirs})
if(EXISTS "${__path}/${subdir}/${__s}/CMakeLists.txt")
add_subdirectory("${__path}/${subdir}/${__s}" "${CMAKE_BINARY_DIR}/${subdir}/${__s}")
# Add subdir only if ut doesn't exist
if(NOT EXISTS "${CMAKE_BINARY_DIR}/${subdir}/${__s}")
add_subdirectory("${__path}/${subdir}/${__s}" "${CMAKE_BINARY_DIR}/${subdir}/${__s}")
endif()
endif()
endforeach()
endif()
Expand Down

0 comments on commit 1056d74

Please sign in to comment.