# HG changeset patch # User Sebastien Jodogne # Date 1550309227 -3600 # Node ID 6f35279215c412b4026f023c3c7c73d5e182ecea # Parent cf0ad1fb2bb70c1ce375acb60871864c9153be1e cont diff -r cf0ad1fb2bb7 -r 6f35279215c4 INSTALL --- 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 --------------------------------------------- diff -r cf0ad1fb2bb7 -r 6f35279215c4 Resources/CMake/LibIcuConfiguration.cmake --- 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) diff -r cf0ad1fb2bb7 -r 6f35279215c4 UnitTestsSources/VersionsTests.cpp --- 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 #include #include -#include + +#if BUILDING_LIBICONV == 1 +# include +#endif #if ORTHANC_ENABLE_SSL == 1 # include