diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-03-24 20:18:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-03-26 14:45:07 (GMT) |
commit | af81a3c31b206633742eb13d41c54a9bc807ffea (patch) | |
tree | b309b37bc371f153819eeffb909b586eb89b74dc /Tests/ExportImport/Export | |
parent | ddbe2e1d7da460684e4d81fc8b3f69510f87b78e (diff) | |
download | CMake-af81a3c31b206633742eb13d41c54a9bc807ffea.zip CMake-af81a3c31b206633742eb13d41c54a9bc807ffea.tar.gz CMake-af81a3c31b206633742eb13d41c54a9bc807ffea.tar.bz2 |
install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIES
Check that source and binary directories are not part of the
INTERFACE_INCLUDE_DIRECTORIES for installed IMPORTED targets.
This is limited to directories which do not contain generator
expressions to evaluate. Such paths can only be checked at time
of use of the imported target, which will be done in a follow up
patch.
Diffstat (limited to 'Tests/ExportImport/Export')
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index cdf67c2..be48483 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -174,9 +174,14 @@ set_property(TARGET testSharedLibRequired set_property(TARGET testSharedLibRequired APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}" ) +install(FILES + "${CMAKE_CURRENT_SOURCE_DIR}/testSharedLibRequired.h" + "${CMAKE_CURRENT_BINARY_DIR}/testsharedlibrequired_export.h" + DESTINATION include/testSharedLibRequired +) set_property(TARGET testSharedLibRequired APPEND PROPERTY - INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}" + INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/testSharedLibRequired>" + "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" ) set_property(TARGET testSharedLibRequired APPEND PROPERTY @@ -205,6 +210,15 @@ set_property(TARGET testSharedLibDepends APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:testSharedLibRequired,INTERFACE_INCLUDE_DIRECTORIES> ) +install(FILES + "${CMAKE_CURRENT_SOURCE_DIR}/testSharedLibDepends.h" + "${CMAKE_CURRENT_BINARY_DIR}/testsharedlibdepends_export.h" + DESTINATION include/testSharedLibDepends +) +set_property(TARGET testSharedLibDepends APPEND PROPERTY + INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/testSharedLibDepends>" + "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" +) set_property(TARGET testSharedLibDepends APPEND PROPERTY LINK_INTERFACE_LIBRARIES $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:$<TARGET_NAME:testSharedLibRequired>> |