view extensions/CMakeLists.txt @ 651:083317a4e947

Added new test_netemul extension (need testing)
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 07 Jan 2011 18:33:37 +0900
parents 2d15fd8ef5ba
children 1f7c7ce85db3
line wrap: on
line source

PROJECT("freeDiameter extensions" C)

# We want all resulting objects in the same folder
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})

# Use the macro FD_ADD_EXTENSION(name files...) to create an extension
# It is equivalent to add_library with the appropriate parameters
# and naming conventions (.fdx : FreeDiameter eXtension)
MACRO(FD_ADD_EXTENSION EXTNAME)
  ADD_LIBRARY(${EXTNAME} MODULE ${ARGN})
  SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES PREFIX "" )
  SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES SUFFIX ".fdx" )
ENDMACRO(FD_ADD_EXTENSION)

# Use the macro FD_EXTENSION_SUBDIR(extmacroname subdir descr default) to 
# add a new extension subdirectory.
MACRO(FD_EXTENSION_SUBDIR EXTSUBDIR EXTDESCR EXTDEFAULT)
   STRING(TOUPPER ${EXTSUBDIR} EXTMACRONAME)
   IF (NOT ALL_EXTENSIONS)
     OPTION(BUILD_${EXTMACRONAME} "Build ${EXTSUBDIR}.fdx? (${EXTDESCR})" ${EXTDEFAULT})
   ENDIF (NOT ALL_EXTENSIONS)
   IF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS)
      SUBDIRS(${EXTSUBDIR})
   ENDIF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS)
ENDMACRO(FD_EXTENSION_SUBDIR)

OPTION(ALL_EXTENSIONS "Build ALL available extensions? (disable to select individual components)" OFF)

# The extensions include the headers of freeDiameter that contains gnutls objects
FIND_PACKAGE(GnuTLS REQUIRED)
INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIR})
find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h)
If ( NOT GCRYPT_INCLUDE_DIR )
	MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent")
Endif ( NOT GCRYPT_INCLUDE_DIR )
MARK_AS_ADVANCED(GCRYPT_INCLUDE_DIR)
INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR})


###########################
# Extensions section

####
# Diameter applications dictionaries

FD_EXTENSION_SUBDIR(dict_nasreq "NASREQ (RFC4005) Dictionary definitions"       ON)
FD_EXTENSION_SUBDIR(dict_eap    "Diameter EAP (RFC4072) Dictionary definitions" ON)

FD_EXTENSION_SUBDIR(dict_sip    "Diameter SIP (RFC4740) Dictionary definitions" ON)

FD_EXTENSION_SUBDIR(dict_mip6a     "Diameter Mobile IPv6 Auth Dictionary definitions"         ON)
FD_EXTENSION_SUBDIR(dict_mip6i     "Diameter Mobile IPv6 IKE Dictionary definitions"          ON)
FD_EXTENSION_SUBDIR(dict_nas_mipv6 "Diameter NAS-to-HAAA Interaction Dictionary definitions"  ON)
FD_EXTENSION_SUBDIR(dict_rfc5777   "Classification and QoS (RFC 5777) Dictionary definitions" ON)

FD_EXTENSION_SUBDIR(dict_legacy_xml "Load Diameter dictionary definitions from XML files."    OFF)


####
# Diameter applications

FD_EXTENSION_SUBDIR(app_acct    "Simple accounting application that stores accounting records in flat database" OFF)
FD_EXTENSION_SUBDIR(app_diameap "Diameter EAP Application server (RFC 4072)" 					OFF)
FD_EXTENSION_SUBDIR(app_radgw   "RADIUS/Diameter gateway translation - RADIUS client to Diameter server" 	OFF)
FD_EXTENSION_SUBDIR(app_sip     "Diameter SIP Authentication and Authorization server (RFC 4740)" 		OFF)


####
# Routing extensions

FD_EXTENSION_SUBDIR(rt_default "Configurable routing rules for freeDiameter" 		     ON)
FD_EXTENSION_SUBDIR(rt_ereg    "Configurable routing based on regexp matching of AVP values" OFF)


####
# Peers security extensions

FD_EXTENSION_SUBDIR(acl_wl "White-list based authorization of incoming connections" ON)


####
# Debug & test extensions

FD_EXTENSION_SUBDIR(dbg_monitor "Outputs periodical status information"              OFF)
FD_EXTENSION_SUBDIR(dbg_rt      "Routing extension for debugging the routing module" OFF)
FD_EXTENSION_SUBDIR(test_app    "Testing application to send dummy message to another peer, like a Diameter 'ping'" OFF)
FD_EXTENSION_SUBDIR(test_sip    "Testing application to simulate Diameter-SIP client (RFC4740)" OFF)
FD_EXTENSION_SUBDIR(dbg_interactive "Python-interpreter based module"                OFF)
FD_EXTENSION_SUBDIR(test_netemul "Simple Diameter network emulator proxy extension (latency, PDV, duplicates)" OFF)



# The following extension have very little use except for specific tests, so we disable them except in Debug configurations.
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
	FD_EXTENSION_SUBDIR(_sample     "Simple extension to demonstrate extension mechanism, for developpers" OFF)
	FD_EXTENSION_SUBDIR(test_acct   "Receive Accounting-Requests and display the data, but no storage" OFF)
	FD_EXTENSION_SUBDIR(test_rt_any "Routing extension randomly sending message to any peer available, for testing purpose" OFF)
ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug")

"Welcome to our mercurial repository"