cmake: Default to RelWithDebugInfo.
[vlc.git] / extras / buildsystem / cmake / CMakeLists / po_CMakeLists.txt
1 #TODO:
2 # disable NLS on demand
3 # installation
4 # update-po
5 # rebuild *.po if vlc.pot has changed (include POTFILES.in)
6
7
8 #FIXME: detection ?
9 set( GMSGFMT            msgfmt )
10 set( MSGFMT             msgfmt )
11 set( XGETTEXT           xgettext )
12 set( MSGMERGE_UPDATE    msgmerge --update )
13 set( MSGINIT            msginit )
14 set( MSGCONV            msgconv )
15 set( MSGFILTER          msgfilter )
16
17 set( POFILES
18     af
19         ar
20         bn
21         ca
22         co
23         cs
24         da
25         de
26         el
27         en_GB
28         es
29         eu
30         fa
31         fi
32         fr
33         fur
34         gl
35         he
36         hi
37         hu
38         it
39         ja
40         ka
41         ko
42         lt
43         lv
44         ms
45         my
46         ne
47         nl
48         no
49         oc
50         pa
51         pl
52         ps
53         pt_BR
54         pt_PT
55         ro
56         ru
57         sk
58         sl
59         sq
60         sv
61         tet
62         th
63         tl
64         tr
65         zh_CN
66         zh_TW
67 )
68
69 FOREACH( pofile ${POFILES} )
70     set( po-target ${po-target} ${pofile}.gmo )
71 ENDFOREACH( pofile)
72
73 ADD_CUSTOM_TARGET( all-po ALL
74     DEPENDS ${po-target}
75 )
76
77 foreach( pofile ${POFILES} )
78     add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${pofile}.gmo
79         COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${pofile}.gmo
80         COMMAND ${GMSGFMT} -c --statistics -o ${CMAKE_CURRENT_BINARY_DIR}/t-${pofile}.gmo ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}.po
81         COMMAND mv ${CMAKE_CURRENT_BINARY_DIR}/t-${pofile}.gmo ${CMAKE_CURRENT_BINARY_DIR}/${pofile}.gmo
82         DEPENDS ${pofile}.po
83     )
84 endforeach( pofile )