CMake: add option to enable Unicode on Windows

As already existing for winbuild.

Closes https://github.com/curl/curl/pull/5843
This commit is contained in:
Marcel Raad 2020-08-22 10:04:29 +02:00
parent 05729b66c5
commit 95aea798db
2 changed files with 13 additions and 0 deletions

View file

@ -78,6 +78,12 @@ if(CURL_HAS_LTO)
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
endif()
if(ENABLE_UNICODE AND MINGW)
target_link_libraries(${EXE_NAME} -municode)
# GCC doesn't know about wmain
set_source_files_properties(tool_main.c PROPERTIES COMPILE_FLAGS "-Wno-missing-prototypes -Wno-missing-declarations")
endif()
source_group("curlX source files" FILES ${CURLX_CFILES})
source_group("curl source files" FILES ${CURL_CFILES})
source_group("curl header files" FILES ${CURL_HFILES})