File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,14 @@ include(MSVCMultipleProcessCompile)
18
18
include (CopyImportedTarget )
19
19
20
20
include (InstallRequiredSystemLibraries )
21
+ if (WIN32 )
22
+ # Flat install for docs on Windows.
23
+ set (CMAKE_INSTALL_DOCDIR . )
24
+ endif ()
21
25
include (GNUInstallDirs )
26
+ if (NOT CMAKE_INSTALL_DOCDIR )
27
+ set (CMAKE_INSTALL_DOCDIR ${CMAKE_INSTALL_DATAROOTDIR} /doc/${PROJECT_NAME} )
28
+ endif ()
22
29
23
30
###
24
31
# Dependencies
@@ -32,6 +39,29 @@ find_package(Qt5OpenGL REQUIRED)
32
39
find_package (OpenGL REQUIRED )
33
40
find_package (GLEW REQUIRED )
34
41
42
+
43
+ # For generating documentation in HTML
44
+ if (WIN32 )
45
+ list (APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR} /third-party/discount-windows-bins" )
46
+ endif ()
47
+ find_package (Markdown )
48
+
49
+ ###
50
+ # Docs
51
+ ###
52
+ # Convert the README to HTML if we can
53
+ if (MARKDOWN_FOUND )
54
+ include (UseMarkdown )
55
+ add_markdown_target (markdown_docs "${CMAKE_CURRENT_BINARY_DIR} " README.md )
56
+
57
+ install_markdown_target (markdown_docs DESTINATION ${CMAKE_INSTALL_DOCDIR} )
58
+ else ()
59
+ install (FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR} )
60
+ endif ()
61
+
62
+ # Install the fragment shaders as documentation.
63
+ install (FILES vizard/ShaderTest.frag vizard/ShaderTest.vert DESTINATION ${CMAKE_INSTALL_DOCDIR} )
64
+
35
65
###
36
66
# Building
37
67
###
You can’t perform that action at this time.
0 commit comments