summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-24 20:55:27 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-24 20:55:27 +0100
commit4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289 (patch)
treeddd64c27220b75f45a6efdc162bbbe040a9ca001 /src/CMakeLists.txt
parent78fe2cda0572433e40889bcd7d64dd22707bfdd0 (diff)
downloadfastd-4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289.tar
fastd-4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289.zip
Partial implementation of a config files parser
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 223c62a..1da7d13 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,5 @@
set(METHODS method_null.c)
-set(FASTD_INCLUDES ${FASTD_BINARY_DIR})
+set(FASTD_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${FASTD_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set(FASTD_LIBS "")
if(WITH_METHOD_ECFXP)
@@ -10,5 +10,19 @@ endif(WITH_METHOD_ECFXP)
include_directories(${FASTD_INCLUDES})
-add_executable(fastd fastd.c configure.c handshake.c peer.c printf.c queue.c task.c ${METHODS})
+FLEX_TARGET(fastd_config_lex config.l ${CMAKE_CURRENT_BINARY_DIR}/config.ll.c)
+BISON_TARGET(fastd_config_parse config.y ${CMAKE_CURRENT_BINARY_DIR}/config.yy.c)
+
+add_executable(fastd
+ fastd.c
+ config.c
+ handshake.c
+ peer.c
+ printf.c
+ queue.c
+ task.c
+ ${FLEX_fastd_config_lex_OUTPUTS}
+ ${BISON_fastd_config_parse_OUTPUTS}
+ ${METHODS}
+)
target_link_libraries(fastd rt ${FASTD_LIBS})