author | Myhailo Danylenko <isbear@ukrpost.net> |
Fri, 15 Jan 2010 11:44:12 +0200 | |
changeset 5 | 80a5ee0efeff |
parent 2 | 30b66610f86a |
child 6 | 2bc6bc009619 |
permissions | -rw-r--r-- |
0 | 1 |
## Copyright 2009 Myhailo Danylenko |
2 |
# This file is part of mcabber module writing howto examples. |
|
3 |
# |
|
4 |
# Examples are free software: you can redistribute it and/or modify |
|
5 |
# it under the terms of the GNU General Public License as published by |
|
6 |
# the Free Software Foundation, either version 2 of the License, or |
|
7 |
# (at your option) any later version. |
|
8 |
# |
|
9 |
# This program is distributed in the hope that it will be useful, |
|
10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
# GNU General Public License for more details. |
|
13 |
# |
|
14 |
# You should have received a copy of the GNU General Public License |
|
15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 |
||
17 |
cmake_minimum_required(VERSION 2.6) |
|
18 |
project(marking C) |
|
19 |
||
20 |
## Target definitions |
|
21 |
add_library(marking MODULE marking.c) |
|
22 |
||
23 |
## User settable options |
|
2
30b66610f86a
Change mcabber headers naming scheme
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1
diff
changeset
|
24 |
set(MCABBER_INCLUDE_DIR "/usr/include" CACHE FILEPATH "Path to mcabber headers") |
0 | 25 |
|
26 |
## Packaging information |
|
27 |
set(CPACK_PACKAGE_NAME libmcabber-marking) |
|
28 |
set(CPACK_PACKAGE_VERSION "0.0.1") |
|
29 |
set(CPACK_PACKAGE_VENDOR "IsBear") |
|
30 |
set(CPACK_PACKAGE_CONTACT "Myhailo Danylenko <isbear@ukrpost.net>") |
|
2
30b66610f86a
Change mcabber headers naming scheme
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1
diff
changeset
|
31 |
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mcabber module to do commands with multiple contacts") |
0 | 32 |
set(CPACK_RESOURCE_FILE_LICENSE ${marking_SOURCE_DIR}/COPYING) |
33 |
set(CPACK_SOURCE_GENERATOR TBZ2) |
|
34 |
set(CPACK_GENERATOR DEB CACHE TEXT "Binary package generator, eg DEB, RPM, TGZ, NSIS...") |
|
35 |
set(CPACK_DEBIAN_PACKAGE_SECTION libs) |
|
36 |
find_program(DPKG_EXECUTABLE dpkg) |
|
37 |
if(DPKG_EXECUTABLE) |
|
38 |
execute_process(COMMAND ${DPKG_EXECUTABLE} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) |
|
39 |
else() |
|
40 |
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE TEXT "Architecture of package") |
|
41 |
endif() |
|
42 |
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") |
|
43 |
set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so") |
|
44 |
include(CPack) |
|
45 |
||
46 |
## Check for build dependencies |
|
47 |
find_package(PkgConfig REQUIRED) |
|
48 |
pkg_check_modules(GLIB REQUIRED glib-2.0) |
|
49 |
pkg_check_modules(GMODULE REQUIRED gmodule-2.0) |
|
50 |
||
51 |
## Compiler setup |
|
52 |
include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} |
|
53 |
${GMODULE_INCLUDE_DIRS} |
|
2
30b66610f86a
Change mcabber headers naming scheme
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1
diff
changeset
|
54 |
${LM_INCLUDE_DIRS} |
30b66610f86a
Change mcabber headers naming scheme
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1
diff
changeset
|
55 |
${MCABBER_INCLUDE_DIR}) |
0 | 56 |
target_link_libraries(marking ${GLIB_LIBRARIES} |
57 |
${GMODULE_LIBRARIES}) |
|
58 |
include_directories(${marking_SOURCE_DIR} |
|
2
30b66610f86a
Change mcabber headers naming scheme
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1
diff
changeset
|
59 |
${marking_BINARY_DIR}) |
0 | 60 |
|
61 |
## Installation |
|
62 |
install(TARGETS marking DESTINATION lib/mcabber) |
|
5
80a5ee0efeff
Install README and TODO
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2
diff
changeset
|
63 |
install(FILES marking.rc COPYING README TODO DESTINATION share/doc/${CPACK_PACKAGE_NAME}) |
1
c8473c43ce72
Cosmetics, install help
Myhailo Danylenko <isbear@ukrpost.net>
parents:
0
diff
changeset
|
64 |
install(DIRECTORY help DESTINATION share/mcabber) |
0 | 65 |
|
66 |
## The End ## vim: se ts=4: ## |