summaryrefslogtreecommitdiffstats
path: root/libxml/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libxml/CMakeLists.txt')
-rw-r--r--libxml/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/libxml/CMakeLists.txt b/libxml/CMakeLists.txt
new file mode 100644
index 0000000..96c5653
--- /dev/null
+++ b/libxml/CMakeLists.txt
@@ -0,0 +1,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
+)
+
+