[Cmake] FW: contruction of variable names
William A. Hoffman
billlist at nycap.rr.com
Thu Aug 19 13:27:58 EDT 2004
CMake has built in variables to do what you want.
PROJECT(LMSCft)
MESSAGE(${LMSCft_SOURCE_DIR})
MESSAGE(${LMSCft_BINARY_DIR})
See the PROJECT command here:
http://www.cmake.org/HTML/Documentation.html
At 01:00 PM 8/19/2004, Dekeyser, Kris wrote:
>I'm trying this code with CMake 2.0.3:
>
># project's name
>SET(ThisProject "LMSCft")
>
>#--- exported header files
>INCLUDE_DIRECTORIES(${${ThisProject}_SOURCE_DIR}/export/include)
>
>But the include directory is "_SOURCE_DIR}/export/include" in the MSDev
>project file.
>I expected to have "<Source dir of the LMSCft project>/export/include". It
>seems as if
>the first ${ gets "eaten" by the rest. What did I do wrong?
>
>BTW, in the CMake book (version 1.8) on page 33, the example says:
>
>IF( ${${tfile}}_TEST_RESULT} MATCHES FAILED)
>[...]
>
>Notice the unbalanced } due to the double } after tfile. Is that a typo?
>I tried the same in my code, but ended up with
>"}_SOURCE_DIR}/export/include". Not correct either.
More information about the Cmake
mailing list