Fixing Qt5CoreConfigExtras.cmake.in

The property INTERFACE_LINK_LIBRARIES has a single value
and is configuration independent.

Change-Id: I9130b1d0444563335825e3806f693a39f65ca67d
Reviewed-by: Stephen Kelly <steveire@gmail.com>
This commit is contained in:
Bjoern Thiel 2015-01-29 13:32:29 +01:00 committed by André Klitzing
parent 6f87e1b526
commit 9a950655fe

View File

@ -134,12 +134,12 @@ if (NOT TARGET Qt5::WinMain)
set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>)
set(_isPolicyNEW $<TARGET_POLICY:CMP0020>)
get_target_property(_configs Qt5::Core IMPORTED_CONFIGURATIONS)
set_property(TARGET Qt5::Core APPEND PROPERTY
INTERFACE_LINK_LIBRARIES
$<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain>
)
# For backward compatibility with CMake < 2.8.12
foreach(_config ${_configs})
set_property(TARGET Qt5::Core APPEND PROPERTY
INTERFACE_LINK_LIBRARIES
$<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain>
)
# For backward compatibility with CMake < 2.8.12
set_property(TARGET Qt5::Core APPEND PROPERTY
IMPORTED_LINK_INTERFACE_LIBRARIES_${_config}
$<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain>