summaryrefslogtreecommitdiffstats
path: root/Modules/FindGTK2.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-08-09 08:39:46 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 14:30:12 (GMT)
commit4b47586a08741c530386f08be77b5da870bc130a (patch)
tree59ab7c615e27bb076e4ccab7eefc4004b7beecbe /Modules/FindGTK2.cmake
parent61242ccc8f08594c51cfe1a7b699feedb0d666ad (diff)
downloadCMake-4b47586a08741c530386f08be77b5da870bc130a.zip
CMake-4b47586a08741c530386f08be77b5da870bc130a.tar.gz
CMake-4b47586a08741c530386f08be77b5da870bc130a.tar.bz2
FindGTK2: Add check to ensure that target exists
Diffstat (limited to 'Modules/FindGTK2.cmake')
-rw-r--r--Modules/FindGTK2.cmake12
1 files changed, 7 insertions, 5 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index e20593e..3f912bb 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -456,11 +456,13 @@ function(_GTK2_ADD_TARGET_DEPENDS _var)
string(TOLOWER "${_var}" _basename)
- get_target_property(_configs GTK2::${_basename} IMPORTED_CONFIGURATIONS)
- _GTK2_ADD_TARGET_DEPENDS_INTERNAL(${_var} INTERFACE_LINK_LIBRARIES ${ARGN})
- foreach(_config ${_configs})
- _GTK2_ADD_TARGET_DEPENDS_INTERNAL(${_var} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
- endforeach()
+ if(TARGET GTK2::${_basename})
+ get_target_property(_configs GTK2::${_basename} IMPORTED_CONFIGURATIONS)
+ _GTK2_ADD_TARGET_DEPENDS_INTERNAL(${_var} INTERFACE_LINK_LIBRARIES ${ARGN})
+ foreach(_config ${_configs})
+ _GTK2_ADD_TARGET_DEPENDS_INTERNAL(${_var} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
+ endforeach()
+ endif()
endfunction()
function(_GTK2_ADD_TARGET_INCLUDE_DIRS _var)