annotate freeDiameter/CMakeLists.txt @ 304:ad3c46016584

Added install directives for cmake; also allow default directory to seek for extensions and configuration files
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 14 May 2010 17:26:53 +0900
parents 71e508379671
children 61f78fdbacc2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 # The subproject name
1
bafb831ba688 Fix names to proper case for freeDiameter
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
2 Project("freeDiameterd" C)
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3
8
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
4 # Configuration parser
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
5 BISON_FILE(fdd.y)
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
6 FLEX_FILE(fdd.l)
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
7 SET_SOURCE_FILES_PROPERTIES(lex.fdd.c fdd.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}")
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
8
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
9 # List of source files
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 SET(FD_COMMON_SRC
1
bafb831ba688 Fix names to proper case for freeDiameter
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
11 fD.h
43
2db15632a63d Added a large part of connection establishment logic, to test
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 37
diff changeset
12 apps.c
25
67ca08d5bc48 Completed connection context files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 24
diff changeset
13 cnxctx.h
8
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
14 config.c
20
277ec00d793e Backup before typhoon... Progress on server side
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 17
diff changeset
15 cnxctx.c
24
bd83ce9328ed Cleanups and completed sctp code (not finished)
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 22
diff changeset
16 endpoints.c
82
b6344f1d521a Some cleanups
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 43
diff changeset
17 events.c
8
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
18 extensions.c
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
19 dict_base_proto.c
10
c5c99c73c2bf Added some extensions and functions in the daemon
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 8
diff changeset
20 messages.c
13
ef9ef3bf4752 Progress on peer state machine
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 11
diff changeset
21 queues.c
11
6576ef5e01eb Added some support for peers
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 10
diff changeset
22 peers.c
35
6486e97f56ae Added test for modified message parsing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 34
diff changeset
23 p_ce.c
37
cc3c59fe98fe Lot of cleanups in peer structure management
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 36
diff changeset
24 p_cnx.c
36
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 35
diff changeset
25 p_dw.c
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 35
diff changeset
26 p_dp.c
13
ef9ef3bf4752 Progress on peer state machine
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 11
diff changeset
27 p_expiry.c
33
e6fcdf12b9a0 Added a lot of TODOs :)
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 25
diff changeset
28 p_out.c
13
ef9ef3bf4752 Progress on peer state machine
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 11
diff changeset
29 p_psm.c
34
0e2b57789361 Backup for the WE, some warnings remaining
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 33
diff changeset
30 p_sr.c
123
960fa8048805 Merged routing and dispatch files for similarities
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 82
diff changeset
31 routing_dispatch.c
20
277ec00d793e Backup before typhoon... Progress on server side
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 17
diff changeset
32 server.c
22
0b3b46da2c12 Progress on server code
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 20
diff changeset
33 tcp.c
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
34 )
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
35
20
277ec00d793e Backup before typhoon... Progress on server side
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 17
diff changeset
36 IF(NOT DISABLE_SCTP)
25
67ca08d5bc48 Completed connection context files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 24
diff changeset
37 SET(FD_COMMON_SRC ${FD_COMMON_SRC} sctp.c sctps.c)
20
277ec00d793e Backup before typhoon... Progress on server side
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 17
diff changeset
38 ENDIF(NOT DISABLE_SCTP)
277ec00d793e Backup before typhoon... Progress on server side
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 17
diff changeset
39
8
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
40 SET(FD_COMMON_GEN_SRC
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
41 lex.fdd.c
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
42 fdd.tab.c
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
43 fdd.tab.h
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
44 )
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
45
16
013ce9851131 Started including TLS code
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 13
diff changeset
46 # Require GNU TLS for building the daemon
283
f433bc04eb6a Renamed module to align with distribution shiped file
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 244
diff changeset
47 FIND_PACKAGE(GnuTLS REQUIRED)
16
013ce9851131 Started including TLS code
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 13
diff changeset
48 INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIRS})
013ce9851131 Started including TLS code
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 13
diff changeset
49 SET(FD_LIBS ${FD_LIBS} ${GNUTLS_LIBRARIES})
17
ab3c58d88be3 Added proper gcrypt initializer
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 16
diff changeset
50 find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h)
ab3c58d88be3 Added proper gcrypt initializer
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 16
diff changeset
51 If ( NOT GCRYPT_INCLUDE_DIR )
ab3c58d88be3 Added proper gcrypt initializer
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 16
diff changeset
52 MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent")
ab3c58d88be3 Added proper gcrypt initializer
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 16
diff changeset
53 Endif ( NOT GCRYPT_INCLUDE_DIR )
304
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
54 MARK_AS_ADVANCED(GCRYPT_INCLUDE_DIR)
17
ab3c58d88be3 Added proper gcrypt initializer
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 16
diff changeset
55 INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR})
8
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
56
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
57 # Building the executable
8
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
58 ADD_EXECUTABLE(freeDiameterd ${FD_COMMON_SRC} ${FD_COMMON_GEN_SRC} main.c)
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
59
244
63fef1e56bc4 Fix an issue for FreeBSD
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 123
diff changeset
60 # Add this to workaround an apparent bug in FreeBSD cmake (already defined in Linux)
63fef1e56bc4 Fix an issue for FreeBSD
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 123
diff changeset
61 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic")
63fef1e56bc4 Fix an issue for FreeBSD
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 123
diff changeset
62
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
63 # The link command
1
bafb831ba688 Fix names to proper case for freeDiameter
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
64 LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreeDiameter)
bafb831ba688 Fix names to proper case for freeDiameter
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 0
diff changeset
65 TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS})
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
66
2
d8ce06172629 Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 1
diff changeset
67 # Save the list of files, if needed
d8ce06172629 Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 1
diff changeset
68 SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE)
8
3e143f047f78 Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 2
diff changeset
69 SET(FD_COMMON_GEN_SRC ${FD_COMMON_GEN_SRC} PARENT_SCOPE)
2
d8ce06172629 Added a global debug level var
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 1
diff changeset
70
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
71 # The unary tests directory
304
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
72 OPTION(SKIP_TESTS "Skip compilation of the tests?" ON)
0
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
73 IF ( NOT SKIP_TESTS )
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
74 SUBDIRS(tests)
13530e1f02e3 Initial files imported
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
75 ENDIF ( NOT SKIP_TESTS )
304
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
76 IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
77 MARK_AS_ADVANCED(SKIP_TESTS)
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
78 ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
79
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
80
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
81 ####
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
82 ## INSTALL section ##
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
83
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
84 INSTALL(TARGETS freeDiameterd
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
85 RUNTIME DESTINATION bin
ad3c46016584 Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 300
diff changeset
86 COMPONENT freeDiameter-daemon)
"Welcome to our mercurial repository"