[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 55/411: CMake: add option to enable Unicode on Windows
From: |
gnunet |
Subject: |
[gnurl] 55/411: CMake: add option to enable Unicode on Windows |
Date: |
Wed, 13 Jan 2021 01:17:50 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 95aea798dbd785c4daee2b2e24f2c8c94f3e3cf4
Author: Marcel Raad <Marcel.Raad@teamviewer.com>
AuthorDate: Sat Aug 22 10:04:29 2020 +0200
CMake: add option to enable Unicode on Windows
As already existing for winbuild.
Closes https://github.com/curl/curl/pull/5843
---
CMakeLists.txt | 7 +++++++
src/CMakeLists.txt | 6 ++++++
2 files changed, 13 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68842ee3e..6388015d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,7 @@ option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
if(WIN32)
option(CURL_STATIC_CRT "Set to ON to build libcurl with static CRT on
Windows (/MT)." OFF)
option(ENABLE_INET_PTON "Set to OFF to prevent usage of inet_pton when
building against modern SDKs while still requiring compatibility with older
Windows versions, such as Windows XP, Windows Server 2003 etc." ON)
+ option(ENABLE_UNICODE "Set to ON to use the Unicode version of the Windows
API functions" OFF)
set(CURL_TARGET_WINDOWS_VERSION "" CACHE STRING "Minimum target Windows
version as hex string")
if(CURL_TARGET_WINDOWS_VERSION)
add_definitions(-D_WIN32_WINNT=${CURL_TARGET_WINDOWS_VERSION})
@@ -92,6 +93,12 @@ if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0501)
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}
-D_WIN32_WINNT=0x0501")
endif()
+ if(ENABLE_UNICODE)
+ add_definitions(-DUNICODE -D_UNICODE)
+ if(MINGW)
+ add_compile_options(-municode)
+ endif()
+ endif()
endif()
option(CURL_LTO "Turn on compiler Link Time Optimizations" OFF)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 26e3cfe1e..b994ae961 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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})
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 69/411: optiontable: use DEBUGBUILD, (continued)
- [gnurl] 69/411: optiontable: use DEBUGBUILD, gnunet, 2021/01/12
- [gnurl] 37/411: HTTP/3: update to OpenSSL_1_1_1g-quic-draft-29, gnunet, 2021/01/12
- [gnurl] 11/411: sftp: add new quote commands 'atime' and 'mtime', gnunet, 2021/01/12
- [gnurl] 40/411: scripts: improve the "get latest curl release tag" logic, gnunet, 2021/01/12
- [gnurl] 52/411: tests: add test1912 with typechecks, gnunet, 2021/01/12
- [gnurl] 61/411: buildconf: exec autoreconf to avoid additional process, gnunet, 2021/01/12
- [gnurl] 72/411: copyright.pl: ignore buildconf, gnunet, 2021/01/12
- [gnurl] 62/411: conn: check for connection being dead before reuse, gnunet, 2021/01/12
- [gnurl] 45/411: docs: non-existing macros in man pages, gnunet, 2021/01/12
- [gnurl] 38/411: options: API for meta-data about easy options, gnunet, 2021/01/12
- [gnurl] 55/411: CMake: add option to enable Unicode on Windows,
gnunet <=
- [gnurl] 60/411: CI/azure: no longer ignore results of test 1013, gnunet, 2021/01/12
- [gnurl] 56/411: AppVeyor: switch 64-bit Schannel Debug CMake builds to Unicode, gnunet, 2021/01/12
- [gnurl] 47/411: TLS: fix SRP detection by using the proper #ifdefs, gnunet, 2021/01/12
- [gnurl] 83/411: mqtt.c: avoid curl_ prefix on local variable, gnunet, 2021/01/12
- [gnurl] 78/411: hash: make it 'struct Curl_hash', gnunet, 2021/01/12
- [gnurl] 111/411: configure: let --enable-debug set -Wenum-conversion with gcc >= 10, gnunet, 2021/01/12
- [gnurl] 123/411: docs/LICENSE-MIXING: remove, gnunet, 2021/01/12
- [gnurl] 50/411: sockfilt: handle FD_CLOSE winsock event on write socket, gnunet, 2021/01/12
- [gnurl] 51/411: easyoptions: provide debug function when DEBUGBUILD, gnunet, 2021/01/12
- [gnurl] 36/411: RELEASE-NOTES: synced, gnunet, 2021/01/12