Mercurial > hg > freeDiameter
annotate extensions/CMakeLists.txt @ 600:e9c0bdedf2eb
Initial draft version of dict_legacy_xml, parses XML file but no conversion to fD yet.
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 19 Nov 2010 17:36:33 +0900 |
parents | e141506deef8 |
children | 2d15fd8ef5ba |
rev | line source |
---|---|
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
1 PROJECT("freeDiameter extensions" C) |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
2 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
3 # We want all resulting objects in the same folder |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
4 SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
5 |
9
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
6 # Use the macro FD_ADD_EXTENSION(name files...) to create an extension |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
7 # It is equivalent to add_library with the appropriate parameters |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
8 # and naming conventions (.fdx : FreeDiameter eXtension) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
9 MACRO(FD_ADD_EXTENSION EXTNAME) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
10 ADD_LIBRARY(${EXTNAME} MODULE ${ARGN}) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
11 SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES PREFIX "" ) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
12 SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES SUFFIX ".fdx" ) |
fc7c18867cf7
New extension mechanism committed
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
8
diff
changeset
|
13 ENDMACRO(FD_ADD_EXTENSION) |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
14 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
15 # Use the macro FD_EXTENSION_SUBDIR(extmacroname subdir descr default) to |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
16 # add a new extension subdirectory. |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
17 MACRO(FD_EXTENSION_SUBDIR EXTSUBDIR EXTDESCR EXTDEFAULT) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
18 STRING(TOUPPER ${EXTSUBDIR} EXTMACRONAME) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
19 IF (NOT ALL_EXTENSIONS) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
20 OPTION(BUILD_${EXTMACRONAME} "Build ${EXTSUBDIR}.fdx? (${EXTDESCR})" ${EXTDEFAULT}) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
21 ENDIF (NOT ALL_EXTENSIONS) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
22 IF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
23 SUBDIRS(${EXTSUBDIR}) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
24 ENDIF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
25 ENDMACRO(FD_EXTENSION_SUBDIR) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
26 |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
27 OPTION(ALL_EXTENSIONS "Build ALL available extensions? (disable to select individual components)" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
28 |
238
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
29 # The extensions include the headers of freeDiameter that contains gnutls objects |
283
f433bc04eb6a
Renamed module to align with distribution shiped file
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
279
diff
changeset
|
30 FIND_PACKAGE(GnuTLS REQUIRED) |
493
d68f27e7e814
Fixed a few CMake variable names
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
425
diff
changeset
|
31 INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIR}) |
238
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
32 find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h) |
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
33 If ( NOT GCRYPT_INCLUDE_DIR ) |
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
34 MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent") |
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
35 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:
283
diff
changeset
|
36 MARK_AS_ADVANCED(GCRYPT_INCLUDE_DIR) |
238
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
37 INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR}) |
62eaf631eb61
Fix compilation issue when gnutls is not in standard directory
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
167
diff
changeset
|
38 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
39 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
40 ########################### |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
41 # Extensions section |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
42 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
43 #### |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
44 # Diameter applications dictionaries |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
45 |
596
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
46 FD_EXTENSION_SUBDIR(dict_nasreq "NASREQ (RFC4005) Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
47 FD_EXTENSION_SUBDIR(dict_eap "Diameter EAP (RFC4072) Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
48 |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
49 FD_EXTENSION_SUBDIR(dict_sip "Diameter SIP (RFC4740) Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
50 |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
51 FD_EXTENSION_SUBDIR(dict_mip6a "Diameter Mobile IPv6 Auth Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
52 FD_EXTENSION_SUBDIR(dict_mip6i "Diameter Mobile IPv6 IKE Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
53 FD_EXTENSION_SUBDIR(dict_nas_mipv6 "Diameter NAS-to-HAAA Interaction Dictionary definitions" ON) |
e141506deef8
Added options for the new extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
583
diff
changeset
|
54 FD_EXTENSION_SUBDIR(dict_rfc5777 "Classification and QoS (RFC 5777) Dictionary definitions" ON) |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
55 |
600
e9c0bdedf2eb
Initial draft version of dict_legacy_xml, parses XML file but no conversion to fD yet.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
596
diff
changeset
|
56 FD_EXTENSION_SUBDIR(dict_legacy_xml "Load Diameter dictionary definitions from XML files." OFF) |
e9c0bdedf2eb
Initial draft version of dict_legacy_xml, parses XML file but no conversion to fD yet.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
596
diff
changeset
|
57 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
58 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
59 #### |
254
a857024cb48b
Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
238
diff
changeset
|
60 # Diameter applications |
a857024cb48b
Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
238
diff
changeset
|
61 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
62 FD_EXTENSION_SUBDIR(app_acct "Simple accounting application that stores accounting records in flat database" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
63 FD_EXTENSION_SUBDIR(app_diameap "Diameter EAP Application server (RFC 4072)" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
64 FD_EXTENSION_SUBDIR(app_radgw "RADIUS/Diameter gateway translation - RADIUS client to Diameter server" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
65 FD_EXTENSION_SUBDIR(app_sip "Diameter SIP Authentication and Authorization server (RFC 4740)" OFF) |
283
f433bc04eb6a
Renamed module to align with distribution shiped file
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
279
diff
changeset
|
66 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
67 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
68 #### |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
69 # Routing extensions |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
70 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
71 FD_EXTENSION_SUBDIR(rt_default "Configurable routing rules for freeDiameter" ON) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
72 FD_EXTENSION_SUBDIR(rt_ereg "Configurable routing based on regexp matching of AVP values" OFF) |
514
179ef7de53de
New extension: load-balancing based on numerical user-name AVP values
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
493
diff
changeset
|
73 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
74 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
75 #### |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
76 # Peers security extensions |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
77 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
78 FD_EXTENSION_SUBDIR(acl_wl "White-list based authorization of incoming connections" ON) |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
79 |
254
a857024cb48b
Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
238
diff
changeset
|
80 |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
81 #### |
254
a857024cb48b
Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
238
diff
changeset
|
82 # Debug & test extensions |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
83 |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
84 FD_EXTENSION_SUBDIR(dbg_monitor "Outputs periodical status information" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
85 FD_EXTENSION_SUBDIR(dbg_rt "Routing extension for debugging the routing module" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
86 FD_EXTENSION_SUBDIR(test_app "Testing application to send dummy message to another peer, like a Diameter 'ping'" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
87 FD_EXTENSION_SUBDIR(test_sip "Testing application to simulate Diameter-SIP client (RFC4740)" OFF) |
8
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
88 |
3e143f047f78
Backup for the week-end
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff
changeset
|
89 |
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:
283
diff
changeset
|
90 # The following extension have very little use except for specific tests, so we disable them except in Debug configurations. |
ad3c46016584
Added install directives for cmake; also allow default directory to seek for extensions and configuration files
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
283
diff
changeset
|
91 IF (CMAKE_BUILD_TYPE MATCHES "Debug") |
583
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
92 FD_EXTENSION_SUBDIR(_sample "Simple extension to demonstrate extension mechanism, for developpers" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
93 FD_EXTENSION_SUBDIR(test_acct "Receive Accounting-Requests and display the data, but no storage" OFF) |
7d431a751d6c
Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
524
diff
changeset
|
94 FD_EXTENSION_SUBDIR(test_rt_any "Routing extension randomly sending message to any peer available, for testing purpose" OFF) |
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:
283
diff
changeset
|
95 ENDIF (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:
283
diff
changeset
|
96 |