summaryrefslogtreecommitdiff
path: root/libxml/CMakeLists.txt
blob: 96c56534f97eafe40f6300a10b49916d64af4294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
include_directories(
    ${PROJECT_SOURCE_DIR}/libxml
)

add_custom_command(
    COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/scan_states.py ${PROJECT_SOURCE_DIR}/libxml/xml.l > ${GENERATED_SRC}/xml.l.h
    DEPENDS ${PROJECT_SOURCE_DIR}/src/scan_states.py ${PROJECT_SOURCE_DIR}/libxml/xml.l
    OUTPUT  ${GENERATED_SRC}/xml.l.h
)
set_source_files_properties(${GENERATED_SRC}/xml.l.h PROPERTIES GENERATED 1)

FLEX_TARGET(xml xml.l ${GENERATED_SRC}/xml.cpp COMPILE_FLAGS "${LEX_FLAGS}")

add_library(xml
${GENERATED_SRC}/xml.cpp
${GENERATED_SRC}/xml.l.h
)