1 ## Copyright 2009 Myhailo Danylenko |
1 ## Copyright 2009-2012 Myhailo Danylenko |
2 # This file is part of mcabber module writing howto examples. |
2 # This file is part of mcabber-avatar |
3 # |
3 # |
4 # Examples are free software: you can redistribute it and/or modify |
4 # mcabber-avatar is a free software: you can redistribute it and/or |
5 # it under the terms of the GNU General Public License as published by |
5 # modify it under the terms of the GNU General Public License as |
6 # the Free Software Foundation, either version 2 of the License, or |
6 # published by the Free Software Foundation, either version 2 of the |
7 # (at your option) any later version. |
7 # License, or (at your option) any later version. |
8 # |
8 # |
9 # This program is distributed in the hope that it will be useful, |
9 # This program is distributed in the hope that it will be useful, |
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 # GNU General Public License for more details. |
12 # GNU General Public License for more details. |
24 find_package(PkgConfig REQUIRED) |
24 find_package(PkgConfig REQUIRED) |
25 pkg_check_modules(GLIB REQUIRED glib-2.0) |
25 pkg_check_modules(GLIB REQUIRED glib-2.0) |
26 pkg_check_modules(LM REQUIRED loudmouth-1.0) |
26 pkg_check_modules(LM REQUIRED loudmouth-1.0) |
27 pkg_check_modules(PNG REQUIRED libpng) |
27 pkg_check_modules(PNG REQUIRED libpng) |
28 pkg_check_modules(MCABBER REQUIRED mcabber) |
28 pkg_check_modules(MCABBER REQUIRED mcabber) |
29 set(AALIB_LIBRARY_DIRS "/usr/lib" CACHE FILEPATH "Path, where AAlib is located") |
29 set(AALIB_LIBRARY_DIRS "/usr/lib" CACHE PATH "Path, where AAlib is located") |
30 set(AALIB_INCLUDE_DIRS "/usr/include" CACHEĀ FILEPATH "Path to AAlib includes") |
30 set(AALIB_INCLUDE_DIRS "/usr/include" CACHEĀ PATH "Path to AAlib includes") |
31 set(AALIB_LIBRARIES "-laa" CACHE TEXT "Libraries, necessary to link with AAlib") |
31 set(AALIB_LIBRARIES "-laa" CACHE STRING "Libraries, necessary to link with AAlib") |
32 include(CheckIncludeFile) |
32 include(CheckIncludeFile) |
33 set(CMAKE_REQUIRED_INCLUDES ${MCABBER_INCLUDE_DIRS}) |
33 set(CMAKE_REQUIRED_INCLUDES ${MCABBER_INCLUDE_DIRS}) |
34 check_include_file(mcabber/pep.h HAVE_MCABBER_PEP_H) |
34 check_include_file(mcabber/pep.h HAVE_MCABBER_PEP_H) |
35 if(NOT HAVE_MCABBER_PEP_H) |
35 if(NOT HAVE_MCABBER_PEP_H) |
36 message(SEND_ERROR "Pep module header not found") |
36 message(SEND_ERROR "Pep module header not found") |
77 set(CPACK_DEBIAN_PACKAGE_SECTION libs) |
77 set(CPACK_DEBIAN_PACKAGE_SECTION libs) |
78 find_program(DPKG_EXECUTABLE dpkg) |
78 find_program(DPKG_EXECUTABLE dpkg) |
79 if(DPKG_EXECUTABLE) |
79 if(DPKG_EXECUTABLE) |
80 execute_process(COMMAND ${DPKG_EXECUTABLE} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) |
80 execute_process(COMMAND ${DPKG_EXECUTABLE} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) |
81 else() |
81 else() |
82 set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE TEXT "Architecture of package") |
82 set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE STRING "Architecture of package") |
83 endif() |
83 endif() |
84 set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") |
84 set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") |
85 set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so") |
85 set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so") |
86 include(CPack) |
86 include(CPack) |
87 |
87 |
88 configure_file(avatar.avv.in avatar.avv) |
88 configure_file(avatar.avv.in avatar.avv) |
89 |
89 |
90 ## Installation |
90 ## Installation |
91 install(TARGETS avatar DESTINATION lib/mcabber) |
91 install(TARGETS avatar DESTINATION lib/mcabber) |
92 install(FILES avatar.rc COPYING TODO README DESTINATION share/doc/${CPACK_PACKAGE_NAME}) |
92 install(FILES docs/avatar.rc COPYING docs/todo.mdwn docs/readme.mdwn DESTINATION share/doc/${CPACK_PACKAGE_NAME}) |
93 install(DIRECTORY help DESTINATION share/mcabber) |
93 install(DIRECTORY help DESTINATION share/mcabber) |
94 install(FILES ${PROJECT_BINARY_DIR}/avatar.avv DESTINATION share/mcabber/avv/modules RENAME avatar) |
94 install(FILES ${PROJECT_BINARY_DIR}/avatar.avv DESTINATION share/mcabber/avv/modules RENAME avatar) |
95 |
95 |
96 ## The End ## vim: se ts=4 sw=4: ## |
96 ## The End ## vim: se ts=4 sw=4: ## |