macro(RAGEL_TARGET Name)
CMAKE_PARSE_ARGUMENTS(RAGEL "" "OUTPUT"
"INPUTS;DEPENDS;COMPILE_FLAGS" ${ARGN})
+
+ file(RELATIVE_PATH RAGEL_OUTPUT_RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${RAGEL_OUTPUT}")
+ file(RELATIVE_PATH RAGEL_INPUTS_RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${RAGEL_INPUTS}")
+
add_custom_command(OUTPUT ${RAGEL_OUTPUT}
COMMAND ${RAGEL_EXECUTABLE}
- ARGS ${RAGEL_COMPILE_FLAGS} -o${RAGEL_OUTPUT} ${RAGEL_INPUTS}
+ ARGS ${RAGEL_COMPILE_FLAGS}
+ -o${RAGEL_OUTPUT_RELATIVE} ${RAGEL_INPUTS_RELATIVE}
DEPENDS ${RAGEL_INPUTS} ${RAGEL_DEPENDS}
COMMENT
"[RAGEL][${Name}] Compiling state machine with Ragel ${RAGEL_VERSION}"
# use this include when module file is located in build tree
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RAGEL REQUIRED_VARS RAGEL_EXECUTABLE
- VERSION_VAR RAGEL_VERSION)
\ No newline at end of file
+ VERSION_VAR RAGEL_VERSION)