diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2015-07-08 08:49:22 (GMT) |
---|---|---|
committer | Roger Leigh <rleigh@dundee.ac.uk> | 2015-07-09 10:32:36 (GMT) |
commit | 748f1eaee3b834008837d0b43d23ee8b052e9403 (patch) | |
tree | 7f5a95eb0eab54612d572b8246b75b5a62e6933e /Modules | |
parent | aa550e04f3e3a44db9ba02649f3b15929f3226a6 (diff) | |
download | CMake-748f1eaee3b834008837d0b43d23ee8b052e9403.zip CMake-748f1eaee3b834008837d0b43d23ee8b052e9403.tar.gz CMake-748f1eaee3b834008837d0b43d23ee8b052e9403.tar.bz2 |
FindIce: create imported targets for components
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindIce.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index c88c1b8..6a06e2f 100644 --- a/Modules/FindIce.cmake +++ b/Modules/FindIce.cmake @@ -433,13 +433,21 @@ if(Ice_FOUND) set(_Ice_component_cache "Ice_${_Ice_component_upcase}_LIBRARY") set(_Ice_component_lib "Ice_${_Ice_component_upcase}_LIBRARIES") set(_Ice_component_found "${_Ice_component_upcase}_FOUND") + set(_Ice_imported_target "Ice::${_Ice_component}") if(${_Ice_component_found}) set("${_Ice_component_lib}" "${${_Ice_component_cache}}") + if(NOT TARGET ${_Ice_imported_target}) + add_library(${_Ice_imported_target} UNKNOWN IMPORTED) + set_target_properties(${_Ice_imported_target} PROPERTIES + IMPORTED_LOCATION "${${_Ice_component_cache}}" + INTERFACE_INCLUDE_DIRECTORIES "${Ice_INCLUDE_DIR}") + endif() endif() unset(_Ice_component_upcase) unset(_Ice_component_cache) unset(_Ice_component_lib) unset(_Ice_component_found) + unset(_Ice_imported_target) endforeach() endif() |