This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e3b411c3a546e30425ebdc77d69b4c01ce785073 (commit)
       via  5838aba1aae5c341941c0779cd947ed0172e3a61 (commit)
       via  7a3e45b9d469e468e4db867d51e92ceeed132b79 (commit)
       via  f088a3245001350f9c429e27bd12a3394742b0b8 (commit)
       via  9eedc850eb1419d678bda8137610dba1c289bb6a (commit)
       via  80790f33114cb6d80dfa0fd139cb2d92608cc68c (commit)
      from  349628cbf5715edbacb9844fd5d84f604b8cdaec (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3b411c3a546e30425ebdc77d69b4c01ce785073
commit e3b411c3a546e30425ebdc77d69b4c01ce785073
Merge: 349628c 5838aba
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Nov 26 07:02:37 2013 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Nov 26 07:02:37 2013 -0500

    Merge topic 'export-includes' into next
    
    5838aba Export: Report error on relative include with genex.
    7a3e45b Export: Prefix relative items with genexes in INSTALL_INTERFACE.
    f088a32 Export: Process INSTALL_INTERFACE in INCLUDES DESTINATION.
    9eedc85 Export: Process relative includes after genex evaluation.
    80790f3 Export: Test existing behavior of exporting includes with genexes.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5838aba1aae5c341941c0779cd947ed0172e3a61
commit 5838aba1aae5c341941c0779cd947ed0172e3a61
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Nov 26 11:24:47 2013 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Tue Nov 26 13:01:55 2013 +0100

    Export: Report error on relative include with genex.
    
    Diagnostics which check the sanity of exported include paths
    previously skipped over any path containing a generator expression.
    
    Introduce a policy to issue an error message in such cases.
    
    The export files created in the OLD behavior are not usable, because
    they contain relative paths or paths to the source or build location
    which are not suitable for use on installation. CMake will report an
    error on import.

diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index e954a86..5e94f89 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -74,3 +74,4 @@ All Policies
    /policy/CMP0038
    /policy/CMP0039
    /policy/CMP0040
+   /policy/CMP0041
diff --git a/Help/policy/CMP0041.rst b/Help/policy/CMP0041.rst
new file mode 100644
index 0000000..acb85af
--- /dev/null
+++ b/Help/policy/CMP0041.rst
@@ -0,0 +1,25 @@
+CMP0041
+-------
+
+Error on relative include with generator expression.
+
+Diagnostics in CMake 2.8.12 and lower silently ignored an entry in the
+:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of a target if it contained a 
generator
+expression at any position.
+
+The path entries in that target property should not be relative. High-level
+API should ensure that by adding either a source directory or a install
+directory prefix, as appropriate.
+
+As an additional diagnostic, the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` 
generated
+on an :prop_tgt:`IMPORTED` target for the install location should not contain
+paths in the source directory or the build directory.
+
+The OLD behavior for this policy is to ignore relative path entries if they
+contain a generator expression. The NEW behavior for this policy is to report
+an error if a generator expression appears in another location and the path is
+relative.
+
+This policy was introduced in CMake version 3.0.0.  CMake version
+|release| warns when the policy is not set and uses OLD behavior.  Use
+the cmake_policy command to set it to OLD or NEW explicitly.
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 9186ab6..2d963fe 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -233,26 +233,46 @@ static bool checkInterfaceDirs(const std::string &prepro,
 
   const bool inSourceBuild = strcmp(topSourceDir, topBinaryDir) == 0;
 
+  bool hadFatalError = false;
+
   for(std::vector<std::string>::iterator li = parts.begin();
       li != parts.end(); ++li)
     {
-    if (cmGeneratorExpression::Find(*li) != std::string::npos)
+    size_t genexPos = cmGeneratorExpression::Find(*li);
+    if (genexPos == 0)
       {
       continue;
       }
+    cmake::MessageType messageType = cmake::FATAL_ERROR;
+    cmOStringStream e;
+    if (genexPos != std::string::npos)
+      {
+      switch (target->GetPolicyStatusCMP0041())
+        {
+        case cmPolicies::WARN:
+          messageType = cmake::WARNING;
+          e << target->GetMakefile()->GetPolicies()
+                      ->GetPolicyWarning(cmPolicies::CMP0041) << "\n";
+          break;
+        case cmPolicies::OLD:
+          continue;
+        case cmPolicies::REQUIRED_IF_USED:
+        case cmPolicies::REQUIRED_ALWAYS:
+        case cmPolicies::NEW:
+          hadFatalError = true;
+          break; // Issue fatal message.
+        }
+      }
     if (cmHasLiteralPrefix(li->c_str(), "${_IMPORT_PREFIX}"))
       {
       continue;
       }
     if (!cmSystemTools::FileIsFullPath(li->c_str()))
       {
-      cmOStringStream e;
       e << "Target \"" << target->GetName() << "\" "
            "INTERFACE_INCLUDE_DIRECTORIES property contains relative path:\n"
            "  \"" << *li << "\"";
-      target->GetMakefile()->IssueMessage(cmake::FATAL_ERROR,
-                                          e.str().c_str());
-      return false;
+      target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
       }
     if (isSubDirectory(li->c_str(), installDir))
       {
@@ -260,29 +280,23 @@ static bool checkInterfaceDirs(const std::string &prepro,
       }
     if (isSubDirectory(li->c_str(), topBinaryDir))
       {
-      cmOStringStream e;
       e << "Target \"" << target->GetName() << "\" "
            "INTERFACE_INCLUDE_DIRECTORIES property contains path:\n"
            "  \"" << *li << "\"\nwhich is prefixed in the build directory.";
-      target->GetMakefile()->IssueMessage(cmake::FATAL_ERROR,
-                                          e.str().c_str());
-      return false;
+      target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
       }
     if (!inSourceBuild)
       {
       if (isSubDirectory(li->c_str(), topSourceDir))
         {
-        cmOStringStream e;
         e << "Target \"" << target->GetName() << "\" "
             "INTERFACE_INCLUDE_DIRECTORIES property contains path:\n"
             "  \"" << *li << "\"\nwhich is prefixed in the source directory.";
-        target->GetMakefile()->IssueMessage(cmake::FATAL_ERROR,
-                                            e.str().c_str());
-        return false;
+        target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
         }
       }
     }
-  return true;
+  return !hadFatalError;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index b9b469c..0b3018e 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -306,6 +306,11 @@ cmPolicies::cmPolicies()
     CMP0040, "CMP0040",
     "The target in the TARGET signature of add_custom_command() must exist.",
     3,0,0,0, cmPolicies::WARN);
+
+  this->DefinePolicy(
+    CMP0041, "CMP0041",
+    "Error on relative include with generator expression.",
+    3,0,0,0, cmPolicies::WARN);
 }
 
 cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 6834121..245ec4b 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -94,6 +94,7 @@ public:
     CMP0039, ///< Utility targets may not have link dependencies
     CMP0040, ///< The target in the TARGET signature of
     /// add_custom_command() must exist.
+    CMP0041, ///< Error on relative include with generator expression
 
     /** \brief Always the last entry.
      *
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 35ec680..7a40d70 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -25,7 +25,8 @@
   F(CMP0008) \
   F(CMP0020) \
   F(CMP0021) \
-  F(CMP0022)
+  F(CMP0022) \
+  F(CMP0041)
 
 class cmake;
 class cmMakefile;
diff --git a/Tests/RunCMake/CMP0041/CMP0041-NEW-result.txt 
b/Tests/RunCMake/CMP0041/CMP0041-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0041/CMP0041-NEW-stderr.txt 
b/Tests/RunCMake/CMP0041/CMP0041-NEW-stderr.txt
new file mode 100644
index 0000000..2ec3aef
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-NEW-stderr.txt
@@ -0,0 +1,20 @@
+CMake Error in CMakeLists.txt:
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains relative path:
+
+    "include/\$<TARGET_PROPERTY:NAME>"
+
+
+CMake Error in CMakeLists.txt:
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*/Tests/RunCMake/CMP0041/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the source directory.
+
+
+CMake Error in CMakeLists.txt:
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    
".*/Tests/RunCMake/CMP0041/CMP0041-NEW-build/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the build directory.
diff --git a/Tests/RunCMake/CMP0041/CMP0041-NEW.cmake 
b/Tests/RunCMake/CMP0041/CMP0041-NEW.cmake
new file mode 100644
index 0000000..605b79a
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-NEW.cmake
@@ -0,0 +1,12 @@
+
+cmake_policy(SET CMP0041 NEW)
+
+add_library(foo empty.cpp)
+set_property(TARGET foo
+  PROPERTY INTERFACE_INCLUDE_DIRECTORIES
+    include/$<TARGET_PROPERTY:NAME>
+    ${CMAKE_CURRENT_SOURCE_DIR}/include/$<TARGET_PROPERTY:NAME>
+    ${CMAKE_CURRENT_BINARY_DIR}/include/$<TARGET_PROPERTY:NAME>
+)
+install(TARGETS foo EXPORT FooExport DESTINATION lib)
+install(EXPORT FooExport DESTINATION lib/cmake)
diff --git a/Tests/RunCMake/CMP0041/CMP0041-OLD-result.txt 
b/Tests/RunCMake/CMP0041/CMP0041-OLD-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-OLD-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0041/CMP0041-OLD-stderr.txt 
b/Tests/RunCMake/CMP0041/CMP0041-OLD-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-OLD-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0041/CMP0041-OLD.cmake 
b/Tests/RunCMake/CMP0041/CMP0041-OLD.cmake
new file mode 100644
index 0000000..16cbced
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-OLD.cmake
@@ -0,0 +1,12 @@
+
+cmake_policy(SET CMP0041 OLD)
+
+add_library(foo empty.cpp)
+set_property(TARGET foo
+  PROPERTY INTERFACE_INCLUDE_DIRECTORIES
+    include/$<TARGET_PROPERTY:NAME>
+    ${CMAKE_CURRENT_SOURCE_DIR}/include/$<TARGET_PROPERTY:NAME>
+    ${CMAKE_CURRENT_BINARY_DIR}/include/$<TARGET_PROPERTY:NAME>
+)
+install(TARGETS foo EXPORT FooExport DESTINATION lib)
+install(EXPORT FooExport DESTINATION lib/cmake)
diff --git a/Tests/RunCMake/CMP0041/CMP0041-WARN-result.txt 
b/Tests/RunCMake/CMP0041/CMP0041-WARN-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-WARN-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0041/CMP0041-WARN-stderr.txt 
b/Tests/RunCMake/CMP0041/CMP0041-WARN-stderr.txt
new file mode 100644
index 0000000..a7d303e
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-WARN-stderr.txt
@@ -0,0 +1,32 @@
+CMake Warning in CMakeLists.txt:
+  Policy CMP0041 is not set: Error on relative include with generator
+  expression.  Run "cmake --help-policy CMP0041" for policy details.  Use the
+  cmake_policy command to set the policy and suppress this warning.
+
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains relative path:
+
+    "include/\$<TARGET_PROPERTY:NAME>"
+
+
+CMake Warning in CMakeLists.txt:
+  Policy CMP0041 is not set: Error on relative include with generator
+  expression.  Run "cmake --help-policy CMP0041" for policy details.  Use the
+  cmake_policy command to set the policy and suppress this warning.
+
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*/Tests/RunCMake/CMP0041/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the source directory.
+
+
+CMake Warning in CMakeLists.txt:
+  Policy CMP0041 is not set: Error on relative include with generator
+  expression.  Run "cmake --help-policy CMP0041" for policy details.  Use the
+  cmake_policy command to set the policy and suppress this warning.
+
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    
".*/Tests/RunCMake/CMP0041/CMP0041-WARN-build/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the build directory.
diff --git a/Tests/RunCMake/CMP0041/CMP0041-WARN.cmake 
b/Tests/RunCMake/CMP0041/CMP0041-WARN.cmake
new file mode 100644
index 0000000..873cbc7
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-WARN.cmake
@@ -0,0 +1,10 @@
+
+add_library(foo empty.cpp)
+set_property(TARGET foo
+  PROPERTY INTERFACE_INCLUDE_DIRECTORIES
+    include/$<TARGET_PROPERTY:NAME>
+    ${CMAKE_CURRENT_SOURCE_DIR}/include/$<TARGET_PROPERTY:NAME>
+    ${CMAKE_CURRENT_BINARY_DIR}/include/$<TARGET_PROPERTY:NAME>
+)
+install(TARGETS foo EXPORT FooExport DESTINATION lib)
+install(EXPORT FooExport DESTINATION lib/cmake)
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-NEW-result.txt 
b/Tests/RunCMake/CMP0041/CMP0041-tid-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-NEW-stderr.txt 
b/Tests/RunCMake/CMP0041/CMP0041-tid-NEW-stderr.txt
new file mode 100644
index 0000000..9b0a214
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-NEW-stderr.txt
@@ -0,0 +1,22 @@
+CMake Error in CMakeLists.txt:
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*/Tests/RunCMake/CMP0041/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the source directory.
+
+
+CMake Error in CMakeLists.txt:
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*/Tests/RunCMake/CMP0041/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the source directory.
+
+
+CMake Error in CMakeLists.txt:
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    
".*/Tests/RunCMake/CMP0041/CMP0041-tid-NEW-build/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the build directory.
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-NEW.cmake 
b/Tests/RunCMake/CMP0041/CMP0041-tid-NEW.cmake
new file mode 100644
index 0000000..3005108
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-NEW.cmake
@@ -0,0 +1,11 @@
+
+cmake_policy(SET CMP0041 NEW)
+
+add_library(foo empty.cpp)
+target_include_directories(foo INTERFACE
+  include/$<TARGET_PROPERTY:NAME>
+  ${CMAKE_CURRENT_SOURCE_DIR}/include/$<TARGET_PROPERTY:NAME>
+  ${CMAKE_CURRENT_BINARY_DIR}/include/$<TARGET_PROPERTY:NAME>
+)
+install(TARGETS foo EXPORT FooExport DESTINATION lib)
+install(EXPORT FooExport DESTINATION lib/cmake)
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-result.txt 
b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-stderr.txt 
b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-OLD.cmake 
b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD.cmake
new file mode 100644
index 0000000..b5c4e7f
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD.cmake
@@ -0,0 +1,11 @@
+
+cmake_policy(SET CMP0041 OLD)
+
+add_library(foo empty.cpp)
+target_include_directories(foo INTERFACE
+  include/$<TARGET_PROPERTY:NAME>
+  ${CMAKE_CURRENT_SOURCE_DIR}/include/$<TARGET_PROPERTY:NAME>
+  ${CMAKE_CURRENT_BINARY_DIR}/include/$<TARGET_PROPERTY:NAME>
+)
+install(TARGETS foo EXPORT FooExport DESTINATION lib)
+install(EXPORT FooExport DESTINATION lib/cmake)
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-WARN-result.txt 
b/Tests/RunCMake/CMP0041/CMP0041-tid-WARN-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-WARN-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-WARN-stderr.txt 
b/Tests/RunCMake/CMP0041/CMP0041-tid-WARN-stderr.txt
new file mode 100644
index 0000000..aae2c7a
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-WARN-stderr.txt
@@ -0,0 +1,34 @@
+CMake Warning in CMakeLists.txt:
+  Policy CMP0041 is not set: Error on relative include with generator
+  expression.  Run "cmake --help-policy CMP0041" for policy details.  Use the
+  cmake_policy command to set the policy and suppress this warning.
+
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*/Tests/RunCMake/CMP0041/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the source directory.
+
+
+CMake Warning in CMakeLists.txt:
+  Policy CMP0041 is not set: Error on relative include with generator
+  expression.  Run "cmake --help-policy CMP0041" for policy details.  Use the
+  cmake_policy command to set the policy and suppress this warning.
+
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*/Tests/RunCMake/CMP0041/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the source directory.
+
+
+CMake Warning in CMakeLists.txt:
+  Policy CMP0041 is not set: Error on relative include with generator
+  expression.  Run "cmake --help-policy CMP0041" for policy details.  Use the
+  cmake_policy command to set the policy and suppress this warning.
+
+  Target "foo" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    
".*/Tests/RunCMake/CMP0041/CMP0041-tid-WARN-build/include/\$<TARGET_PROPERTY:NAME>"
+
+  which is prefixed in the build directory.
diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-WARN.cmake 
b/Tests/RunCMake/CMP0041/CMP0041-tid-WARN.cmake
new file mode 100644
index 0000000..ee4c2a6
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMP0041-tid-WARN.cmake
@@ -0,0 +1,9 @@
+
+add_library(foo empty.cpp)
+target_include_directories(foo INTERFACE
+  include/$<TARGET_PROPERTY:NAME>
+  ${CMAKE_CURRENT_SOURCE_DIR}/include/$<TARGET_PROPERTY:NAME>
+  ${CMAKE_CURRENT_BINARY_DIR}/include/$<TARGET_PROPERTY:NAME>
+)
+install(TARGETS foo EXPORT FooExport DESTINATION lib)
+install(EXPORT FooExport DESTINATION lib/cmake)
diff --git a/Tests/RunCMake/CMP0041/CMakeLists.txt 
b/Tests/RunCMake/CMP0041/CMakeLists.txt
new file mode 100644
index 0000000..11ea636
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} CXX)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake 
b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
new file mode 100644
index 0000000..a5e2114
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
@@ -0,0 +1,8 @@
+include(RunCMake)
+
+run_cmake(CMP0041-OLD)
+run_cmake(CMP0041-NEW)
+run_cmake(CMP0041-WARN)
+run_cmake(CMP0041-tid-OLD)
+run_cmake(CMP0041-tid-NEW)
+run_cmake(CMP0041-tid-WARN)
diff --git a/Tests/RunCMake/CMP0041/empty.cpp b/Tests/RunCMake/CMP0041/empty.cpp
new file mode 100644
index 0000000..bfbbdde
--- /dev/null
+++ b/Tests/RunCMake/CMP0041/empty.cpp
@@ -0,0 +1,7 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int empty()
+{
+  return 0;
+}
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 209b0b3..72ea95d 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -60,6 +60,7 @@ add_RunCMake_test(CMP0037)
 add_RunCMake_test(CMP0038)
 add_RunCMake_test(CMP0039)
 add_RunCMake_test(CMP0040)
+add_RunCMake_test(CMP0041)
 add_RunCMake_test(CTest)
 if(UNIX AND "${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles")
   add_RunCMake_test(CompilerChange)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a3e45b9d469e468e4db867d51e92ceeed132b79
commit 7a3e45b9d469e468e4db867d51e92ceeed132b79
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Nov 26 10:54:27 2013 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Tue Nov 26 13:01:53 2013 +0100

    Export: Prefix relative items with genexes in INSTALL_INTERFACE.
    
    Code such as
    
     target_include_directories(foo INTERFACE
       $<INSTALL_INTERFACE:include$<FOO>>
     )
    
    should be treated as a relative directory, despite the genex, after
    the INSTALL_INTERFACE is stripped away.
    
    Previously, this would generate a relative directory on export, which
    would be an error on import, so no policy is needed.

diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index f34a35b..2e66d78 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -245,7 +245,7 @@ static void prefixItems(const std::string &content, 
std::string &result,
     result += sep;
     sep = ";";
     if (!cmSystemTools::FileIsFullPath(ei->c_str())
-        && cmGeneratorExpression::Find(*ei) == std::string::npos)
+        && cmGeneratorExpression::Find(*ei) != 0)
       {
       result += prefix;
       }
diff --git a/Tests/ExportImport/Export/CMakeLists.txt 
b/Tests/ExportImport/Export/CMakeLists.txt
index 89c767f..0e2828e 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -327,6 +327,8 @@ target_include_directories(testLibRequired INTERFACE
   $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest5$<0:>>
   $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/$<0:>installIncludesTest6>
   $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest7>
+  $<INSTALL_INTERFACE:installIncludesTest8/$<0:>>
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest8$<0:>>
 )
 install(TARGETS
           testLibIncludeRequired1
@@ -360,6 +362,8 @@ file(MAKE_DIRECTORY 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest6")
 file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest6/installIncludesTest6.h" "// 
No content\n")
 file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest7")
 file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest7/installIncludesTest7.h" "// 
No content\n")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest8")
+file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest8/installIncludesTest8.h" "// 
No content\n")
 install(FILES
   "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest/installIncludesTest.h"
   DESTINATION installIncludesTest
@@ -388,6 +392,10 @@ install(FILES
   "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest7/installIncludesTest7.h"
   DESTINATION installIncludesTest7
 )
+install(FILES
+  "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest8/installIncludesTest8.h"
+  DESTINATION installIncludesTest8
+)
 
 install(TARGETS testLibDepends testSharedLibDepends EXPORT DependsExp 
DESTINATION lib )
 install(EXPORT DependsExp FILE testLibDependsTargets.cmake DESTINATION 
lib/cmake/testLibDepends)
diff --git a/Tests/ExportImport/Import/A/deps_iface.c 
b/Tests/ExportImport/Import/A/deps_iface.c
index 0dc8be2..953d0ad 100644
--- a/Tests/ExportImport/Import/A/deps_iface.c
+++ b/Tests/ExportImport/Import/A/deps_iface.c
@@ -11,6 +11,7 @@
 #include "installIncludesTest5.h"
 #include "installIncludesTest6.h"
 #include "installIncludesTest7.h"
+#include "installIncludesTest8.h"
 
 #ifndef testLibRequired_IFACE_DEFINE
 #error Expected testLibRequired_IFACE_DEFINE

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f088a3245001350f9c429e27bd12a3394742b0b8
commit f088a3245001350f9c429e27bd12a3394742b0b8
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Nov 26 10:39:23 2013 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Tue Nov 26 13:01:50 2013 +0100

    Export: Process INSTALL_INTERFACE in INCLUDES DESTINATION.
    
    Code such as
    
     install(TARGETS ...
       INCLUDES DESTINATION $<INSTALL_INTERFACE:include>
     )
    
    should behave as if the INSTALL_INTERFACE wrapper were not present.

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 8f83c02..9186ab6 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -322,7 +322,10 @@ void 
cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
   cmListFileBacktrace lfbt;
   cmGeneratorExpression ge(lfbt);
 
-  std::string dirs = tei->InterfaceIncludeDirectories;
+  std::string dirs = cmGeneratorExpression::Preprocess(
+                                            tei->InterfaceIncludeDirectories,
+                                            preprocessRule,
+                                            true);
   this->ReplaceInstallPrefix(dirs);
   cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(dirs);
   std::string exportDirs = cge->Evaluate(target->GetMakefile(), 0,
diff --git a/Tests/ExportImport/Export/CMakeLists.txt 
b/Tests/ExportImport/Export/CMakeLists.txt
index 6f48fcc..89c767f 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -313,6 +313,20 @@ install(TARGETS testLibRequired
           $<INSTALL_PREFIX>/installIncludesTest2
           installIncludesTest3/$<TARGET_PROPERTY:NAME>
           $<TARGET_PROPERTY:NAME>/installIncludesTest4
+          $<INSTALL_INTERFACE:installIncludesTest5$<0:>>
+          $<INSTALL_INTERFACE:$<0:>installIncludesTest6>
+          $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/installIncludesTest7>
+)
+
+target_include_directories(testLibRequired INTERFACE
+  # These can't be in the above install(INCLUDES DESTINATION call because
+  # that is only for installed interfaces. These directories are prefixes
+  # in the build dir, which is an error for the installed interface.
+  # We add them here so that we don't have to add conditions in the Import
+  # component of the test.
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest5$<0:>>
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/$<0:>installIncludesTest6>
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest7>
 )
 install(TARGETS
           testLibIncludeRequired1
@@ -340,6 +354,12 @@ file(MAKE_DIRECTORY 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest3/testLibReq
 file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest3/testLibRequired/installIncludesTest3.h"
 "// No content\n")
 file(MAKE_DIRECTORY 
"${CMAKE_CURRENT_BINARY_DIR}/testLibRequired/installIncludesTest4")
 file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/testLibRequired/installIncludesTest4/installIncludesTest4.h"
 "// No content\n")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest5")
+file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest5/installIncludesTest5.h" "// 
No content\n")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest6")
+file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest6/installIncludesTest6.h" "// 
No content\n")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest7")
+file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest7/installIncludesTest7.h" "// 
No content\n")
 install(FILES
   "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest/installIncludesTest.h"
   DESTINATION installIncludesTest
@@ -356,6 +376,18 @@ install(FILES
   
"${CMAKE_CURRENT_BINARY_DIR}/testLibRequired/installIncludesTest4/installIncludesTest4.h"
   DESTINATION testLibRequired/installIncludesTest4
 )
+install(FILES
+  "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest5/installIncludesTest5.h"
+  DESTINATION installIncludesTest5
+)
+install(FILES
+  "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest6/installIncludesTest6.h"
+  DESTINATION installIncludesTest6
+)
+install(FILES
+  "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest7/installIncludesTest7.h"
+  DESTINATION installIncludesTest7
+)
 
 install(TARGETS testLibDepends testSharedLibDepends EXPORT DependsExp 
DESTINATION lib )
 install(EXPORT DependsExp FILE testLibDependsTargets.cmake DESTINATION 
lib/cmake/testLibDepends)
diff --git a/Tests/ExportImport/Import/A/deps_iface.c 
b/Tests/ExportImport/Import/A/deps_iface.c
index bd9f75a..0dc8be2 100644
--- a/Tests/ExportImport/Import/A/deps_iface.c
+++ b/Tests/ExportImport/Import/A/deps_iface.c
@@ -8,6 +8,9 @@
 #include "installIncludesTest2.h"
 #include "installIncludesTest3.h"
 #include "installIncludesTest4.h"
+#include "installIncludesTest5.h"
+#include "installIncludesTest6.h"
+#include "installIncludesTest7.h"
 
 #ifndef testLibRequired_IFACE_DEFINE
 #error Expected testLibRequired_IFACE_DEFINE

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9eedc850eb1419d678bda8137610dba1c289bb6a
commit 9eedc850eb1419d678bda8137610dba1c289bb6a
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Nov 26 10:34:44 2013 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Tue Nov 26 13:01:29 2013 +0100

    Export: Process relative includes after genex evaluation.
    
    In code such as
    
     install(TARGETS ...
       INCLUDES DESTINATION $<FOO>include
     )
    
    the generator expressions are evaluated at generate-time. Delay
    determining whether each entry is a relative path until after
    the generator expressions are evaluated. Such relative paths
    are based relative to the CMAKE_INSTALL_PREFIX.

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 2ce4458..8f83c02 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -286,6 +286,27 @@ static bool checkInterfaceDirs(const std::string &prepro,
 }
 
 //----------------------------------------------------------------------------
+static void prefixItems(std::string &exportDirs)
+{
+  std::vector<std::string> entries;
+  cmGeneratorExpression::Split(exportDirs, entries);
+  exportDirs = "";
+  const char *sep = "";
+  for(std::vector<std::string>::const_iterator ei = entries.begin();
+      ei != entries.end(); ++ei)
+    {
+    exportDirs += sep;
+    sep = ";";
+    if (!cmSystemTools::FileIsFullPath(ei->c_str())
+        && ei->find("${_IMPORT_PREFIX}") == std::string::npos)
+      {
+      exportDirs += "${_IMPORT_PREFIX}/";
+      }
+    exportDirs += *ei;
+    }
+}
+
+//----------------------------------------------------------------------------
 void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
                       cmTargetExport *tei,
                       cmGeneratorExpression::PreprocessContext preprocessRule,
@@ -330,6 +351,8 @@ void 
cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
     return;
     }
 
+  prefixItems(exportDirs);
+
   std::string includes = (input?input:"");
   const char* sep = input ? ";" : "";
   includes += sep + exportDirs;
diff --git a/Source/cmInstallCommandArguments.cxx 
b/Source/cmInstallCommandArguments.cxx
index 91ea861..236ca1f 100644
--- a/Source/cmInstallCommandArguments.cxx
+++ b/Source/cmInstallCommandArguments.cxx
@@ -228,11 +228,6 @@ void cmInstallCommandIncludesArgument::Parse(
   for ( ; it != args->end(); ++it)
     {
     std::string dir = *it;
-    if (!cmSystemTools::FileIsFullPath(it->c_str())
-        && cmGeneratorExpression::Find(*it) == std::string::npos)
-      {
-      dir = "$<INSTALL_PREFIX>/" + dir;
-      }
     cmSystemTools::ConvertToUnixSlashes(dir);
     this->IncludeDirs.push_back(dir);
     }
diff --git a/Tests/ExportImport/Export/CMakeLists.txt 
b/Tests/ExportImport/Export/CMakeLists.txt
index cbae967..6f48fcc 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -311,7 +311,9 @@ install(TARGETS testLibRequired
         INCLUDES DESTINATION
           installIncludesTest
           $<INSTALL_PREFIX>/installIncludesTest2
-          )
+          installIncludesTest3/$<TARGET_PROPERTY:NAME>
+          $<TARGET_PROPERTY:NAME>/installIncludesTest4
+)
 install(TARGETS
           testLibIncludeRequired1
           testLibIncludeRequired2
@@ -334,6 +336,10 @@ file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest/installIncludesTest.
 
 file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2")
 file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2/installIncludesTest2.h" "// 
No content\n")
+file(MAKE_DIRECTORY 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest3/testLibRequired")
+file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest3/testLibRequired/installIncludesTest3.h"
 "// No content\n")
+file(MAKE_DIRECTORY 
"${CMAKE_CURRENT_BINARY_DIR}/testLibRequired/installIncludesTest4")
+file(WRITE 
"${CMAKE_CURRENT_BINARY_DIR}/testLibRequired/installIncludesTest4/installIncludesTest4.h"
 "// No content\n")
 install(FILES
   "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest/installIncludesTest.h"
   DESTINATION installIncludesTest
@@ -342,6 +348,14 @@ install(FILES
   "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2/installIncludesTest2.h"
   DESTINATION installIncludesTest2
 )
+install(FILES
+  
"${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest3/testLibRequired/installIncludesTest3.h"
+  DESTINATION installIncludesTest3/testLibRequired
+)
+install(FILES
+  
"${CMAKE_CURRENT_BINARY_DIR}/testLibRequired/installIncludesTest4/installIncludesTest4.h"
+  DESTINATION testLibRequired/installIncludesTest4
+)
 
 install(TARGETS testLibDepends testSharedLibDepends EXPORT DependsExp 
DESTINATION lib )
 install(EXPORT DependsExp FILE testLibDependsTargets.cmake DESTINATION 
lib/cmake/testLibDepends)
diff --git a/Tests/ExportImport/Import/A/deps_iface.c 
b/Tests/ExportImport/Import/A/deps_iface.c
index 48a4c44..bd9f75a 100644
--- a/Tests/ExportImport/Import/A/deps_iface.c
+++ b/Tests/ExportImport/Import/A/deps_iface.c
@@ -6,6 +6,8 @@
 
 #include "installIncludesTest.h"
 #include "installIncludesTest2.h"
+#include "installIncludesTest3.h"
+#include "installIncludesTest4.h"
 
 #ifndef testLibRequired_IFACE_DEFINE
 #error Expected testLibRequired_IFACE_DEFINE
diff --git a/Tests/RunCMake/include_directories/export-NOWARN.cmake 
b/Tests/RunCMake/include_directories/export-NOWARN.cmake
index 924511d..307ce5a 100644
--- a/Tests/RunCMake/include_directories/export-NOWARN.cmake
+++ b/Tests/RunCMake/include_directories/export-NOWARN.cmake
@@ -48,3 +48,15 @@ install(TARGETS foo EXPORT FooTargets6
   INCLUDES DESTINATION $<INSTALL_INTERFACE:include$<0:>>
 )
 install(EXPORT FooTargets6 DESTINATION lib/cmake)
+
+install(TARGETS foo EXPORT FooTargets7
+  DESTINATION lib
+  INCLUDES DESTINATION include$<0:>
+)
+install(EXPORT FooTargets7 DESTINATION lib/cmake)
+
+install(TARGETS foo EXPORT FooTargets8
+  DESTINATION lib
+  INCLUDES DESTINATION $<0:>include
+)
+install(EXPORT FooTargets8 DESTINATION lib/cmake)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80790f33114cb6d80dfa0fd139cb2d92608cc68c
commit 80790f33114cb6d80dfa0fd139cb2d92608cc68c
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Mon Nov 25 15:54:54 2013 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Tue Nov 26 13:00:43 2013 +0100

    Export: Test existing behavior of exporting includes with genexes.
    
    Test that no warning or error diagnostic is issued for 'good code'.

diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt 
b/Tests/RunCMake/include_directories/CMakeLists.txt
index 12cd3c7..f452db1 100644
--- a/Tests/RunCMake/include_directories/CMakeLists.txt
+++ b/Tests/RunCMake/include_directories/CMakeLists.txt
@@ -1,3 +1,3 @@
 cmake_minimum_required(VERSION 2.8.4)
-project(${RunCMake_TEST} NONE)
+project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake 
b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
index f66823e..c00b924 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -11,3 +11,4 @@ run_cmake(RelativePathInGenex)
 run_cmake(CMP0021)
 run_cmake(install_config)
 run_cmake(incomplete-genex)
+run_cmake(export-NOWARN)
diff --git a/Tests/RunCMake/include_directories/export-NOWARN-result.txt 
b/Tests/RunCMake/include_directories/export-NOWARN-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/include_directories/export-NOWARN-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/include_directories/export-NOWARN-stderr.txt 
b/Tests/RunCMake/include_directories/export-NOWARN-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/include_directories/export-NOWARN-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/include_directories/export-NOWARN.cmake 
b/Tests/RunCMake/include_directories/export-NOWARN.cmake
new file mode 100644
index 0000000..924511d
--- /dev/null
+++ b/Tests/RunCMake/include_directories/export-NOWARN.cmake
@@ -0,0 +1,50 @@
+
+add_library(foo empty.cpp)
+set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES 
$<0:>/include/subdir)
+set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES 
$<INSTALL_PREFIX>/include/subdir)
+
+set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES 
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/subdir>)
+set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES 
$<INSTALL_INTERFACE:include/subdir>)
+set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES 
$<INSTALL_INTERFACE:include/$<0:>>)
+set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES 
$<INSTALL_INTERFACE:$<0:>/include>)
+
+# target_include_directories(foo INTERFACE include/subdir) # Does and should 
warn. INSTALL_INTERFACE must not list src dir paths.
+target_include_directories(foo INTERFACE $<0:>/include/subdir) # Does not and 
should not should warn, because it starts with a genex.
+target_include_directories(foo INTERFACE $<INSTALL_PREFIX>/include/subdir)
+
+target_include_directories(foo INTERFACE $<INSTALL_INTERFACE:include/subdir>)
+target_include_directories(foo INTERFACE $<INSTALL_INTERFACE:include/$<0:>>)
+
+install(TARGETS foo EXPORT FooTargets DESTINATION lib)
+install(EXPORT FooTargets DESTINATION lib/cmake)
+
+install(TARGETS foo EXPORT FooTargets2
+  DESTINATION lib
+  INCLUDES DESTINATION include # No warning. Implicit install prefix.
+)
+install(EXPORT FooTargets2 DESTINATION lib/cmake)
+
+install(TARGETS foo EXPORT FooTargets3
+  DESTINATION lib
+  INCLUDES DESTINATION $<INSTALL_PREFIX>include
+)
+install(EXPORT FooTargets3 DESTINATION lib/cmake)
+
+install(TARGETS foo EXPORT FooTargets4
+  DESTINATION lib
+  INCLUDES DESTINATION $<INSTALL_INTERFACE:include>
+)
+install(EXPORT FooTargets4 DESTINATION lib/cmake)
+
+install(TARGETS foo EXPORT FooTargets5
+  DESTINATION lib
+    # The $<0:> is evaluated at export time, leaving 'include' behind, which 
should be treated as above.
+  INCLUDES DESTINATION $<INSTALL_INTERFACE:$<0:>include>
+)
+install(EXPORT FooTargets5 DESTINATION lib/cmake)
+
+install(TARGETS foo EXPORT FooTargets6
+  DESTINATION lib
+  INCLUDES DESTINATION $<INSTALL_INTERFACE:include$<0:>>
+)
+install(EXPORT FooTargets6 DESTINATION lib/cmake)

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to