diff --git a/build/cmake/build.cfg.in b/build/cmake/build.cfg.in index ccec3108fa..a12f835981 100644 --- a/build/cmake/build.cfg.in +++ b/build/cmake/build.cfg.in @@ -4,7 +4,7 @@ WXVER_RELEASE=@wxRELEASE_NUMBER@ BUILD=@wxBUILD@ MONOLITHIC=@wxBUILD_MONOLITHIC_bf@ SHARED=@wxBUILD_SHARED_bf@ -UNICODE=@wxUSE_UNICODE_bf@ +UNICODE=1 TOOLKIT=@wxBUILD_TOOLKIT_UPPER@ TOOLKIT_VERSION=@wxTOOLKIT_VERSION@ WXUNIV=@wxUNIV@ diff --git a/build/cmake/build_cfg.cmake b/build/cmake/build_cfg.cmake index 9de219c29c..dbe7932d41 100644 --- a/build/cmake/build_cfg.cmake +++ b/build/cmake/build_cfg.cmake @@ -18,7 +18,6 @@ endmacro() wx_buildfile_var(wxBUILD_MONOLITHIC) wx_buildfile_var(wxBUILD_SHARED) -wx_buildfile_var(wxUSE_UNICODE) wx_buildfile_var(wxUSE_EXCEPTIONS) wx_buildfile_var(wxUSE_THREADS) wx_buildfile_var(wxUSE_AUI) diff --git a/build/cmake/config.cmake b/build/cmake/config.cmake index 983bd92e6c..5197df82cb 100644 --- a/build/cmake/config.cmake +++ b/build/cmake/config.cmake @@ -106,13 +106,8 @@ function(wx_write_config) else() set(SHARED 0) endif() - if(wxUSE_UNICODE) - set(WX_CHARTYPE unicode) - set(lib_unicode_suffix u) - else() - set(WX_CHARTYPE ansi) - set(lib_unicode_suffix) - endif() + set(WX_CHARTYPE unicode) + set(lib_unicode_suffix u) if(CMAKE_CROSSCOMPILING) set(cross_compiling yes) set(host_alias ${CMAKE_SYSTEM_NAME}) diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake index 05a428e495..4aa09256de 100644 --- a/build/cmake/functions.cmake +++ b/build/cmake/functions.cmake @@ -190,9 +190,7 @@ function(wx_set_target_properties target_name) endif() set(lib_unicode) - if(wxUSE_UNICODE) - set(lib_unicode "u") - endif() + set(lib_unicode "u") set(lib_rls) set(lib_dbg) @@ -285,12 +283,10 @@ function(wx_set_target_properties target_name) target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=1 wxUSE_BASE=0) endif() - if(wxUSE_UNICODE) - if(WIN32) - target_compile_definitions(${target_name} PUBLIC UNICODE) - endif() - target_compile_definitions(${target_name} PUBLIC _UNICODE) + if(WIN32) + target_compile_definitions(${target_name} PUBLIC UNICODE) endif() + target_compile_definitions(${target_name} PUBLIC _UNICODE) if(WIN32 AND MSVC) # Suppress deprecation warnings for standard library calls @@ -510,7 +506,7 @@ endmacro() # Set common properties for a builtin third party library function(wx_set_builtin_target_properties target_name) set(lib_unicode) - if(wxUSE_UNICODE AND target_name STREQUAL "wxregex") + if(target_name STREQUAL "wxregex") set(lib_unicode "u") endif() @@ -532,12 +528,10 @@ function(wx_set_builtin_target_properties target_name) OUTPUT_NAME_DEBUG "${target_name}${lib_unicode}${lib_dbg}${lib_flavour}${lib_version}" ) - if(wxUSE_UNICODE) - if(WIN32) - target_compile_definitions(${target_name} PUBLIC UNICODE) - endif() - target_compile_definitions(${target_name} PUBLIC _UNICODE) + if(WIN32) + target_compile_definitions(${target_name} PUBLIC UNICODE) endif() + target_compile_definitions(${target_name} PUBLIC _UNICODE) if(MSVC) # we're not interested in deprecation warnings about the use of diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index 9a6dc6a59f..cf66ec1b0f 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -113,11 +113,7 @@ endif() # Build wxBUILD_FILE_ID used for config and setup path #TODO: build different id for WIN32 set(wxBUILD_FILE_ID "${wxBUILD_TOOLKIT}${wxBUILD_WIDGETSET}-") -if(wxUSE_UNICODE) - wx_string_append(wxBUILD_FILE_ID "unicode") -else() - wx_string_append(wxBUILD_FILE_ID "ansi") -endif() +wx_string_append(wxBUILD_FILE_ID "unicode") if(NOT wxBUILD_SHARED) wx_string_append(wxBUILD_FILE_ID "-static") endif() @@ -164,11 +160,7 @@ if(wxBUILD_CUSTOM_SETUP_HEADER_PATH) else() # Set path where setup.h will be created if(WIN32_MSVC_NAMING) - if(wxUSE_UNICODE) - set(lib_unicode u) - else() - set(lib_unicode) - endif() + set(lib_unicode u) set(wxSETUP_HEADER_PATH ${wxOUTPUT_DIR}/${wxPLATFORM_LIB_DIR}/${wxBUILD_TOOLKIT}${lib_unicode}) file(MAKE_DIRECTORY ${wxSETUP_HEADER_PATH}/wx) diff --git a/build/cmake/lib/webview/CMakeLists.txt b/build/cmake/lib/webview/CMakeLists.txt index 1b7ebb0a90..161a487336 100644 --- a/build/cmake/lib/webview/CMakeLists.txt +++ b/build/cmake/lib/webview/CMakeLists.txt @@ -118,10 +118,7 @@ if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2) set_target_properties(wxwebkit2_ext PROPERTIES NO_SONAME 1) # Change output name to match expected name in webview_webkit2.cpp: webkit2_ext* - set(lib_unicode) - if(wxUSE_UNICODE) - set(lib_unicode "u") - endif() + set(lib_unicode "u") set(lib_rls) set(lib_dbg) diff --git a/build/cmake/main.cmake b/build/cmake/main.cmake index a87aeeeab1..7cd37756e3 100644 --- a/build/cmake/main.cmake +++ b/build/cmake/main.cmake @@ -87,6 +87,5 @@ message(STATUS "Configured wxWidgets ${wxVERSION} for ${CMAKE_SYSTEM} Which GUI toolkit should wxWidgets use? ${wxBUILD_TOOLKIT} ${wxTOOLKIT_VERSION} ${wxTOOLKIT_DESC} Should wxWidgets be compiled into single library? ${wxBUILD_MONOLITHIC} Should wxWidgets be linked as a shared library? ${wxBUILD_SHARED} - Should wxWidgets support Unicode? ${wxUSE_UNICODE} Which wxWidgets API compatibility should be used? ${wxBUILD_COMPATIBILITY}" ) diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index 36ea1de271..593f3ac8d2 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -80,7 +80,6 @@ wx_option(wxUSE_STL "use standard C++ classes for everything" OFF) set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_STL "use C++ STL classes") wx_dependent_option(wxUSE_STD_CONTAINERS "use standard C++ container classes" ON "wxUSE_STL" OFF) -wx_option(wxUSE_UNICODE "compile with Unicode support (NOT RECOMMENDED to be turned off)") if(NOT WIN32) wx_option(wxUSE_UNICODE_UTF8 "use UTF-8 representation for strings (Unix only)" OFF) wx_dependent_option(wxUSE_UTF8_LOCALE_ONLY "only support UTF-8 locales in UTF-8 build (Unix only)" ON "wxUSE_UNICODE_UTF8" OFF) @@ -97,7 +96,7 @@ wx_option(wxUSE_REPRODUCIBLE_BUILD "enable reproducable build" OFF) # external libraries # --------------------------------------------------------------------------- set(PCRE2_CODE_UNIT_WIDTH 8) -if(wxUSE_UNICODE AND (NOT DEFINED wxUSE_UNICODE_UTF8 OR NOT wxUSE_UNICODE_UTF8)) +if(NOT DEFINED wxUSE_UNICODE_UTF8 OR NOT wxUSE_UNICODE_UTF8) # This is also checked in setup.cmake, but setup.cmake will run after options.cmake. include(CheckTypeSize) check_type_size(wchar_t SIZEOF_WCHAR_T)