Skip to content

Commit

Permalink
Install shaders and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rpavlik committed Feb 20, 2015
1 parent 60901c4 commit c123338
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ include(MSVCMultipleProcessCompile)
include(CopyImportedTarget)

include(InstallRequiredSystemLibraries)
if(WIN32)
# Flat install for docs on Windows.
set(CMAKE_INSTALL_DOCDIR .)
endif()
include(GNUInstallDirs)
if(NOT CMAKE_INSTALL_DOCDIR)
set(CMAKE_INSTALL_DOCDIR ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME})
endif()

###
# Dependencies
Expand All @@ -32,6 +39,29 @@ find_package(Qt5OpenGL REQUIRED)
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)


# For generating documentation in HTML
if(WIN32)
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/discount-windows-bins")
endif()
find_package(Markdown)

###
# Docs
###
# Convert the README to HTML if we can
if(MARKDOWN_FOUND)
include(UseMarkdown)
add_markdown_target(markdown_docs "${CMAKE_CURRENT_BINARY_DIR}" README.md)

install_markdown_target(markdown_docs DESTINATION ${CMAKE_INSTALL_DOCDIR})
else()
install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
endif()

# Install the fragment shaders as documentation.
install(FILES vizard/ShaderTest.frag vizard/ShaderTest.vert DESTINATION ${CMAKE_INSTALL_DOCDIR})

###
# Building
###
Expand Down

0 comments on commit c123338

Please sign in to comment.