kicad-source/thirdparty/lemon/CMakeLists.txt
Ian McInerney 0a1d8c1aaa Move lemon parser generation into build directory
This moves the generated files out of the source tree and into
the build directory. They are now regenerated each time they are
needed, based on the timestamp of the generated file compared to
the timestamp of the lemon file.

To do this, we also bundle lemon into the thirdparty directory
and build it for ourselves since it is a very tiny program and
not all platforms seem to distribute it in a consistent manner.

Fixes https://gitlab.com/kicad/code/kicad/issues/5013
2020-08-10 13:53:54 +00:00

15 lines
423 B
CMake

add_executable( lemon
lemon.c
)
# The location of the template file for lemon is passed as a property on the lemon target
define_property( TARGET
PROPERTY lemon_template
BRIEF_DOCS "Location of the template file for the lemon parser"
FULL_DOCS "Location of the template file for the lemon parser"
)
set_property( TARGET lemon
PROPERTY lemon_template ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c
)