Translation update done using Pootle.
[gammu.git] / contrib / CMakeLists.txt
blob84a0db0f63bd113ad062c5701a4a0be1a7e16407
1 # cmake <http://www.cmake.org> build file for Gammu contrib files
2 # Copyright (c) 2007 - 2010 Michal Cihar
3 # vim: expandtab sw=4 ts=4 sts=4:
5 project (Gammu-contrib C)
7 option(INSTALL_GNAPPLET "Install Gnapplet binaries" ON)
8 option(INSTALL_S60 "Install Series 60 applet binaries" ON)
9 option(INSTALL_MEDIA "Install sample media files" ON)
10 option(INSTALL_PHP_EXAMPLES "Install PHP example scripts" ON)
12 if (BASH_BIN)
13     option(INSTALL_BASH_COMPLETION "Install bash completion script for Gammu" ON)
14 else (BASH_BIN)
15     option(INSTALL_BASH_COMPLETION "Install bash completion script for Gammu" OFF)
16 endif (BASH_BIN)
18 option(INSTALL_LSB_INIT "Install LSB compatible init script for Gammu" OFF)
19 option(INSTALL_UDEV_RULES "Install udev rules for Gammu" OFF)
21 set (GNAPPLET_FILES
22     symbian/gnapplet.ini
23     symbian/gnapplet.sis
24     )
26 set (S60_FILES
27     s60/series60-remote.sis
28     )
30 file(GLOB MEDIA_FILES "media/*.txt" "media/*.nlm")
32 set (PHP_EXAMPLES
33     php/class_gammu/class.gammu.php
34     php/class_gammu/class.sms.gammu.php
35     php/class_gammu/README
36     php/smsd-mysql-admin/admin.php
37     php/smsd-mysql-linked/linked.php
38     php/smsd-mysql-linked/linked.sql
39     php/smsd-mysql-intergammu/config.php
40     php/smsd-mysql-intergammu/funcoes/func.gammu.php
41     php/smsd-mysql-intergammu/funcoes/func.sql.php
42     php/smsd-mysql-intergammu/index.php
43     php/smsd-mysql-intergammu/intergammu.txt
44     php/smsd-mysql-intergammu/proc/admin.php
45     php/smsd-mysql-intergammu/proclast.sql
46     php/smsd-mysql-list/sms.php
47     )
49 if (INSTALL_GNAPPLET)
50     install (
51         FILES ${GNAPPLET_FILES}
52         DESTINATION "${INSTALL_DATA_DIR}"
53         COMPONENT "symbian"
54         )
55 endif (INSTALL_GNAPPLET)
57 if (INSTALL_S60)
58     install (
59         FILES ${S60_FILES}
60         DESTINATION "${INSTALL_DATA_DIR}"
61         COMPONENT "symbian"
62         )
63 endif (INSTALL_S60)
65 if (INSTALL_MEDIA)
66     install (
67         FILES ${MEDIA_FILES}
68         DESTINATION "${INSTALL_DOC_DIR}/examples/media"
69         COMPONENT "media"
70         )
71 endif (INSTALL_MEDIA)
74 if (INSTALL_PHP_EXAMPLES)
75     foreach (EXAMPLE ${PHP_EXAMPLES})
76         get_filename_component(DIRNAME ${EXAMPLE} PATH)
77         install (
78             FILES ${EXAMPLE}
79             DESTINATION "${INSTALL_DOC_DIR}/examples/${DIRNAME}"
80             COMPONENT "examples"
81             )
82     endforeach (EXAMPLE)
83 endif (INSTALL_PHP_EXAMPLES)
85 if (INSTALL_BASH_COMPLETION)
86     install (
87         FILES bash-completion/gammu
88         DESTINATION "/etc/bash_completion.d"
89         COMPONENT "bash"
90         )
91 endif (INSTALL_BASH_COMPLETION)
93 if (INSTALL_LSB_INIT)
94     install (
95         FILES init/gammu-smsd.lsb
96         DESTINATION "/etc/init.d"
97         RENAME "gammu-smsd"
98         COMPONENT "initscript"
99         )
100 else (INSTALL_LSB_INIT)
101     message (STATUS "Init script not being installed, install it by -DINSTALL_LSB_INIT=ON")
102 endif (INSTALL_LSB_INIT)
104 if (INSTALL_UDEV_RULES)
105     install (
106         FILES contrib/udev/45-nokiadku2.rules
107         DESTINATION "/etc/udev/rules.d"
108         COMPONENT "udev"
109         )
110 else (INSTALL_UDEV_RULES)
111     message (STATUS "Udev rules not being installed, install it by -DINSTALL_UDEV_RULES=ON")
112 endif (INSTALL_UDEV_RULES)
114 # Build some examples
115 # We do not install them intentionally, just check whether they still compile
116 add_subdirectory(smscgi)
117 add_subdirectory(convert)
118 add_subdirectory(sqlreply)