]> git.lyx.org Git - features.git/blob - development/cmake/intl/CMakeLists.txt
Headers and .C files are now in The Golden Code folder
[features.git] / development / cmake / intl / CMakeLists.txt
1 project(intl) 
2
3 # libgnuintl.h.in => libintl.h
4 configure_file(libgnuintl.h ${CMAKE_CURRENT_BINARY_DIR}/libgnuintl.h COPYONLY)
5 configure_file(libgnuintl.h ${CMAKE_CURRENT_BINARY_DIR}/libintl.h COPYONLY)
6
7
8 add_definitions(
9     -DHAVE_CONFIG_H=1
10     -DMAKE_INTL_LIB
11     -DIN_LIBINTL
12     -DENABLE_RELOCATABLE=1
13     -DIN_LIBRARY
14     -DNO_XMALLOC
15     -Dset_relocation_prefix=libintl_set_relocation_prefix
16     -Drelocate=libintl_relocate
17     -DDEPENDS_ON_LIBICONV=1
18     -DICONV_CONST=const
19     )
20     
21     
22 if(MSVC_IDE)
23         add_definitions(
24                 -DLOCALEDIR="${LOCALE_DIR}" 
25                 -DLOCALE_ALIAS_PATH="${LOCALE_DIR}"
26                 -DLIBDIR="${TOP_SRC_DIR}"
27                 -DINSTALLDIR="${PREFIX}"
28                 )
29 else(MSVC_IDE)
30         add_definitions(
31                 -DLOCALEDIR=\\"${LOACLE_DIR}\\" 
32                 -DLOCALE_ALIAS_PATH=\\"${LOACLE_DIR}\\"
33                 -DLIBDIR=\\"${TOP_SRC_DIR}\\"
34                 -DINSTALLDIR=\\"${PREFIX}\\" 
35                 )
36 endif(MSVC_IDE)
37
38     
39 file(GLOB intl_headers ${TOP_SRC_DIR}/intl/*.h)
40
41 set(intl_sources 
42       bindtextdom.c
43       dcgettext.c
44       dgettext.c
45       gettext.c
46       finddomain.c
47       loadmsgcat.c
48       localealias.c
49       textdomain.c
50       l10nflist.c
51       explodename.c
52       dcigettext.c
53       dcngettext.c
54       dngettext.c
55       ngettext.c
56       plural.c
57       plural-exp.c
58       localcharset.c
59       relocatable.c
60       localename.c
61       log.c
62       printf.c
63       osdep.c
64       intl-compat.c
65 )
66
67 lyx_add_path(intl_sources ${TOP_SRC_DIR}/intl)
68
69 include_directories(${TOP_SRC_DIR}/intl ${CMAKE_CURRENT_BINARY_DIR})
70
71 if(ICONV_FOUND)
72         include_directories(${ICONV_INCLUDE_DIR})
73 endif(ICONV_FOUND)
74
75 add_library(intl STATIC ${intl_sources} ${intl_headers})
76
77 if(ICONV_FOUND)
78         target_link_libraries(intl ${ICONV_LIBRARY})
79 endif(ICONV_FOUND)
80
81 source_group("${CODE_GROUP_NAME}" FILES ${intl_sources} ${intl_headers})
82