On Mon, Jun 11, 2012 at 11:35 AM, GOO Creations <goocreati...@gmail.com>wrote:
> Thanks. > I was sitting for hours trying to write this huge macro and now the > solution isso easy. > For future readers, here is my macro: > > *MACRO(HEADER_DIRECTORIES return_list)* > * FILE(GLOB_RECURSE new_list *.h)* > * SET(dir_list "")* > * FOREACH(file_path ${new_list})* > * GET_FILENAME_COMPONENT(dir_path ${file_path} PATH)* > * SET(dir_list ${dir_list} ${dir_path})* > * ENDFOREACH()* > * LIST(REMOVE_DUPLICATES dir_list)* > * SET(${return_list} ${dir_list})* > *ENDMACRO()* > > FYI - I added this here: http://www.vtk.org/Wiki/CMake/Examples#Recursively_add_subdirectories_to_INCLUDE_DIRECTORIES David
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake