[CMake] Conundrum

Robert Bielik robert.bielik at xponaut.se
Fri Aug 5 03:40:11 EDT 2011


Hi all,

I have a project where I have several CMakeLists.txt files in subfolders (included in main CMakeLists.txt with subdirs), one of which is an external library inclusion folder.

trunk/external

In it I have an included Libraries.cmake file (included by the CMakeLists.txt file) which defines several variables like f.i. BOOST_INCLUDE_DIR

In other CMakeLists.txt files (in other subfolders) I need to access those variables, but they seem to be undefined. I think it is
because those vars are only defined within the CMakeLists.txt scope.

However, an older project in which I worked, we had this working fine (I think CMake ver then was 2.4.6).

Now I use 2.8.4. Has this changed making it not work today ?

TIA
/Rob


More information about the CMake mailing list