File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -107,3 +107,31 @@ install(
107107 DESTINATION
108108 ${CMAKE_INSTALL_LIBDIR} /pkgconfig
109109)
110+
111+ option (BUILD_DOCS "Build the documentation" OFF )
112+ IF (BUILD_DOCS)
113+ find_program (HOTDOC hotdoc)
114+ IF (NOT HOTDOC)
115+ message (FATAL_ERROR "hotdoc not found!" )
116+ ENDIF ()
117+
118+ execute_process (
119+ COMMAND ${HOTDOC} --has-extension c-extension
120+ RESULT_VARIABLE HAS_HOTDOC_C_EXTENSION
121+ )
122+ IF ("${HAS_HOTDOC_C_EXTENSION} " EQUAL 0)
123+ add_custom_target (Documentation ALL
124+ ${HOTDOC} run
125+ --project-name =WPE
126+ --project-version =1.0
127+ --sitemap=${CMAKE_SOURCE_DIR} /docs/sitemap.txt
128+ --output =${CMAKE_CURRENT_BINARY_DIR} /Documentation/
129+ --c-sources ="${CMAKE_SOURCE_DIR} /include/wpe/*.[ch]"
130+ --extra-c-flags =-DWPE_COMPILATION=true
131+ --c-include -directories ${CMAKE_SOURCE_DIR} /include ${DERIVED_SOURCES_DIR} /..
132+ --c-smart-index
133+ )
134+ ELSE ()
135+ MESSAGE (FATAL_ERROR "Hotdoc C extension not found... can't build the documentation." )
136+ ENDIF ()
137+ ENDIF ()
Original file line number Diff line number Diff line change 1+ c-index
You can’t perform that action at this time.
0 commit comments