CMakeLists.txt
author Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Tue, 01 Jun 2010 09:21:54 +0200
changeset 10 3ddaf757e36a
parent 6 a035ec60dc7f
child 12 eb167636e5bc
permissions -rw-r--r--
some things
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
#
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     3
# 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
     4
# 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
     5
# 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
     6
# (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
     7
#
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     8
# 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
     9
# 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
    10
# 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
    11
# 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
    12
#
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    13
# 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
    14
# 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
    15
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    16
cmake_minimum_required(VERSION 2.6) 
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    17
project(mcabber-jingle C) 
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    18
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
    19
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    20
## User settable options
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    21
#option(USE_LIBNAME "Option Description")
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    22
#if(USE_LIBNAME)
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    23
#
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    24
#else(USE_LIBNAME)
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    25
#
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    26
#endif(USE_LIBNAME)
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    27
 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    28
## Check for build dependencies
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    29
find_package(PkgConfig REQUIRED)
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    30
pkg_check_modules(GLIB REQUIRED glib-2.0)
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    31
pkg_check_modules(LM REQUIRED loudmouth-1.0)
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    32
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
    33
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
    34
				 ${LM_LIBRARY_DIRS}
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    35
				 ${MCABBER_LIBRARY_DIRS})
1
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
## Target definitions
10
3ddaf757e36a some things
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 6
diff changeset
    38
add_library(jingle MODULE jingle.c parse.c jingle_register.c error.c)
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    39
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    40
## Compiler setup
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    41
configure_file(config.h.in config.h)
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    42
include_directories(SYSTEM ${GLIB_INCLUDE_DIRS}
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    43
                    ${LM_INCLUDE_DIRS}
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    44
					${MCABBER_INCLUDE_DIRS})
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    45
target_link_libraries(jingle ${GLIB_LIBRARIES}
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    46
					  ${LM_LIBRARIES}
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    47
					  ${MCABBER_LIBRARIES})
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    48
include_directories(${autoaway_SOURCE_DIR}
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    49
                    ${autoaway_BINARY_DIR})
1
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
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    53
set(CPACK_PACKAGE_NAME mcabber-jingle)
1
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>")
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    57
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Base jingle functions")
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    58
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
    59
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
    60
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
    61
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
    62
include(CPack)
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    63
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    64
## Installation
2
a48121a74017 Clean up the code, fix the coding style and improve the CMakeLists
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 1
diff changeset
    65
install(TARGETS jingle DESTINATION lib/mcabber)