CMake: Fix use of compile define QT_NO_DEBUG
Prior to this patch QT_NO_DEBUG would not be correctly set for generators which support multiple configurations such as Visual Studio and XCode. This patch also applies the define to all executables, which was previously missing. Change-Id: I16a911d15217a62093c68ba2b4c2545cdb8df1e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
a75d610d5f
commit
f03a51a404
@ -2534,7 +2534,7 @@ function(qt_add_executable name)
|
||||
SOURCES ${arg_SOURCES}
|
||||
INCLUDE_DIRECTORIES ${private_includes}
|
||||
DEFINES ${arg_DEFINES}
|
||||
LIBRARIES ${arg_LIBRARIES}
|
||||
LIBRARIES ${arg_LIBRARIES} Qt::PlatformCommonInternal
|
||||
PUBLIC_LIBRARIES ${extra_libraries} ${arg_PUBLIC_LIBRARIES}
|
||||
DBUS_ADAPTOR_SOURCES "${arg_DBUS_ADAPTOR_SOURCES}"
|
||||
DBUS_ADAPTOR_FLAGS "${arg_DBUS_ADAPTOR_FLAGS}"
|
||||
|
@ -97,9 +97,7 @@ 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()
|
||||
target_compile_definitions(PlatformCommonInternal INTERFACE $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
|
||||
|
||||
if(APPLE_UIKIT)
|
||||
# Do what mkspecs/features/uikit/default_pre.prf does, aka enable sse2 for
|
||||
|
Loading…
x
Reference in New Issue
Block a user