CMakeLists.txt
author Myhailo Danylenko <isbear@ukrpost.net>
Fri, 14 Nov 2014 01:51:58 +0200
changeset 44 636ef7fe3d5b
parent 43 dd75414bf9b8
permissions -rw-r--r--
Use build-time variable in sources
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37
0477d4800fbd Rearrange docs
Myhailo Danylenko <isbear@ukrpost.net>
parents: 33
diff changeset
     1
## Copyright 2009-2012 Myhailo Danylenko
0477d4800fbd Rearrange docs
Myhailo Danylenko <isbear@ukrpost.net>
parents: 33
diff changeset
     2
# This file is part of mcabber-pep
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
     3
#
37
0477d4800fbd Rearrange docs
Myhailo Danylenko <isbear@ukrpost.net>
parents: 33
diff changeset
     4
# mcabber-pep is a free software: you can redistribute it and/or modify
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
     5
# it under the terms of the GNU General Public License as published by
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
     6
# the Free Software Foundation, either version 2 of the License, or
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
     7
# (at your option) any later version.
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
     8
#
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
     9
# This program is distributed in the hope that it will be useful,
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    12
# GNU General Public License for more details.
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    13
#
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    14
# You should have received a copy of the GNU General Public License
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    16
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    17
cmake_minimum_required(VERSION 2.6) 
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    18
project(pep C) 
32
9a6164bc805c Version 0.0.4
Myhailo Danylenko <isbear@ukrpost.net>
parents: 31
diff changeset
    19
set(PROJECT_VERSION "0.0.4")
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    20
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    21
set(HANDLER_LIST mood tune geoloc activity)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    22
set(MODULE_LIST pep)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    23
foreach(HANDLER IN LISTS HANDLER_LIST)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    24
	list(APPEND MODULE_LIST ${HANDLER} pep_${HANDLER})
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    25
endforeach(HANDLER)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    26
12
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    27
## User settable options
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    28
option(DEBUG "Enable debugging symbols" OFF)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    29
foreach(HANDLER IN LISTS HANDLER_LIST)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    30
	string(TOUPPER ${HANDLER} UPHANDLER)
33
9151fef57135 Fix option types in cmakelists
Myhailo Danylenko <isbear@ukrpost.net>
parents: 32
diff changeset
    31
	set(HOOK_${UPHANDLER}_IN "${HANDLER}-in"   CACHE STRING "${HANDLER} incoming event hook name")
9151fef57135 Fix option types in cmakelists
Myhailo Danylenko <isbear@ukrpost.net>
parents: 32
diff changeset
    32
	set(HOOK_${UPHANDLER}_OUT "${HANDLER}-out" CACHE STRING "${HANDLER} outgoing event hook name")
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    33
endforeach(HANDLER)
33
9151fef57135 Fix option types in cmakelists
Myhailo Danylenko <isbear@ukrpost.net>
parents: 32
diff changeset
    34
set(OPT_TUNE_PAUSE_IS_STOP "pep_tune_pause_is_stop" CACHE STRING "Tune pause is stop option name")
9151fef57135 Fix option types in cmakelists
Myhailo Danylenko <isbear@ukrpost.net>
parents: 32
diff changeset
    35
set(OPT_TUNE_INTERVAL      "pep_tune_interval"      CACHE STRING "Tune intevral option name")
9151fef57135 Fix option types in cmakelists
Myhailo Danylenko <isbear@ukrpost.net>
parents: 32
diff changeset
    36
set(OPT_GEOLOC_INTERVAL    "pep_geoloc_interval"    CACHE STRING "Geoloc interval option name")
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    37
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    38
set(PEP_DESCRIPTION          "Common listener for PEP events")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    39
set(PEP_MOOD_DESCRIPTION     "PEP mood event handler")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    40
set(PEP_TUNE_DESCRIPTION     "PEP tune event handler\\n Options: ${OPT_TUNE_INTERVAL}, ${OPT_TUNE_PAUSE_IS_STOP}")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    41
set(PEP_GEOLOC_DESCRIPTION   "PEP geoloc event handler\\n Options: ${OPT_GEOLOC_INTERVAL}")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    42
set(PEP_ACTIVITY_DESCRIPTION "PEP activity event handler")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    43
set(MOOD_DESCRIPTION         "Mood event handler (ui)\\n Command: /mood")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    44
set(TUNE_DESCRIPTION         "Tune event handler (ui)\\n Command: /tune")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    45
set(GEOLOC_DESCRIPTION       "Geolocation event handler (ui)\\n Command: /geoloc")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    46
set(ACTIVITY_DESCRIPTION     "User activity event handler (ui)\\n Command: /activity")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    47
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    48
foreach(AVMODULE IN LISTS MODULE_LIST)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    49
	string(TOUPPER ${AVMODULE} AVMODULE)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    50
	execute_PROCESS(COMMAND echo -n "${${AVMODULE}_DESCRIPTION}" COMMAND sed -e "s/\\\\n/\\n\\t/g" OUTPUT_VARIABLE ${AVMODULE}_DESCRIPTION_AVV)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    51
endforeach(AVMODULE)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    52
12
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    53
## Check for build dependencies
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    54
find_package(PkgConfig REQUIRED) 
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    55
pkg_check_modules(GLIB REQUIRED glib-2.0) 
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    56
pkg_check_modules(LM REQUIRED loudmouth-1.0) 
17
4a7cf0f5e85c Use pkg-config to find mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 15
diff changeset
    57
pkg_check_modules(MCABBER REQUIRED mcabber)
29
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
    58
include(CheckSymbolExists)
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
    59
set(CMAKE_REQUIRED_INCLUDES ${LM_INCLUDE_DIRS})
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
    60
set(CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES})
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
    61
set(CMAKE_REQUIRED_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS})
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
    62
check_symbol_exists(lm_connection_unregister_reply_handler loudmouth/loudmouth.h HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER)
41
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
    63
include(CheckCSourceCompiles)
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
    64
set(CMAKE_REQUIRED_INCLUDES ${MCABBER_INCLUDE_DIRS})
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
    65
set(CMAKE_REQUIRED_LIBRARIES ${MCABBER_LIBRARIES})
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
    66
set(CMAKE_REQUIRED_FLAGS ${MCABBER_LDFLAGS} ${MCABBER_CFLAGS})
43
dd75414bf9b8 [cmake] Simplify check for COMPL_FLAGS
Myhailo Danylenko <isbear@ukrpost.net>
parents: 42
diff changeset
    67
check_symbol_exists(MCABBER_API_HAVE_COMPL_FLAGS mcabber/api.h HAVE_MCABBER_COMPLETION_FLAGS)
12
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    68
link_directories(${GLIB_LIBRARY_DIRS}
17
4a7cf0f5e85c Use pkg-config to find mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 15
diff changeset
    69
				 ${LM_LIBRARY_DIRS}
4a7cf0f5e85c Use pkg-config to find mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 15
diff changeset
    70
				 ${MCABBER_LIBRARY_DIRS})
12
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    71
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    72
## Target definitions
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    73
add_library(pep MODULE pep.c pep.h) 
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    74
foreach(HANDLER IN LISTS HANDLER_LIST)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    75
	add_library(${HANDLER}     MODULE ${HANDLER}.c pep_${HANDLER}.h)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    76
	add_library(pep_${HANDLER} MODULE pep_${HANDLER}.c pep_${HANDLER}.h pep.h)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    77
endforeach(HANDLER)
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    78
12
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    79
## Compiler setup
29
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
    80
if(DEBUG)
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
    81
		set(DEBUG_COMPILE_FLAGS "-g")
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
    82
endif()
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    83
configure_file(config.h.in       config.h)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    84
foreach(HANDLER IN LISTS HANDLER_LIST)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    85
	configure_file(pep_${HANDLER}.h.in pep_${HANDLER}.h)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    86
endforeach(HANDLER)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    87
include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} ${LM_INCLUDE_DIRS} ${MCABBER_INCLUDE_DIRS})
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    88
target_link_libraries(pep ${GLIB_LIBRARIES} ${LM_LIBRARIES} ${MCABBER_LIBRARIES})
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    89
foreach(HANDLER IN LISTS HANDLER_LIST)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    90
	target_link_libraries(${HANDLER}     ${GLIB_LIBRARIES}                 ${MCABBER_LIBRARIES})
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    91
	target_link_libraries(pep_${HANDLER} ${GLIB_LIBRARIES} ${LM_LIBRARIES} ${MCABBER_LIBRARIES})
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    92
endforeach(HANDLER)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    93
include_directories(${pep_SOURCE_DIR} ${pep_BINARY_DIR})
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    94
foreach(AVMODULE IN LISTS MODULE_LIST)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    95
	set_target_properties(${AVMODULE} PROPERTIES COMPILE_FLAGS "-Wall ${DEBUG_COMPILE_FLAGS}")
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
    96
endforeach(AVMODULE)
12
7d4c5337267c Fix linker library search path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 11
diff changeset
    97
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
    98
## Packaging information
42
5b4234ddd8a2 [cmake] Change package naming convention
Myhailo Danylenko <isbear@ukrpost.net>
parents: 41
diff changeset
    99
set(CPACK_PACKAGE_NAME mcabber-mod-pep)
19
9ce7690c4dab Update module struct to use api
Myhailo Danylenko <isbear@ukrpost.net>
parents: 18
diff changeset
   100
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   101
set(CPACK_PACKAGE_VENDOR "IsBear")
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   102
set(CPACK_PACKAGE_CONTACT "Myhailo Danylenko <isbear@ukrpost.net>")
29
23fa36d480fb Merge pep modules & use events
Myhailo Danylenko <isbear@ukrpost.net>
parents: 26
diff changeset
   103
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "PEP modules")
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   104
set(CPACK_RESOURCE_FILE_LICENSE ${pep_SOURCE_DIR}/COPYING)
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   105
set(CPACK_SOURCE_GENERATOR TBZ2)
33
9151fef57135 Fix option types in cmakelists
Myhailo Danylenko <isbear@ukrpost.net>
parents: 32
diff changeset
   106
set(CPACK_GENERATOR DEB CACHE STRING "Binary package generator, eg DEB, RPM, TGZ, NSIS...")
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   107
set(CPACK_DEBIAN_PACKAGE_SECTION libs)
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   108
find_program(DPKG_EXECUTABLE dpkg)
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   109
if(DPKG_EXECUTABLE)
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   110
	execute_process(COMMAND ${DPKG_EXECUTABLE} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   111
else()
33
9151fef57135 Fix option types in cmakelists
Myhailo Danylenko <isbear@ukrpost.net>
parents: 32
diff changeset
   112
	set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE STRING "Architecture of package")
0
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   113
endif()
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   114
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   115
set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so")
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   116
include(CPack)
1d7a0bc3e38b Initial commit
Myhailo Danylenko <isbear@ukrpost.net>
parents:
diff changeset
   117
41
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
   118
if(HAVE_MCABBER_COMPLETION_FLAGS)
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
   119
	set(AVV_COMPL_VERSION "compl:4")
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
   120
else()
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
   121
	set(AVV_COMPL_VERSION "compl:3 | compl:2")
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
   122
endif()
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
   123
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   124
foreach(AVMODULE IN LISTS MODULE_LIST)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   125
	configure_file(avv/${AVMODULE}.in avv/${AVMODULE})
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   126
endforeach(AVMODULE)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   127
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   128
configure_file(pep.rc.in pep.rc @ONLY)
26
1d5521131630 Add AVV module description
Myhailo Danylenko <isbear@ukrpost.net>
parents: 21
diff changeset
   129
15
c28824abec86 Fix documentation installation path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 12
diff changeset
   130
## Installation
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   131
install(TARGETS ${MODULE_LIST} DESTINATION lib/mcabber) 
37
0477d4800fbd Rearrange docs
Myhailo Danylenko <isbear@ukrpost.net>
parents: 33
diff changeset
   132
install(FILES ${PROJECT_BINARY_DIR}/pep.rc COPYING docs/todo.mdwn docs/readme.mdwn DESTINATION share/doc/${CPACK_PACKAGE_NAME})
0477d4800fbd Rearrange docs
Myhailo Danylenko <isbear@ukrpost.net>
parents: 33
diff changeset
   133
install(DIRECTORY docs/ DESTINATION share/doc/${CPACK_PACKAGE_NAME} PATTERN "*~" EXCLUDE)
31
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   134
install(FILES pep.h
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   135
              ${PROJECT_BINARY_DIR}/pep_mood.h
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   136
			  ${PROJECT_BINARY_DIR}/pep_tune.h
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   137
			  ${PROJECT_BINARY_DIR}/pep_geoloc.h
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   138
			  ${PROJECT_BINARY_DIR}/pep_activity.h DESTINATION include/mcabber)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   139
install(DIRECTORY help DESTINATION share/mcabber PATTERN "*~" EXCLUDE)
e404cd1c7077 Drop publish_*, rework build system
Myhailo Danylenko <isbear@ukrpost.net>
parents: 29
diff changeset
   140
install(DIRECTORY ${PROJECT_BINARY_DIR}/avv/ DESTINATION share/mcabber/avv/modules PATTERN "*~" EXCLUDE)
15
c28824abec86 Fix documentation installation path
Myhailo Danylenko <isbear@ukrpost.net>
parents: 12
diff changeset
   141
41
cfb02882828d Comply with dev:24
Myhailo Danylenko <isbear@ukrpost.net>
parents: 37
diff changeset
   142
## The End ## vim: se ts=4 sw=4: ##