]> git.lyx.org Git - lyx.git/blob - development/cmake/intl/CMakeLists.txt
Integrate texrow with otexstream in order to perform automatic line
[lyx.git] / development / cmake / intl / CMakeLists.txt
1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
3 #
4 # Copyright (c) 2006,2011 Peter Kümmel, <syntheticpp@gmx.net>
5 #
6
7 project(intl) 
8
9 # libgnuintl.h.in => libintl.h
10 configure_file(libgnuintl.h ${CMAKE_CURRENT_BINARY_DIR}/libgnuintl.h COPYONLY)
11 configure_file(libgnuintl.h ${CMAKE_CURRENT_BINARY_DIR}/libintl.h COPYONLY)
12
13
14 add_definitions(
15         -DHAVE_CONFIG_H=1
16         -DMAKE_INTL_LIB
17         -DIN_LIBINTL
18         -DENABLE_RELOCATABLE=1
19         -DIN_LIBRARY
20         -DNO_XMALLOC
21         -Dset_relocation_prefix=libintl_set_relocation_prefix
22         -Drelocate=libintl_relocate
23         -DDEPENDS_ON_LIBICONV=1)
24     
25 if(NOT APPLE)    
26         add_definitions(
27                 -DLOCALEDIR=\\"${LOACLE_DIR}\\" 
28                 -DLOCALE_ALIAS_PATH=\\"${LOACLE_DIR}\\"
29                 -DLIBDIR=\\"${TOP_SRC_DIR}\\"
30                 -DINSTALLDIR=\\"${PREFIX}\\" )
31 else()
32         add_definitions(
33                 -DLOCALEDIR='\"${LOCALE_DIR}\"' 
34                 -DLOCALE_ALIAS_PATH='\"${LOCALE_DIR}\"'
35                 -DLIBDIR='\"${TOP_SRC_DIR}\"'
36                 -DINSTALLDIR='\"${PREFIX}\"' )
37 endif()
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         langprefs.c
66 )
67
68 lyx_add_path(intl_sources ${TOP_SRC_DIR}/intl)
69
70 include_directories(${TOP_SRC_DIR}/intl ${CMAKE_CURRENT_BINARY_DIR})
71
72 if(ICONV_FOUND)
73         include_directories(${ICONV_INCLUDE_DIR})
74 endif()
75
76 add_library(intl STATIC ${intl_sources} ${intl_headers})
77 set(LIBINTL_LIBRARIES intl)
78
79 if(ICONV_FOUND)
80         target_link_libraries(intl ${ICONV_LIBRARY})
81 endif()
82
83 project_source_group("${GROUP_CODE}" intl_sources intl_headers)
84