CMakeLists.txt
author Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Tue, 25 May 2010 00:40:38 +0200
changeset 1 6a9a25d32364
child 2 a48121a74017
permissions -rw-r--r--
Add the parser of node and the CMakeList.txt
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     1
## Copyright 2010 Cornu Nicolas
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     2
# This file is part of mcabber module writing howto examples.
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     3
#
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     4
# Examples are free software: you can redistribute it and/or modify
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     5
# it under the terms of the GNU General Public License as published by
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     6
# the Free Software Foundation, either version 2 of the License, or
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     7
# (at your option) any later version.
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     8
#
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     9
# This program is distributed in the hope that it will be useful,
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    12
# GNU General Public License for more details.
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    13
#
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    14
# You should have received a copy of the GNU General Public License
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    16
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    17
cmake_minimum_required(VERSION 2.6) 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    18
project(Notify) 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    19
set(PROJECT_VERSION "0.0.1")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    20
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    21
## User settable options
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    22
 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    23
## Check for build dependencies
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    24
find_package(PkgConfig REQUIRED) 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    25
pkg_check_modules(GLIB REQUIRED glib-2.0) 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    26
pkg_check_modules(GTK REQUIRED gtk+-2.0) 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    27
pkg_check_modules(LM REQUIRED loudmouth-1.0) 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    28
pkg_check_modules(MCABBER REQUIRED mcabber)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    29
link_directories(${GLIB_LIBRARY_DIRS}
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    30
				 ${LM_LIBRARY_DIRS}
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    31
				 ${MCABBER_LIBRARY_DIRS}
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    32
				 ${GTK_LIBRARY_DIRS})
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    33
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    34
## Target definitions
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    35
add_library(jingle MODULE jingle.c) 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    36
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    37
## Compiler setup
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    38
#configure_file(config.h.in config.h)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    39
include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    40
                    ${LM_INCLUDE_DIRS}
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    41
					${MCABBER_INCLUDE_DIRS}
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    42
					${GTK_INCLUDE_DIRS})
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    43
target_link_libraries(jingle ${GLIB_LIBRARIES} 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    44
					  ${LM_LIBRARIES}
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    45
					  ${MCABBER_LIBRARIES}
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    46
					  ${GTK_LIBRARIES}
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    47
					 )
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    48
include_directories(${notify_SOURCE_DIR} 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    49
                    ${notify_BINARY_DIR})
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    50
set_target_properties(jingle PROPERTIES COMPILE_FLAGS "-Wall")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    51
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    52
## Packaging information
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    53
set(CPACK_PACKAGE_NAME libmcabber-jingle)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    54
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    55
set(CPACK_PACKAGE_VENDOR "alkino")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    56
set(CPACK_PACKAGE_CONTACT "Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    57
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Some notification for Mcabber")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    58
#set(CPACK_RESOURCE_FILE_LICENSE ${notify_SOURCE_DIR}/COPYING)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    59
set(CPACK_SOURCE_GENERATOR TBZ2)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    60
set(CPACK_GENERATOR DEB CACHE TEXT "Binary package generator, eg DEB, RPM, TGZ, NSIS...")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    61
set(CPACK_DEBIAN_PACKAGE_SECTION libs)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    62
find_program(DPKG_EXECUTABLE dpkg)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    63
if(DPKG_EXECUTABLE)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    64
	execute_process(COMMAND ${DPKG_EXECUTABLE} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    65
else()
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    66
	set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 CACHE TEXT "Architecture of package")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    67
endif()
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    68
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    69
set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so")
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    70
include(CPack)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    71
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    72
## Installation
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    73
install(TARGETS jingle DESTINATION lib/mcabber)