Navigation


source: freeDiameter/freeDiameter/CMakeLists.txt @ 25:67ca08d5bc48

Last change on this file since 25:67ca08d5bc48 was 25:67ca08d5bc48, checked in by Sebastien Decugis <sdecugis@nict.go.jp>, 11 years ago

Completed connection context files

File size: 1.5 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        cnxctx.h
13        config.c
14        cnxctx.c
15        dispatch.c
16        endpoints.c
17        extensions.c
18        dict_base_proto.c
19        messages.c
20        queues.c
21        peers.c
22        p_expiry.c
23        p_psm.c
24        server.c
25        tcp.c
26        )
27
28IF(NOT DISABLE_SCTP)
29        SET(FD_COMMON_SRC ${FD_COMMON_SRC} sctp.c sctps.c)
30ENDIF(NOT DISABLE_SCTP)
31
32SET(FD_COMMON_GEN_SRC
33                lex.fdd.c
34                fdd.tab.c
35                fdd.tab.h
36        )
37
38# Require GNU TLS for building the daemon
39FIND_PACKAGE(GNUTLS REQUIRED)
40INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIRS})
41SET(FD_LIBS ${FD_LIBS} ${GNUTLS_LIBRARIES})
42find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h)
43If ( NOT GCRYPT_INCLUDE_DIR )
44        MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent")
45Endif ( NOT GCRYPT_INCLUDE_DIR )
46INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR})
47
48# Building the executable
49ADD_EXECUTABLE(freeDiameterd ${FD_COMMON_SRC} ${FD_COMMON_GEN_SRC} main.c)
50
51# The link command
52LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreeDiameter)
53TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS})
54
55# Save the list of files, if needed
56SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE)
57SET(FD_COMMON_GEN_SRC ${FD_COMMON_GEN_SRC} PARENT_SCOPE)
58
59# The unary tests directory
60OPTION(SKIP_TESTS "Skip compilation of the tests?" OFF)
61IF ( NOT SKIP_TESTS )
62        SUBDIRS(tests)
63ENDIF ( NOT SKIP_TESTS )
Note: See TracBrowser for help on using the repository browser.