diff options
author | Brad King <brad.king@kitware.com> | 2015-07-10 12:51:12 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-07-10 12:51:12 (GMT) |
commit | ef39edc303895c06083cdedf72c002f51a999d4a (patch) | |
tree | 25bad74ae934992321f821dbdc693e14b211d60d /Modules | |
parent | 2ffa8ae29c3caa192eed47399c87680af09d08f0 (diff) | |
parent | 889b22e2cab163be390d7856ef2939b9e2143ad3 (diff) | |
download | CMake-ef39edc303895c06083cdedf72c002f51a999d4a.zip CMake-ef39edc303895c06083cdedf72c002f51a999d4a.tar.gz CMake-ef39edc303895c06083cdedf72c002f51a999d4a.tar.bz2 |
Merge topic 'FindIce-imported-targets'
889b22e2 Help: Add notes for topic 'FindIce-imported-targets'
cd4d2e9c FindIce: document imported targets
748f1eae FindIce: create imported targets for components
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindIce.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index c88c1b8..3fa6cab 100644 --- a/Modules/FindIce.cmake +++ b/Modules/FindIce.cmake @@ -20,6 +20,13 @@ # Ice_SLICE_DIRS - the directories containing the Ice slice interface # definitions # +# Imported targets:: +# +# Ice::<C> +# +# Where ``<C>`` is the name of an Ice component, for example +# ``Ice::Glacier2``. +# # Ice slice programs are reported in:: # # Ice_SLICE2CPP_EXECUTABLE - path to slice2cpp executable @@ -433,13 +440,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() |