CMake's FIND_PACKAGE not setting variables

Viewed 4945

I am currently trying to write my first non-trivial CMake project but I cannot examine any of FIND_PACKAGE()'s outputs as it does not appear to be ascribing values to the global variables I expect it should! For example, the following code:

MESSAGE("CMake version: ${CMAKE_VERSION}")
FIND_PACKAGE(Armadillo)
IF(Armadillo_FOUND)
    MESSAGE("Found Armadillo.")
    MESSAGE("Armadillo include dir is: ${ARMADILLO_INCLUDE_DIR}")
    MESSAGE("Armadillo lib's to be linked against: ${Armadillo_LIBRARIES}")
    MESSAGE("Armadillo lib version: ${PACKAGE_FIND_VERSION}")
ENDIF(Armadillo_FOUND)

produces the following terminal output

/build]$ CMake version: 2.6.4
/build]$ Found Armadillo.
/build]$ Armadillo include dir is:
/build]$ Armadillo lib's to be linked against:
/build]$ Armadillo lib version:

I know this is quite basic, but from all the tutorials I can find this should produce useful output. Any ideas??

2 Answers
Related