aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6e0f8010..25ad376c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -735,12 +735,12 @@ INCLUDE(cmake/FindICU.cmake)
FIND_PACKAGE(ICU QUIET)
-IF(WIN32)
- SET(VMIME_CHARSETCONV_LIB_DETECTED "win")
-ELSEIF(ICU_LIBRARIES)
+IF(ICU_LIBRARIES)
SET(VMIME_CHARSETCONV_LIB_DETECTED "icu")
ELSEIF(ICONV_FOUND)
SET(VMIME_CHARSETCONV_LIB_DETECTED "iconv")
+ELSEIF(WIN32)
+ SET(VMIME_CHARSETCONV_LIB_DETECTED "win")
ENDIF()
SET(
@@ -803,6 +803,10 @@ ELSEIF(VMIME_CHARSETCONV_LIB STREQUAL "icu")
ELSEIF(VMIME_CHARSETCONV_LIB STREQUAL "win")
+ MESSAGE(WARNING "*** ICU or iconv library should always be preferred"
+ " over MultiByteToWideChar/WideCharToMultiByte on Windows, as"
+ " error handling is very poor, and there is no streaming support.")
+
SET(VMIME_CHARSETCONV_LIB_IS_ICONV "OFF")
SET(VMIME_CHARSETCONV_LIB_IS_ICU "OFF")
SET(VMIME_CHARSETCONV_LIB_IS_WIN "ON")