diff --git a/RepoMan.cmake b/RepoMan.cmake index 89b2bea..7b2a913 100755 --- a/RepoMan.cmake +++ b/RepoMan.cmake @@ -282,16 +282,15 @@ function(repoman__internal__handle_dependencies DIRECTORY) # Include dependencies as sub-projects and resolve their dependencies foreach(DEPENDENCY IN LISTS REPOMAN_DEPENDENCIES) get_property(ADDED GLOBAL PROPERTY ${DEPENDENCY}_ADDED) - string(TOLOWER ${DEPENDENCY} NAME) - FetchContent_GetProperties(${NAME}) + FetchContent_GetProperties(${DEPENDENCY}) # Add not-yet included dependencies - if(NOT ADDED AND ${NAME}_POPULATED) - repoman__internal__handle_dependencies(${${NAME}_SOURCE_DIR}) + if(NOT ADDED AND ${DEPENDENCY}_POPULATED) + repoman__internal__handle_dependencies(${${DEPENDENCY}_SOURCE_DIR}) if(NOT SCRIPT_MODE) # add_subdirectory() does not work in script mode - add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR}) + add_subdirectory(${${DEPENDENCY}_SOURCE_DIR} ${${DEPENDENCY}_BINARY_DIR}) endif() set_property(GLOBAL PROPERTY ${DEPENDENCY}_ADDED TRUE) endif()