[CMake] Variable availability from the FindXXX modules

Michael Jackson mike.jackson at bluequartz.net
Fri Jun 12 14:42:28 EDT 2009


I have my cmake build system kinda working but I had to put in what I  
think is a kludge to get it to work. In my top level CMakeLists.txt  
file I "include" another CMake file which calls another project via  
add_subdirectory(). With in that last call is a call to "FindBoost"  
which goes just fine. Now work our way all the way back to the top of  
the CMake file hierarchy and when I do "message(STATUS  
"Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}") I get an empty statement.
     I had to put in another call to:
FIND_PACKAGE(Boost 1.36 COMPONENTS )
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
message (STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")

and now I get the proper print out. So effectively I have called  
FindBoost at least twice. Would something like this be normal?

Thanks
_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio





More information about the CMake mailing list