Mercurial > hg > orthanc
changeset 3231:fc5bc0fe863c
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 14 Feb 2019 20:39:49 +0100 |
parents | 4b042ec734c1 |
children | 01a5b2530b68 |
files | Resources/CMake/LibIcuConfiguration.cmake |
diffstat | 1 files changed, 13 insertions(+), 61 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/LibIcuConfiguration.cmake Thu Feb 14 20:22:33 2019 +0100 +++ b/Resources/CMake/LibIcuConfiguration.cmake Thu Feb 14 20:39:49 2019 +0100 @@ -1,71 +1,23 @@ + +# http://userguide.icu-project.org/packaging +# http://userguide.icu-project.org/howtouseicu + message("Using libicu") if (STATIC_BUILD OR NOT USE_SYSTEM_LIBICU) - # set(LIBICU_SOURCES_DIR ${CMAKE_BINARY_DIR}/libicu-1.15) - # set(LIBICU_URL "http://orthanc.osimis.io/ThirdPartyDownloads/libicu-1.15.tar.gz") - # set(LIBICU_MD5 "ace8b5f2db42f7b3b3057585e80d9808") - - # DownloadPackage(${LIBICU_MD5} ${LIBICU_URL} "${LIBICU_SOURCES_DIR}") - - # # Disable the support of libicu that is shipped by default with - # # the C standard library on Linux. Setting this macro redirects - # # calls from "icu*()" to "libicu*()" by defining macros in the - # # C headers of "libicu-1.15". - # add_definitions(-DLIBICU_PLUG=1) + set(LIBICU_SOURCES_DIR ${CMAKE_BINARY_DIR}/icu) + set(LIBICU_URL "http://orthanc.osimis.io/ThirdPartyDownloads/icu4c-63_1-src.tgz") + set(LIBICU_MD5 "9e40f6055294284df958200e308bce50") - # # https://groups.google.com/d/msg/android-ndk/AS1nkxnk6m4/EQm09hD1tigJ - # add_definitions( - # -DBUILDING_LIBICU=1 - # -DIN_LIBRARY=1 - # -DLIBDIR="" - # -DICU_CONST= - # ) + DownloadPackage(${LIBICU_MD5} ${LIBICU_URL} "${LIBICU_SOURCES_DIR}") - # configure_file( - # ${LIBICU_SOURCES_DIR}/srclib/localcharset.h - # ${LIBICU_SOURCES_DIR}/include - # COPYONLY) - # set(HAVE_VISIBILITY 0) - # set(ICU_CONST ${ICU_CONST}) - # set(USE_MBSTATE_T 1) - # set(BROKEN_WCHAR_H 0) - # set(EILSEQ) - # set(HAVE_WCHAR_T 1) - # configure_file( - # ${LIBICU_SOURCES_DIR}/include/icu.h.build.in - # ${LIBICU_SOURCES_DIR}/include/icu.h - # ) - # unset(HAVE_VISIBILITY) - # unset(ICU_CONST) - # unset(USE_MBSTATE_T) - # unset(BROKEN_WCHAR_H) - # unset(EILSEQ) - # unset(HAVE_WCHAR_T) + # TODO + add_definitions( + -DU_STATIC_IMPLEMENTATION + #-DU_COMBINED_IMPLEMENTATION + ) - # if (NOT EXISTS ${LIBICU_SOURCES_DIR}/include/config.h) - # # Create an empty "config.h" for libicu - # file(WRITE ${LIBICU_SOURCES_DIR}/include/config.h "") - # endif() - - # include_directories( - # ${LIBICU_SOURCES_DIR}/include - # ) - - # set(LIBICU_SOURCES - # ${LIBICU_SOURCES_DIR}/lib/icu.c - # ${LIBICU_SOURCES_DIR}/lib/relocatable.c - # ${LIBICU_SOURCES_DIR}/libcharset/lib/localcharset.c - # ${LIBICU_SOURCES_DIR}/libcharset/lib/relocatable.c - # ) - - # source_group(ThirdParty\\libicu REGULAR_EXPRESSION ${LIBICU_SOURCES_DIR}/.*) - - # if (CMAKE_SYSTEM_NAME STREQUAL "Windows") - # add_definitions(-DHAVE_WORKING_O_NOFOLLOW=0) - # else() - # add_definitions(-DHAVE_WORKING_O_NOFOLLOW=1) - # endif() else() CHECK_INCLUDE_FILE_CXX(unicode/uvernum.h HAVE_ICU_H)