1get_directory_property 2---------------------- 3 4Get a property of ``DIRECTORY`` scope. 5 6.. code-block:: cmake 7 8 get_directory_property(<variable> [DIRECTORY <dir>] <prop-name>) 9 10Stores a property of directory scope in the named ``<variable>``. 11 12The ``DIRECTORY`` argument specifies another directory from which 13to retrieve the property value instead of the current directory. 14Relative paths are treated as relative to the 15current source directory. CMake must already know about the directory, 16either by having added it through a call to :command:`add_subdirectory` 17or being the top level directory. 18 19.. versionadded:: 3.19 20 ``<dir>`` may reference a binary directory. 21 22If the property is not defined for the nominated directory scope, 23an empty string is returned. In the case of ``INHERITED`` properties, 24if the property is not found for the nominated directory scope, 25the search will chain to a parent scope as described for the 26:command:`define_property` command. 27 28.. code-block:: cmake 29 30 get_directory_property(<variable> [DIRECTORY <dir>] 31 DEFINITION <var-name>) 32 33Get a variable definition from a directory. This form is useful to 34get a variable definition from another directory. 35 36See also the more general :command:`get_property` command. 37