From 748f1eaee3b834008837d0b43d23ee8b052e9403 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Wed, 8 Jul 2015 10:49:22 +0200 Subject: FindIce: create imported targets for components --- Modules/FindIce.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) 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() -- cgit v0.12 From cd4d2e9c79356be9ec6a0fe2b3ec3731254bb9ef Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Thu, 9 Jul 2015 10:55:09 +0100 Subject: FindIce: document imported targets --- Modules/FindIce.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index 6a06e2f..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:: +# +# Where ```` is the name of an Ice component, for example +# ``Ice::Glacier2``. +# # Ice slice programs are reported in:: # # Ice_SLICE2CPP_EXECUTABLE - path to slice2cpp executable -- cgit v0.12 From 889b22e2cab163be390d7856ef2939b9e2143ad3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 9 Jul 2015 09:48:15 -0400 Subject: Help: Add notes for topic 'FindIce-imported-targets' --- Help/release/dev/FindIce-imported-targets.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Help/release/dev/FindIce-imported-targets.rst diff --git a/Help/release/dev/FindIce-imported-targets.rst b/Help/release/dev/FindIce-imported-targets.rst new file mode 100644 index 0000000..7e1b2f4 --- /dev/null +++ b/Help/release/dev/FindIce-imported-targets.rst @@ -0,0 +1,4 @@ +FindIce-imported-targets +------------------------ + +* The :module:`FindIce` module now provides imported targets. -- cgit v0.12