diff options
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 2 | ||||
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/ExportImport/Export/empty.cpp | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index d4437a8..5b351bc 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -291,7 +291,7 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( { return; } - if (!*input && tei->InterfaceIncludeDirectories.empty()) + if ((input && !*input) && tei->InterfaceIncludeDirectories.empty()) { // Set to empty properties[propName] = ""; diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 49f1c58..1910f8c 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -270,6 +270,8 @@ set_property(TARGET cmp0022NEW APPEND PROPERTY INTERFACE_LINK_LIBRARIES testLib2 set_property(TARGET cmp0022OLD APPEND PROPERTY INTERFACE_LINK_LIBRARIES testLib2) set_property(TARGET cmp0022OLD APPEND PROPERTY LINK_INTERFACE_LIBRARIES testLib3) +add_library(noIncludesInterface empty.cpp) + install(TARGETS testLibRequired testLibIncludeRequired1 testLibIncludeRequired2 @@ -278,6 +280,7 @@ install(TARGETS testLibRequired testLibIncludeRequired5 testLibIncludeRequired6 testSharedLibRequired + noIncludesInterface EXPORT RequiredExp DESTINATION lib INCLUDES DESTINATION installIncludesTest diff --git a/Tests/ExportImport/Export/empty.cpp b/Tests/ExportImport/Export/empty.cpp new file mode 100644 index 0000000..1787013 --- /dev/null +++ b/Tests/ExportImport/Export/empty.cpp @@ -0,0 +1,4 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() { return 0; } |