[CMake] PROJECT_SOURCE_DIR ...
Mateusz Loskot
mateusz at loskot.net
Sun Nov 10 15:12:53 EST 2013
On 10 November 2013 19:12, Witold E Wolski <wewolski at gmail.com> wrote:
> Looking at CMakeLists.txt and trying to anderstand...
>
> the project is:
> PROJECT(LIBFBI)
>
> than there are variables within the the file such as
> LIBFBI_BINARY_DIR
> LIBFBI_SOURCE_DIR
>
> They seem not be set in this script nor in the included script. Does
> cmake generates these variables? If so can anyone point me to where
> this is documented?
In the documentation :-)
http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:project
"""
Sets the name of the project.
Additionally this sets the variables <projectName>_BINARY_DIR and
<projectName>_SOURCE_DIR to the respective values.
"""
> And they are the same as CMAKE_BINARY_DIR , or CMAKE_SOURCE_DIR.
>
> So why one would use the ${PROJECT}_BINARY_DIR variables?
i.e. when writing general purpose macros/functions, more generic scripts, etc.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the CMake
mailing list