diff options
-rw-r--r-- | Source/cmDocumentVariables.cxx | 7 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index 08b3ef1..dd138a3 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -1150,9 +1150,10 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_BUILD_INTERFACE_INCLUDES", cmProperty::VARIABLE, "Automatically add the current source- and build directories " "to the INTERFACE_INCLUDE_DIRECTORIES.", - "If this variable is enabled, CMake automatically adds for each " - "target ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} " - "to the INTERFACE_INCLUDE_DIRECTORIES." + "If this variable is enabled, CMake automatically adds for each shared " + "library target, static library target, module target and executable " + "target, ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} to " + "the INTERFACE_INCLUDE_DIRECTORIES." "By default CMAKE_BUILD_INTERFACE_INCLUDES is OFF.", false, "Variables that Control the Build"); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f55999f..2945173 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2714,6 +2714,13 @@ void cmTarget::AppendProperty(const char* prop, const char* value, //---------------------------------------------------------------------------- void cmTarget::AppendBuildInterfaceIncludes() { + if(this->GetType() != cmTarget::SHARED_LIBRARY && + this->GetType() != cmTarget::STATIC_LIBRARY && + this->GetType() != cmTarget::MODULE_LIBRARY && + !this->IsExecutableWithExports()) + { + return; + } if (this->BuildInterfaceIncludesAppended) { return; |