Add PlatformCommonInternal target and QT_NO_DEBUG definition
All the other PlatformModuleInternal, PlatformPluginInternal, PlatformToolInternal target will depend on the common one. Also add the QT_NO_DEBUG definition when the build type is not Debug. This fixes the lookup of the Qt platform plugin on macOS, which uses a "_debug" prefix in the plugin name depending on if the QT_NO_DEBUG definition is present or not. This is the same as it is done in mkspecs/features/qt.prf. Change-Id: I82cf461d44b8a3b3c5dc2b2d9f25baa246fc1e4b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
cccc9fc59b
commit
1a2a3b72bf
@ -91,10 +91,16 @@ target_include_directories(GlobalConfigPrivate INTERFACE
|
||||
)
|
||||
add_library(Qt::GlobalConfigPrivate ALIAS GlobalConfigPrivate)
|
||||
|
||||
# defines PlatformModuleInternal PlatformPluginInternal PlatformToolInternal
|
||||
# defines PlatformCommonInternal PlatformModuleInternal PlatformPluginInternal PlatformToolInternal
|
||||
include(QtInternalTargets)
|
||||
|
||||
set(__export_targets Platform GlobalConfig GlobalConfigPrivate PlatformModuleInternal PlatformPluginInternal PlatformToolInternal)
|
||||
set(__export_targets Platform
|
||||
GlobalConfig
|
||||
GlobalConfigPrivate
|
||||
PlatformCommonInternal
|
||||
PlatformModuleInternal
|
||||
PlatformPluginInternal
|
||||
PlatformToolInternal)
|
||||
set(__export_name "${INSTALL_CMAKE_NAMESPACE}Targets")
|
||||
qt_install(TARGETS ${__export_targets} EXPORT "${__export_name}")
|
||||
qt_install(EXPORT ${__export_name}
|
||||
|
@ -57,14 +57,20 @@ function(qt_internal_set_warnings_are_errors_flags target)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_library(PlatformCommonInternal INTERFACE)
|
||||
add_library(Qt::PlatformCommonInternal ALIAS PlatformCommonInternal)
|
||||
|
||||
add_library(PlatformModuleInternal INTERFACE)
|
||||
add_library(Qt::PlatformModuleInternal ALIAS PlatformModuleInternal)
|
||||
target_link_libraries(PlatformModuleInternal INTERFACE PlatformCommonInternal)
|
||||
|
||||
add_library(PlatformPluginInternal INTERFACE)
|
||||
add_library(Qt::PlatformPluginInternal ALIAS PlatformPluginInternal)
|
||||
target_link_libraries(PlatformPluginInternal INTERFACE PlatformCommonInternal)
|
||||
|
||||
add_library(PlatformToolInternal INTERFACE)
|
||||
add_library(Qt::PlatformToolInternal ALIAS PlatformToolInternal)
|
||||
target_link_libraries(PlatformToolInternal INTERFACE PlatformCommonInternal)
|
||||
|
||||
if(WARNINGS_ARE_ERRORS)
|
||||
qt_internal_set_warnings_are_errors_flags(PlatformModuleInternal)
|
||||
@ -86,3 +92,7 @@ endif()
|
||||
if (ANDROID)
|
||||
target_link_options(PlatformModuleInternal INTERFACE -fuse-ld=lld)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
target_compile_definitions(PlatformCommonInternal INTERFACE QT_NO_DEBUG)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user