summaryrefslogtreecommitdiffstats
path: root/data/gendoc
diff options
context:
space:
mode:
Diffstat (limited to 'data/gendoc')
-rw-r--r--data/gendoc/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/data/gendoc/CMakeLists.txt b/data/gendoc/CMakeLists.txt
new file mode 100644
index 0000000..3336f3f
--- /dev/null
+++ b/data/gendoc/CMakeLists.txt
@@ -0,0 +1,19 @@
+file( GLOB_RECURSE _h_files RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/*.h )
+file( GLOB_RECURSE _cpp_files RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/*.cpp )
+
+set( GENERATE_DIR "${CMAKE_BINARY_DIR}/gendoc" )
+
+add_custom_target(generate_docfiles ALL
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${GENERATE_DIR}
+ COMMAND perl data/gendoc/gendoc.pl -v ${PACKAGE_VERSION} ${GENERATE_DIR}
+ data/doctemplates/*.template ${_cpp_files} ${_h_files}
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+)
+
+install(CODE "
+ file(
+ INSTALL ${GENERATE_DIR}/
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/help/en
+ PATTERN *.html
+ )
+")