CMake: Fix 'static' conditions

The pro2cmake script doesn't handle static scopes correctly, and the
generated "CONDITION static" must read "CONDITION NOT
QT_BUILD_SHARED_LIBS".

Change-Id: Ic5a5763e9fd5f5d04fb4c12227cbe85fac17b826
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Joerg Bornemann 2020-12-16 12:37:39 +01:00
parent 2eb77139a2
commit 1ec4a7eddc
2 changed files with 4 additions and 3 deletions

View File

@ -565,7 +565,7 @@ qt_internal_extend_target(Core CONDITION INTEGRITY
#)
# special case end
qt_internal_extend_target(Core CONDITION LINUX AND NOT static
qt_internal_extend_target(Core CONDITION LINUX AND QT_BUILD_SHARED_LIBS
SOURCES
global/minimum-linux_p.h
)
@ -582,7 +582,7 @@ qt_internal_extend_target(Core CONDITION LINUX AND NOT static
#### Keys ignored in scope 35:.:global:global/global.pri:silent:
# no_pch_assembler.commands = "@echo" "compiling[no_pch]" "${QMAKE_FILE_IN}" "&&"
qt_internal_extend_target(Core CONDITION LINUX AND NOT precompile_header AND NOT static
qt_internal_extend_target(Core CONDITION LINUX AND NOT precompile_header AND QT_BUILD_SHARED_LIBS
SOURCES
global/minimum-linux.S
)

View File

@ -34,7 +34,8 @@ qt_internal_extend_target(QXcbGlxIntegrationPlugin CONDITION QT_FEATURE_xcb_glx
XCB::GLX
)
qt_internal_extend_target(QXcbGlxIntegrationPlugin CONDITION QT_FEATURE_dlopen AND NOT static
qt_internal_extend_target(QXcbGlxIntegrationPlugin
CONDITION QT_FEATURE_dlopen AND QT_BUILD_SHARED_LIBS
PUBLIC_LIBRARIES
${CMAKE_DL_LIBS}
)