diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h index 3b35d55de..cbe344f3c 100644 --- a/Source/cmIncludeDirectoryCommand.h +++ b/Source/cmIncludeDirectoryCommand.h @@ -58,13 +58,21 @@ public: { return " include_directories([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)\n" - "Add the given directories to those searched by the compiler for " - "include files. By default the directories are appended onto " - "the current list of directories. This default behavior can be " - "changed by setting CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON. " - "By using BEFORE or AFTER you can select between appending and " - "prepending, independent from the default. " - "If the SYSTEM option is given the compiler will be told that the " + "Add the given directories to those the compiler uses to search " + "for include files. " + "These directories are added to the directory property " + "INCLUDE_DIRECTORIES for the current CMakeLists file. " + "They are also added to the target property INCLUDE_DIRECTORIES " + "for each target in the current CMakeLists file. " + "The target property values are the ones used by the generators." + "\n" + "By default the directories are appended onto the current list of " + "directories. " + "This default behavior can be changed by setting " + "CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON. " + "By using AFTER or BEFORE explicitly, you can select between " + "appending and prepending, independent of the default. " + "If the SYSTEM option is given, the compiler will be told the " "directories are meant as system include directories on some " "platforms."; } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 84dc87249..d206d3216 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3860,9 +3860,22 @@ void cmMakefile::DefineProperties(cmake *cm) cm->DefineProperty ("INCLUDE_DIRECTORIES", cmProperty::DIRECTORY, "List of preprocessor include file search directories.", - "This read-only property specifies the list of directories given " - "so far to the include_directories command. " - "It is intended for debugging purposes.", false); + "This property specifies the list of directories given " + "so far to the include_directories command. " + "This property exists on directories and targets. " + "In addition to accepting values from the include_directories " + "command, values may be set directly on any directory or any " + "target using the set_property command. " + "A target gets its initial value for this property from the value " + "of the directory property. " + "A directory gets its initial value from its parent directory if " + "it has one. " + "Both directory and target property values are adjusted by calls " + "to the include_directories command." + "\n" + "The target property values are used by the generators to set " + "the include paths for the compiler. " + "See also the include_directories command."); cm->DefineProperty ("LINK_DIRECTORIES", cmProperty::DIRECTORY, diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index cd816a699..e618bee41 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -485,6 +485,26 @@ void cmTarget::DefineProperties(cmake *cm) "Installing a target with EXCLUDE_FROM_ALL set to true has " "undefined behavior."); + cm->DefineProperty + ("INCLUDE_DIRECTORIES", cmProperty::TARGET, + "List of preprocessor include file search directories.", + "This property specifies the list of directories given " + "so far to the include_directories command. " + "This property exists on directories and targets. " + "In addition to accepting values from the include_directories " + "command, values may be set directly on any directory or any " + "target using the set_property command. " + "A target gets its initial value for this property from the value " + "of the directory property. " + "A directory gets its initial value from its parent directory if " + "it has one. " + "Both directory and target property values are adjusted by calls " + "to the include_directories command." + "\n" + "The target property values are used by the generators to set " + "the include paths for the compiler. " + "See also the include_directories command."); + cm->DefineProperty ("INSTALL_NAME_DIR", cmProperty::TARGET, "Mac OSX directory name for installed targets.",