[CMake] Read multiple path names from filesystem
Tim Just
tim.just at rwth-aachen.de
Thu Oct 29 06:11:22 EDT 2009
Hi,
I'm using CMake 2.8 rc3 on Ubuntu to build a modular and extensible
project. Therefore I have a directory called 'modules' beneath the
project root. In this folder may be an undefined number of subfolders
containing module sources and CMakeLists.txt files. In the
CMakeLists.txt in project root, I try to find out which modules exist in
the modules folder. To do so I'm using find_path:
find_path(MODULE_PATH CMakeLists.txt PATHS modules/* NO_DEFAULT_PATH)
get_filename_component(MODULE_NAME ${MODULE_PATH} NAME)
This works for ONE module, but I want to find ALL modules in the
directory. The number of modules is not known in advance.
Has anyone suggestions how to realize this functionality?
Thanks for your help,
Tim
More information about the CMake
mailing list