From 3595613a0a285120b1c475e7c350a0de871e89aa Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 15 Jul 2021 13:04:15 +0200 Subject: CMake: Don't propagate -fapplication-extension to user projects Both the compiler and linker -fapplication-extension flag should only be applied when building Qt's libraries (not executables). It's up to the user project whether their code will be restricted with application-extension-only APIs. In qmake that can be achieved by adding to the qmake project CONFIG += app_extension_api_only In CMake it can be achieved by either adding the compiler and link flags in the project directly (using target_X_options) or by setting the appropriate setting in the Xcode project when using the Xcode generator. Amends e189126f1ae1d2fa2ad0f95ee2c4aa72c770a97b Pick-to: 6.2 Task-number: QTBUG-95199 Change-Id: Ie7a764d460a89c7650391abff0fcc5abfcabef64 Reviewed-by: Qt CI Bot Reviewed-by: Joerg Bornemann --- cmake/Qt3rdPartyLibraryHelpers.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'cmake/Qt3rdPartyLibraryHelpers.cmake') diff --git a/cmake/Qt3rdPartyLibraryHelpers.cmake b/cmake/Qt3rdPartyLibraryHelpers.cmake index 059213f5f2..f2b3882fc7 100644 --- a/cmake/Qt3rdPartyLibraryHelpers.cmake +++ b/cmake/Qt3rdPartyLibraryHelpers.cmake @@ -50,6 +50,7 @@ function(qt_internal_add_common_qt_library_helper target) endif() _qt_internal_add_library(${target} ${arg_STATIC} ${arg_SHARED} ${arg_MODULE} ${arg_INTERFACE}) + qt_internal_mark_as_internal_library(${target}) endfunction() # Wrapper function to create a regular cmake target and forward all the -- cgit v1.2.3