[CMake] [Cmake] Absolute paths in .cmake, .txt files

Andreas Schneider mail at cynapses.org
Thu Sep 4 11:07:53 EDT 2008


On Thursday 04 September 2008 16:31:17 Bo Huang wrote:
> It seems there is a ${CMAKE_CURRENT_SOURCE_DIR}) variable. Can I use this
> in a line such as:
>
> INCLUDE("C:/Users/BHuang/Documents/myProj/myProjSubDir/cmake_install.cmake"
>)
>
> To make it
>
> INCLUDE("${(CMAKE_CURRENT_SOURCE_DIR})/cmake_install.cmake")
>
> If so, how I can set this variable's value? I cannot find it.
>


CMAKE_CURRENT_SOURCE_DIR 
    this is the directory where the currently processed CMakeLists.txt is
    located in 

CMAKE_SOURCE_DIR 
    this is the directory, from which cmake was started, i.e. the top level 
    source directory

There is also a PROJECT_SOURCE_DIR variable which points to the directory of 
the last project() command.


	-- andreas

-- 
http://www.cynapses.org/ - cybernetic synapses
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080904/7f34d84d/attachment.pgp>


More information about the CMake mailing list