mirror of
https://github.com/reactos/CMake.git
synced 2025-02-02 18:12:52 +00:00
FindQt4: Do not assume all libraries are frameworks
Since on MacOSX not all modules are available as "framework" (e.g libQtUiTools.a), the assumption made in "FindQt4.cmake" is not always valid and systematically setting the imported libraries location to framework location is incorrect. This commit increases the robustness of the logic by first checking if the location exists. Fixes #17195
This commit is contained in:
parent
9a0a6f91ae
commit
33161f489c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user