summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-28 13:52:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-08-28 13:52:27 (GMT)
commit39889d778eaf87fbd095fc1781a0d421639041d4 (patch)
tree3a4df2198f465d3bcbba7e35fe8d0885e574f33c /Modules
parent3e5175447b8282fcd484306d304afe2a05745cb7 (diff)
parent33161f489c5d90c314335205fbc1cec7cba6eae8 (diff)
downloadCMake-39889d778eaf87fbd095fc1781a0d421639041d4.zip
CMake-39889d778eaf87fbd095fc1781a0d421639041d4.tar.gz
CMake-39889d778eaf87fbd095fc1781a0d421639041d4.tar.bz2
Merge topic 'FindQt4-do-not-assume-all-libraries-are-frameworks'
33161f48 FindQt4: Do not assume all libraries are frameworks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1169
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt4.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index b0c49e5..c67d0be 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -355,19 +355,21 @@ macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
if (QT_${basename}_LIBRARY_RELEASE)
set_property(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
- if(QT_USE_FRAMEWORKS)
- set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}/${_camelCaseBasename}" )
+ set(_location "${QT_${basename}_LIBRARY_RELEASE}")
+ if(QT_USE_FRAMEWORKS AND EXISTS ${_location}/${_camelCaseBasename})
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${_location}/${_camelCaseBasename}" )
else()
- set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}" )
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${_location}" )
endif()
endif ()
if (QT_${basename}_LIBRARY_DEBUG)
set_property(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
- if(QT_USE_FRAMEWORKS)
- set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}/${_camelCaseBasename}" )
+ set(_location "${QT_${basename}_LIBRARY_DEBUG}")
+ if(QT_USE_FRAMEWORKS AND EXISTS ${_location}/${_camelCaseBasename})
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${_location}/${_camelCaseBasename}" )
else()
- set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${_location}" )
endif()
endif ()
set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY