From 727bd94560ca9056cdbe40fe2e7923ed008b6eac Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 20 Nov 2023 20:12:02 +0100 Subject: Add commandline conversion for Windows (no-op on other platforms) - add Fl::args_to_utf8() to convert commandline arguments to UTF-8 This new function closes the gap that previously only Visual Studio applications converted their commandlines to UTF-8. Tested with MinGW, MSYS2/MinGW-w64, and Visual Studio (2019). --- src/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 393e06f6e..a32319889 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -578,9 +578,14 @@ list (APPEND SHARED_FILES ${HEADER_FILES} ${DRIVER_HEADER_FILES}) set (STATIC_FILES ${SHARED_FILES}) -if (MSVC) +# Visual Studio (MSVC) is known to need WinMain() and maybe BORLAND +# needs it as well, hence we include it on all Windows platforms. +# The GNU compilers (MinGW, MSYS2, Cygwin) disable compilation inside +# the source file which is what we finally want and need. + +if (WIN32) list (APPEND STATIC_FILES fl_call_main.c) -endif (MSVC) +endif () ####################################################################### -- cgit v1.2.3