Zitat von Martin Santa Maria <[email protected]>:
Thanks to all for your answers. The thing is that I don't want to code statically the existence of packages in the root/CMakeLists.txt but I want that each package register it-self in some "package container" that the CMakeLists.txt could read. This container should be seen as a set of lists and variables that contains, for example, the source files or some flags. I was having problem with ADD_SUBDIRECTORY because the only way I found to pass the information from package's CMakeLists.txt files to the root's CMakeLists.txt was using cache variables but this doesn't work completely because the variables are not reinitialized on each configure and I had an growing list of things. I think I will success with PARENT_SCOPE flag and some macros. I tell you soon. Regards
That's the way to push variables. You can also pull them via directory properties:
http://www.cmake.org/cmake/help/cmake2.6docs.html#prop_dir:VARIABLES HS _______________________________________________ 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
