CMake: Don't apply invalid infixes to INTERFACE libraries

And object libraries.

Setting properties like IMPORT_SUFFIX on them doesn't make sense and
can cause configuration issues.

Amends 1bd408d6f7

Change-Id: Ie91d1fbc7ba130816854d50c5b00ef793e4bad1f
Reviewed-by: Martin Storsjö <martin@martin.st>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2021-05-26 11:27:11 +02:00
parent 93cd9130d6
commit 6dd1b66517

View File

@ -1877,7 +1877,9 @@ function(_qt_internal_add_library target)
add_library(${target} ${type_to_create} ${arg_UNPARSED_ARGUMENTS})
_qt_internal_apply_win_prefix_and_suffix("${target}")
if(NOT type_to_create STREQUAL "INTERFACE" AND NOT type_to_create STREQUAL "OBJECT")
_qt_internal_apply_win_prefix_and_suffix("${target}")
endif()
if(arg_MODULE AND APPLE)
# CMake defaults to using .so extensions for loadable modules, aka plugins,