CMake: Don't setup deployment when building Qt without examples
Introduce the variable QT_SKIP_SETUP_DEPLOYMENT to turn off the generation of deployment support files. Set this variable when building Qt - but only if we're not building examples. This avoids a warning about missing patchelf when building Qt with CMake < 3.21. Change-Id: I8ff5491eb314ff870c210884fbf90dd4c9ad0219 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
34d7dd908e
commit
9204ac23a0
@ -354,3 +354,8 @@ to ${FEATURE_${feature}}")
|
|||||||
Some features will be re-evaluated automatically.")
|
Some features will be re-evaluated automatically.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT QT_BUILD_EXAMPLES)
|
||||||
|
# Disable deployment setup to avoid warnings about missing patchelf with CMake < 3.21.
|
||||||
|
set(QT_SKIP_SETUP_DEPLOYMENT ON)
|
||||||
|
endif()
|
||||||
|
@ -2410,6 +2410,10 @@ endfunction()
|
|||||||
|
|
||||||
# Sets up the commands for use at install/deploy time
|
# Sets up the commands for use at install/deploy time
|
||||||
function(_qt_internal_setup_deploy_support)
|
function(_qt_internal_setup_deploy_support)
|
||||||
|
if(QT_SKIP_SETUP_DEPLOYMENT)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
get_property(cmake_role GLOBAL PROPERTY CMAKE_ROLE)
|
get_property(cmake_role GLOBAL PROPERTY CMAKE_ROLE)
|
||||||
if(NOT cmake_role STREQUAL "PROJECT")
|
if(NOT cmake_role STREQUAL "PROJECT")
|
||||||
return()
|
return()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user