]> git.sesse.net Git - vlc/blob - extras/buildsystem/cmake/CMakeLists/po_CMakeLists.txt
Remove unused config_GetConfDir
[vlc] / 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 find_program( GMSGFMT            msgfmt )
10 find_program( MSGFMT             msgfmt )
11 find_program( XGETTEXT           xgettext )
12 find_program( MSGMERGE_UPDATE    msgmerge --update )
13 find_program( MSGINIT            msginit )
14 find_program( MSGCONV            msgconv )
15 find_program( 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} ${CMAKE_CURRENT_BINARY_DIR}/${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 ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}.po
83     )
84 endforeach( pofile )