summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-09 14:37:20 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-01-09 14:37:20 (GMT)
commit15562c11efa3c3a9e0f28f9ad52b71623c254b05 (patch)
tree24dfd93e75c0fb8bf618394d379d45cf2f458c49 /Modules/FindQt4.cmake
parent69c366a28178027a5cf2629c0240d1709ae9ab55 (diff)
parent73e93400e2efab2096618ff58a5ad68236cd04aa (diff)
downloadCMake-15562c11efa3c3a9e0f28f9ad52b71623c254b05.zip
CMake-15562c11efa3c3a9e0f28f9ad52b71623c254b05.tar.gz
CMake-15562c11efa3c3a9e0f28f9ad52b71623c254b05.tar.bz2
Merge topic 'policies'
73e9340 get_target_property: Error on non-existent target. ab9f58f FindQt4: Ensure target exists before calling get_target_property. 37ebeb9 FindQt4: Fix use of get_target_property to use actual target name. 6aabb6a Genex: Use case-sensitive comparison for COMPILER_ID. 5bb53f6 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake26
1 files changed, 15 insertions, 11 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 46d3741..46a893d 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1181,20 +1181,24 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endmacro()
macro(_qt4_add_target_depends _QT_MODULE)
- get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
- _qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN})
- foreach(_config ${_configs})
- _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
- endforeach()
- set(_configs)
+ if (TARGET Qt4::${_QT_MODULE})
+ get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
+ _qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN})
+ foreach(_config ${_configs})
+ _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
+ endforeach()
+ set(_configs)
+ endif()
endmacro()
macro(_qt4_add_target_private_depends _QT_MODULE)
- get_target_property(_configs ${_QT_MODULE} IMPORTED_CONFIGURATIONS)
- foreach(_config ${_configs})
- _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN})
- endforeach()
- set(_configs)
+ if (TARGET Qt4::${_QT_MODULE})
+ get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
+ foreach(_config ${_configs})
+ _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN})
+ endforeach()
+ set(_configs)
+ endif()
endmacro()