2010-11-12 04:44:25 -05:00
|
|
|
project (ndhc)
|
|
|
|
|
|
|
|
cmake_minimum_required (VERSION 2.6)
|
|
|
|
|
2014-03-10 00:52:56 -04:00
|
|
|
include_directories("${PROJECT_SOURCE_DIR}")
|
|
|
|
|
|
|
|
set(RAGEL_IFCHD_PARSE ${CMAKE_CURRENT_BINARY_DIR}/ifchd-parse.c)
|
|
|
|
|
|
|
|
find_program(RAGEL ragel)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${RAGEL_IFCHD_PARSE}
|
|
|
|
COMMAND ${RAGEL} -G2 -o ${RAGEL_IFCHD_PARSE} ifchd-parse.rl
|
|
|
|
DEPENDS ifchd-parse.rl
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
COMMENT "Compiling Ragel state machine: ifchd-parse.rl"
|
|
|
|
VERBATIM
|
|
|
|
)
|
|
|
|
|
2011-04-19 16:37:43 -04:00
|
|
|
file(GLOB NDHC_SRCS "*.c")
|
2010-11-12 04:44:25 -05:00
|
|
|
|
2014-03-10 00:52:56 -04:00
|
|
|
add_executable(ndhc ${RAGEL_IFCHD_PARSE} ${NDHC_SRCS})
|
2011-07-03 17:30:55 -04:00
|
|
|
target_link_libraries(ndhc ncmlib)
|