blob: eb9fb8764590aa41592839efd417deb21235608d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
add_custom_command(OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/rlparse.c"
"${CMAKE_CURRENT_BINARY_DIR}/rlreduce.cc"
DEPENDS rlparse.lm
COMMAND colm::colm
ARGS -I.. -c -b rlparseJava
-o "${CMAKE_CURRENT_BINARY_DIR}/rlparse.c"
-m "${CMAKE_CURRENT_BINARY_DIR}/rlreduce.cc"
rlparse.lm
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}")
add_custom_command(OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/rlhc.c"
DEPENDS rlhc.lm
COMMAND colm::colm
ARGS -I.. -c -b rlhcJava
-o "${CMAKE_CURRENT_BINARY_DIR}/rlhc.c"
rlhc.lm
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}")
add_executable(ragel-java main.cc
"${CMAKE_CURRENT_BINARY_DIR}/rlhc.c"
"${CMAKE_CURRENT_BINARY_DIR}/rlparse.c"
"${CMAKE_CURRENT_BINARY_DIR}/rlreduce.cc")
target_link_libraries(ragel-java PRIVATE libragel libfsm)
if(${PROJECT_NAME}_MAKE_INSTALL)
install(TARGETS ragel-java
EXPORT ${_PACKAGE_NAME}-targets
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
endif()
|