changeset 3244:6f35279215c4

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 16 Feb 2019 10:27:07 +0100
parents cf0ad1fb2bb7
children 8b091a51b1b9
files INSTALL Resources/CMake/LibIcuConfiguration.cmake UnitTestsSources/VersionsTests.cpp
diffstat 3 files changed, 32 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/INSTALL	Sat Feb 16 09:47:36 2019 +0100
+++ b/INSTALL	Sat Feb 16 10:27:07 2019 +0100
@@ -71,11 +71,12 @@
 
 
 
-Native Windows build with Microsoft Visual Studio
--------------------------------------------------
+Native Windows build with Microsoft Visual Studio 2008
+------------------------------------------------------
 
 # cd [...]\OrthancBuild
-# cmake -DSTANDALONE_BUILD=ON -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON -DUSE_LEGACY_JSONCPP=ON -G "Visual Studio 9 2008" [...]\Orthanc
+# cmake -DSTANDALONE_BUILD=ON -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON \
+  -DUSE_LEGACY_JSONCPP=ON -G "Visual Studio 9 2008" [...]\Orthanc
 
 Then open the "[...]/OrthancBuild/Orthanc.sln" with Visual Studio.
 
@@ -91,6 +92,16 @@
   Visual Studio that do not support C++11
 
 
+Orthanc as compiled above will not work properly with some Asian
+encodings (unit tests will fail). In international setups, you can
+compile Orthanc together with ICU as follows:
+
+# cmake -DSTANDALONE_BUILD=ON -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON \
+  -DBOOST_LOCALE_BACKEND=icu -DUSE_LEGACY_JSONCPP=ON -DUSE_LEGACY_LIBICU=ON \
+  -G "Visual Studio 9 2008" [...]\Orthanc
+
+
+
 Native Windows build with Microsoft Visual Studio 2015, Ninja and QtCreator
 ---------------------------------------------------------------------------
 
@@ -105,6 +116,11 @@
 * Import build from [...]\OrthancBuild
 
 
+Instructions to include support for Asian encodings:
+
+# cmake -G Ninja -DSTATIC_BUILD=ON -DBOOST_LOCALE_BACKEND=icu [...]\Orthanc
+
+
 
 Cross-Compilation for Windows under GNU/Linux
 ---------------------------------------------
--- a/Resources/CMake/LibIcuConfiguration.cmake	Sat Feb 16 09:47:36 2019 +0100
+++ b/Resources/CMake/LibIcuConfiguration.cmake	Sat Feb 16 10:27:07 2019 +0100
@@ -44,6 +44,15 @@
     PROPERTIES COMPILE_DEFINITIONS "char16_t=uint16_t"
     )
 
+  if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+    set_source_files_properties(
+      ${LIBICU_SOURCES_DIR}/source/common/locmap.c
+      PROPERTIES COMPILE_DEFINITIONS "LOCALE_SNAME=-"
+      )
+  endif()
+
+  source_group(ThirdParty\\libicu REGULAR_EXPRESSION ${LIBICU_SOURCES_DIR}/.*)
+
 else() 
   CHECK_INCLUDE_FILE_CXX(unicode/uvernum.h HAVE_ICU_H)
   if (NOT HAVE_ICU_H)
--- a/UnitTestsSources/VersionsTests.cpp	Sat Feb 16 09:47:36 2019 +0100
+++ b/UnitTestsSources/VersionsTests.cpp	Sat Feb 16 10:27:07 2019 +0100
@@ -44,7 +44,10 @@
 #include <sqlite3.h>
 #include <lua.h>
 #include <jpeglib.h>
-#include <iconv.h>
+
+#if BUILDING_LIBICONV == 1
+#  include <iconv.h>
+#endif
 
 #if ORTHANC_ENABLE_SSL == 1
 #  include <openssl/opensslv.h>