Line | |
---|
1 | # The subproject name |
---|
2 | Project("freeDiameterd" C) |
---|
3 | |
---|
4 | # Configuration parser |
---|
5 | BISON_FILE(fdd.y) |
---|
6 | FLEX_FILE(fdd.l) |
---|
7 | SET_SOURCE_FILES_PROPERTIES(lex.fdd.c fdd.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") |
---|
8 | |
---|
9 | # List of source files |
---|
10 | SET(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 | |
---|
28 | IF(NOT DISABLE_SCTP) |
---|
29 | SET(FD_COMMON_SRC ${FD_COMMON_SRC} sctp.c sctps.c) |
---|
30 | ENDIF(NOT DISABLE_SCTP) |
---|
31 | |
---|
32 | SET(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 |
---|
39 | FIND_PACKAGE(GNUTLS REQUIRED) |
---|
40 | INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIRS}) |
---|
41 | SET(FD_LIBS ${FD_LIBS} ${GNUTLS_LIBRARIES}) |
---|
42 | find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h) |
---|
43 | If ( NOT GCRYPT_INCLUDE_DIR ) |
---|
44 | MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent") |
---|
45 | Endif ( NOT GCRYPT_INCLUDE_DIR ) |
---|
46 | INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR}) |
---|
47 | |
---|
48 | # Building the executable |
---|
49 | ADD_EXECUTABLE(freeDiameterd ${FD_COMMON_SRC} ${FD_COMMON_GEN_SRC} main.c) |
---|
50 | |
---|
51 | # The link command |
---|
52 | LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreeDiameter) |
---|
53 | TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS}) |
---|
54 | |
---|
55 | # Save the list of files, if needed |
---|
56 | SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE) |
---|
57 | SET(FD_COMMON_GEN_SRC ${FD_COMMON_GEN_SRC} PARENT_SCOPE) |
---|
58 | |
---|
59 | # The unary tests directory |
---|
60 | OPTION(SKIP_TESTS "Skip compilation of the tests?" OFF) |
---|
61 | IF ( NOT SKIP_TESTS ) |
---|
62 | SUBDIRS(tests) |
---|
63 | ENDIF ( NOT SKIP_TESTS ) |
---|
Note: See
TracBrowser
for help on using the repository browser.