CMakeLists.txt for the json example
This commit is contained in:
parent
3a646f03e3
commit
da924145ac
|
@ -129,9 +129,10 @@ endif()
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
add_dependencies(Parsodus ext-optparse)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
add_dependencies(Parsodus ext-optparse)
|
add_subdirectory(examples)
|
||||||
|
|
||||||
install(DIRECTORY templates
|
install(DIRECTORY templates
|
||||||
DESTINATION share/Parsodus
|
DESTINATION share/Parsodus
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
add_subdirectory(json)
|
|
@ -0,0 +1,19 @@
|
||||||
|
add_custom_command(DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/JSONLexer.lxs"
|
||||||
|
COMMAND "${LEXESIS_EXE}" ARGS -d "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/JSONLexer.lxs"
|
||||||
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/JSONLexer.h" "${CMAKE_CURRENT_BINARY_DIR}/JSONLexer.cpp")
|
||||||
|
|
||||||
|
find_program(PARSODUS_EXE Parsodus PATH "${CMAKE_CURRENT_BINARY_DIR}/../../bin")
|
||||||
|
|
||||||
|
add_custom_command(DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/JSONParser.pds"
|
||||||
|
COMMAND "${PARSODUS_EXE}" ARGS -d "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/JSONParser.pds"
|
||||||
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/JSONParser.h" "${CMAKE_CURRENT_BINARY_DIR}/JSONParser.cpp")
|
||||||
|
|
||||||
|
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
|
add_executable(json
|
||||||
|
EXCLUDE_FROM_ALL
|
||||||
|
json.cpp
|
||||||
|
main.cpp
|
||||||
|
parser.cpp
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/JSONLexer.cpp"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/JSONParser.cpp")
|
Loading…
Reference in New Issue