Genex: Fix processing multiple include directories for relative paths
Re-insert the semicolon which was removed during splitting.
Commit d777b8e7
(Genex: Allow relative paths in INSTALL_INTERFACE.,
2013-07-25) introduced the prefixItems method to allow relative paths
in the argument of the INSTALL_INTERFACE expression. That method was
buggy in that it did not re-introduce the semicolon separator in
the result.
This bug also affects paths which are already absolute in user code.
This commit is contained in:
parent
5b98d09e80
commit
6f98f4ac92
|
@ -238,9 +238,12 @@ static void prefixItems(const std::string &content, std::string &result,
|
||||||
{
|
{
|
||||||
std::vector<std::string> entries;
|
std::vector<std::string> entries;
|
||||||
cmGeneratorExpression::Split(content, entries);
|
cmGeneratorExpression::Split(content, entries);
|
||||||
|
const char *sep = "";
|
||||||
for(std::vector<std::string>::const_iterator ei = entries.begin();
|
for(std::vector<std::string>::const_iterator ei = entries.begin();
|
||||||
ei != entries.end(); ++ei)
|
ei != entries.end(); ++ei)
|
||||||
{
|
{
|
||||||
|
result += sep;
|
||||||
|
sep = ";";
|
||||||
if (!cmSystemTools::FileIsFullPath(ei->c_str())
|
if (!cmSystemTools::FileIsFullPath(ei->c_str())
|
||||||
&& cmGeneratorExpression::Find(*ei) == std::string::npos)
|
&& cmGeneratorExpression::Find(*ei) == std::string::npos)
|
||||||
{
|
{
|
||||||
|
|
|
@ -159,7 +159,7 @@ set_property(TARGET testLibRequired APPEND PROPERTY
|
||||||
$<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
|
$<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
|
||||||
# Test that the below is non-fatal
|
# Test that the below is non-fatal
|
||||||
$<$<STREQUAL:one,two>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
|
$<$<STREQUAL:one,two>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
|
||||||
$<INSTALL_INTERFACE:include/testLibIncludeRequired7>
|
$<INSTALL_INTERFACE:include/testLibIncludeRequired7;include/testLibIncludeRequired4>
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(TARGET testLibRequired APPEND PROPERTY
|
set_property(TARGET testLibRequired APPEND PROPERTY
|
||||||
|
|
Loading…
Reference in New Issue