Commit 947b02e2 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'export-genex-under-prefix'

3ded5b6d install,export: Fix export of a genex following $<INSTALL_PREFIX>
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3886
parents a023a2e4 3ded5b6d
......@@ -216,6 +216,9 @@ static bool checkInterfaceDirs(const std::string& prepro,
if (genexPos == 0) {
continue;
}
if (cmHasLiteralPrefix(li, "${_IMPORT_PREFIX}")) {
continue;
}
MessageType messageType = MessageType::FATAL_ERROR;
std::ostringstream e;
if (genexPos != std::string::npos) {
......@@ -237,9 +240,6 @@ static bool checkInterfaceDirs(const std::string& prepro,
hadFatalError = true;
}
}
if (cmHasLiteralPrefix(li, "${_IMPORT_PREFIX}")) {
continue;
}
if (!cmSystemTools::FileIsFullPath(li)) {
/* clang-format off */
e << "Target \"" << target->GetName() << "\" " << prop <<
......
......@@ -313,6 +313,8 @@ install(FILES
)
cmake_policy(POP)
cmake_policy(PUSH)
cmake_policy(SET CMP0041 NEW)
add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp)
set_property(TARGET testSharedLibDepends APPEND PROPERTY
INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}"
......@@ -329,9 +331,10 @@ install(FILES
DESTINATION include/testSharedLibDepends
)
set_property(TARGET testSharedLibDepends APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/testSharedLibDepends>"
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/$<1:include>/testSharedLibDepends>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
)
cmake_policy(POP)
# LINK_PRIVATE because the LINK_INTERFACE_LIBRARIES is specified above.
target_link_libraries(testSharedLibDepends LINK_PRIVATE testSharedLibRequired)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment