summaryrefslogtreecommitdiffstats
path: root/cmake/QtInternalTargets.cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-05-21 10:22:04 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-05-21 16:05:44 +0200
commit715041b663ababa8b36f90978d20bdcdd80e3117 (patch)
tree6482cf74c32d6b01f37bcef1bf40537078bc396f /cmake/QtInternalTargets.cmake
parentf1983dcdf6c596f901694ad16dcd3c74c77f4c13 (diff)
Enable UNICODE for all Qt targets and Qt consumers by default
After discussion we decided to opt-out the UNICODE definintion behavior. To disable UNICODE in user projects the qt6_disable_unicode_defines function could be used. Amends 5b64e5950cf984abb7d47e0802bcb4b5a21e06fa [ChangeLog][CMake] Enables the UNICODE and _UNICODE definitions on WIN32 platforms by default for all cmake projects to reflect the qmake behavior. Use qt6_disable_unicode_defines function to disable the default unicode definitions. Pick-to: 6.1 Fixes: QTBUG-93895 Change-Id: Id70ff7dcf8c74f660ec851f8b950e1e3b94d9fb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtInternalTargets.cmake')
-rw-r--r--cmake/QtInternalTargets.cmake13
1 files changed, 5 insertions, 8 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index 006c0c0213..c10cd285e9 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -148,14 +148,11 @@ elseif(UIKIT)
target_compile_definitions(PlatformCommonInternal INTERFACE GLES_SILENCE_DEPRECATION)
endif()
-if(WIN32)
- target_compile_definitions(PlatformCommonInternal INTERFACE "UNICODE;_UNICODE")
- if(MSVC)
- target_compile_definitions(PlatformCommonInternal INTERFACE
- "_CRT_SECURE_NO_WARNINGS"
- "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:_WINDLL>"
- )
- endif()
+if(MSVC)
+ target_compile_definitions(PlatformCommonInternal INTERFACE
+ "_CRT_SECURE_NO_WARNINGS"
+ "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:_WINDLL>"
+ )
endif()
if(UIKIT)