annotate Resources/CMake/LibIconvConfiguration.cmake @ 1947:c1053112b323

Switch to the C++11 standard if the version of JsonCpp is 1.y.z
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 Apr 2016 10:11:40 +0200
parents fbf763bb1fa3
children 0108ac01fc8e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1094
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 set(LIBICONV_SOURCES_DIR ${CMAKE_BINARY_DIR}/libiconv-1.14)
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1494
diff changeset
2 set(LIBICONV_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/libiconv-1.14.tar.gz")
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1494
diff changeset
3 set(LIBICONV_MD5 "e34509b1623cec449dfeb73d7ce9c6c6")
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1494
diff changeset
4
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1494
diff changeset
5 DownloadPackage(${LIBICONV_MD5} ${LIBICONV_URL} "${LIBICONV_SOURCES_DIR}")
1094
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
1095
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1094
diff changeset
7 # https://groups.google.com/d/msg/android-ndk/AS1nkxnk6m4/EQm09hD1tigJ
1094
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 add_definitions(
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 -DBOOST_LOCALE_WITH_ICONV=1
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 -DBUILDING_LIBICONV=1
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 -DIN_LIBRARY=1
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 -DLIBDIR=""
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 -DICONV_CONST=
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 )
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 configure_file(
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 ${LIBICONV_SOURCES_DIR}/srclib/localcharset.h
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 ${LIBICONV_SOURCES_DIR}/include
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 COPYONLY)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 set(HAVE_VISIBILITY 0)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 set(ICONV_CONST ${ICONV_CONST})
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 set(USE_MBSTATE_T 1)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 set(BROKEN_WCHAR_H 0)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 set(EILSEQ)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 set(HAVE_WCHAR_T 1)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 configure_file(
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 ${LIBICONV_SOURCES_DIR}/include/iconv.h.build.in
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 ${LIBICONV_SOURCES_DIR}/include/iconv.h
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 )
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 unset(HAVE_VISIBILITY)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 unset(ICONV_CONST)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 unset(USE_MBSTATE_T)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 unset(BROKEN_WCHAR_H)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 unset(EILSEQ)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 unset(HAVE_WCHAR_T)
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
1494
a13581480b1f fix mingw build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1095
diff changeset
38 # Create an empty "config.h" for libiconv
a13581480b1f fix mingw build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1095
diff changeset
39 file(WRITE ${LIBICONV_SOURCES_DIR}/include/config.h "")
a13581480b1f fix mingw build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1095
diff changeset
40
1094
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 include_directories(
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ${LIBICONV_SOURCES_DIR}/include
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 )
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 list(APPEND BOOST_SOURCES
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 ${LIBICONV_SOURCES_DIR}/lib/iconv.c
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ${LIBICONV_SOURCES_DIR}/lib/relocatable.c
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ${LIBICONV_SOURCES_DIR}/libcharset/lib/localcharset.c
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 ${LIBICONV_SOURCES_DIR}/libcharset/lib/relocatable.c
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 )