made the searching of MySQL headers look recursively for subdirectories

This commit is contained in:
Markus Makela
2014-09-24 18:58:23 +03:00
parent 725a432bf7
commit d8d920bdb4
2 changed files with 16 additions and 3 deletions

View File

@ -208,3 +208,14 @@ macro(check_dirs)
endif()
endmacro()
function(subdirs VAR DIRPATH)
file(GLOB_RECURSE SDIR ${DIRPATH}/*)
foreach(LOOP ${SDIR})
get_filename_component(LOOP ${LOOP} DIRECTORY)
list(APPEND ALLDIRS ${LOOP})
endforeach()
list(REMOVE_DUPLICATES ALLDIRS)
set(${VAR} "${ALLDIRS}" CACHE PATH " " FORCE)
endfunction()