mirror of
https://github.com/reactos/CMake.git
synced 2025-01-27 14:53:31 +00:00
Merge topic 'fix-export-includes-crash'
f868e47 Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES.
This commit is contained in:
commit
c18117a129
@ -291,7 +291,7 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!*input && tei->InterfaceIncludeDirectories.empty())
|
||||
if ((input && !*input) && tei->InterfaceIncludeDirectories.empty())
|
||||
{
|
||||
// Set to empty
|
||||
properties[propName] = "";
|
||||
|
@ -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
|
||||
|
4
Tests/ExportImport/Export/empty.cpp
Normal file
4
Tests/ExportImport/Export/empty.cpp
Normal file
@ -0,0 +1,4 @@
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
int empty() { return 0; }
|
Loading…
x
Reference in New Issue
Block a user