summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2023-11-19 19:08:53 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2023-11-19 19:08:53 +0100
commit7e8994c4a295e8709d4940656248c231de62a8a6 (patch)
tree31e8ba9ed537971b67dcad9a6212de5d984b2dfb /src/CMakeLists.txt
parenta72eff7588440a95ed49119cb348673cd000fc8c (diff)
Windows/MSVC: Fix wide char commandline handling (#840)
Windows programs (subsystem:windows, not Windows console programs) compiled with Visual Studio need a WinMain entry point. The commandline arguments handled by this function are now properly converted to UTF-8 before the standard main() entry point is called. This applies only to Visual Studio! Note that some build systems like MinGW and/or MSYS2 may still have issues with some Unicode (non-ASCII) commandline arguments.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3e951467e..393e06f6e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -578,9 +578,9 @@ list (APPEND SHARED_FILES ${HEADER_FILES} ${DRIVER_HEADER_FILES})
set (STATIC_FILES ${SHARED_FILES})
-if (WIN32)
+if (MSVC)
list (APPEND STATIC_FILES fl_call_main.c)
-endif (WIN32)
+endif (MSVC)
#######################################################################