Navigation


source: freeDiameter/freeDiameter/CMakeLists.txt @ 20:277ec00d793e

Last change on this file since 20:277ec00d793e was 20:277ec00d793e, checked in by Sebastien Decugis <sdecugis@nict.go.jp>, 12 years ago

Backup before typhoon... Progress on server side

File size: 1.4 KB
Line 
1# The subproject name
2Project("freeDiameterd" C)
3
4# Configuration parser
5BISON_FILE(fdd.y)
6FLEX_FILE(fdd.l)
7SET_SOURCE_FILES_PROPERTIES(lex.fdd.c fdd.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}")
8
9# List of source files
10SET(FD_COMMON_SRC
11        fD.h
12        config.c
13        cnxctx.c
14        dispatch.c
15        extensions.c
16        dict_base_proto.c
17        messages.c
18        queues.c
19        peers.c
20        p_expiry.c
21        p_psm.c
22        server.c
23        )
24
25IF(NOT DISABLE_SCTP)
26        SET(FD_COMMON_SRC ${FD_COMMON_SRC} sctp.c)
27ENDIF(NOT DISABLE_SCTP)
28
29SET(FD_COMMON_GEN_SRC
30                lex.fdd.c
31                fdd.tab.c
32                fdd.tab.h
33        )
34
35# Require GNU TLS for building the daemon
36FIND_PACKAGE(GNUTLS REQUIRED)
37INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIRS})
38SET(FD_LIBS ${FD_LIBS} ${GNUTLS_LIBRARIES})
39find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h)
40If ( NOT GCRYPT_INCLUDE_DIR )
41        MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent")
42Endif ( NOT GCRYPT_INCLUDE_DIR )
43INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR})
44
45# Building the executable
46ADD_EXECUTABLE(freeDiameterd ${FD_COMMON_SRC} ${FD_COMMON_GEN_SRC} main.c)
47
48# The link command
49LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreeDiameter)
50TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS})
51
52# Save the list of files, if needed
53SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE)
54SET(FD_COMMON_GEN_SRC ${FD_COMMON_GEN_SRC} PARENT_SCOPE)
55
56# The unary tests directory
57OPTION(SKIP_TESTS "Skip compilation of the tests?" OFF)
58IF ( NOT SKIP_TESTS )
59        SUBDIRS(tests)
60ENDIF ( NOT SKIP_TESTS )
Note: See TracBrowser for help on using the repository browser.