Mercurial > hg > freeDiameter
comparison extensions/app_redirect/CMakeLists.txt @ 722:6a7323cd78b3
New app_redirect.fdx code (UNTESTED)
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Mon, 21 Feb 2011 18:31:18 +0900 |
parents | |
children | 2bf587a8f6bc |
comparison
equal
deleted
inserted
replaced
721:01f796160f7f | 722:6a7323cd78b3 |
---|---|
1 # The rt_default extension | |
2 PROJECT("Configurable Redirects server extension" C) | |
3 | |
4 # Check if REG_STARTEND is provided on the host | |
5 SET(CHECK_REG_STARTEND_SOURCE_CODE " | |
6 #include <unistd.h> | |
7 #include <regex.h> | |
8 int main() { | |
9 return regexec(NULL, NULL, 0, NULL, REG_STARTEND); | |
10 } | |
11 ") | |
12 CHECK_C_SOURCE_COMPILES("${CHECK_REG_STARTEND_SOURCE_CODE}" HAVE_REG_STARTEND) | |
13 # Generate the host.h file | |
14 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ard-host.h.in ${CMAKE_CURRENT_BINARY_DIR}/ard-host.h) | |
15 | |
16 # Parser files | |
17 BISON_FILE(ard_conf.y) | |
18 FLEX_FILE(ard_conf.l) | |
19 SET_SOURCE_FILES_PROPERTIES(lex.ard_conf.c ard_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") | |
20 | |
21 # List of source files | |
22 SET( APP_REDIR_SRC | |
23 app_redir.c | |
24 app_redir.h | |
25 lex.ard_conf.c | |
26 ard_conf.tab.c | |
27 ard_conf.tab.h | |
28 ard_rules.c | |
29 ) | |
30 | |
31 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) | |
32 | |
33 # Compile these files as a freeDiameter extension | |
34 FD_ADD_EXTENSION(app_redirect ${APP_REDIR_SRC}) | |
35 | |
36 | |
37 #### | |
38 ## INSTALL section ## | |
39 | |
40 INSTALL(TARGETS app_redirect | |
41 LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} | |
42 COMPONENT freeDiameter-app_redirect) |