CMakeLists.txt
author Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Sun, 12 Sep 2010 18:20:53 +0200
changeset 167 97f93fa3cd95
parent 162 6afab419ff88
permissions -rw-r--r--
Change socks5.c to s5b.c in the headers and cmakelist
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
162
6afab419ff88 Fix out of source build. Set build profiles options.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 154
diff changeset
    20
set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g")
6afab419ff88 Fix out of source build. Set build profiles options.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 154
diff changeset
    21
set(CMAKE_C_FLAGS_RELEASE "-O2")
6afab419ff88 Fix out of source build. Set build profiles options.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 154
diff changeset
    22
set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
6afab419ff88 Fix out of source build. Set build profiles options.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 154
diff changeset
    23
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Wall -O2 -g")
6afab419ff88 Fix out of source build. Set build profiles options.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 154
diff changeset
    24
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    25
## 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
    26
#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
    27
#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
    28
#
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
#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
    30
#
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
#endif(USE_LIBNAME)
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    32
 
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    33
## 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
    34
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
    35
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
    36
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
    37
pkg_check_modules(MCABBER REQUIRED mcabber)
154
1ffa1733d4b6 Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 139
diff changeset
    38
link_directories(${GLIB_LIBRARY_DIRS} ${LM_LIBRARY_DIRS} ${MCABBER_LIBRARY_DIRS})
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)
162
6afab419ff88 Fix out of source build. Set build profiles options.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 154
diff changeset
    42
include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} ${LM_INCLUDE_DIRS} ${MCABBER_INCLUDE_DIRS})
14
77966ed56e14 Create two subdirectories.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 12
diff changeset
    43
77966ed56e14 Create two subdirectories.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 12
diff changeset
    44
## Target definitions
77966ed56e14 Create two subdirectories.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 12
diff changeset
    45
add_subdirectory(jingle)
139
459b2503c1a3 Rename some stuff, create a README file, enable warnings in ./jingle
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 115
diff changeset
    46
add_subdirectory(jingle-ft)
49
8dddfbe488b6 Add ibb transport
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 21
diff changeset
    47
add_subdirectory(jingle-ibb)
154
1ffa1733d4b6 Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents: 139
diff changeset
    48
add_subdirectory(jingle-s5b)
1
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    49
6a9a25d32364 Add the parser of node and the CMakeList.txt
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    50
## 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
    51
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
    52
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
    53
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
    54
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
    55
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
    56
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
    57
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
    58
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
    59
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
    60
include(CPack)