summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmExportFileGenerator.cxx5
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt32
-rw-r--r--Tests/ExportImport/Import/A/deps_iface.c3
3 files changed, 39 insertions, 1 deletions
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