Add CMake target for docs:

* Includes docs/ files in VC and xcode projects.
* Does NOT build automatically, so will not affect systems without the
  build toolchain.
This commit is contained in:
Edward Hennis
2016-10-05 17:39:23 -04:00
parent 96b17749af
commit 7d46d153c6
2 changed files with 40 additions and 1 deletions

View File

@@ -322,6 +322,27 @@ if (WIN32 OR is_xcode OR NOT unity)
# $<OR:$<CONFIG:Debug>,$<CONFIG:Release>>) # $<OR:$<CONFIG:Debug>,$<CONFIG:Release>>)
endif() endif()
if (WIN32 OR is_xcode)
# Documentation sources
prepend(doc_srcs
docs/
Jamfile.v2
boostbook.dtd
index.xml
main.qbk
quickref.xml
reference.xsl
source.dox)
set_property(
SOURCE ${doc_srcs}
APPEND
PROPERTY HEADER_FILE_ONLY
true)
# Doesn't work
# $<OR:$<CONFIG:Debug>,$<CONFIG:Release>>)
endif()
############################################################ ############################################################
add_with_props(rippled_src src/ripple/unity/soci.cpp add_with_props(rippled_src src/ripple/unity/soci.cpp
@@ -401,10 +422,28 @@ endif()
if (WIN32 OR is_xcode) if (WIN32 OR is_xcode)
group_sources(src) group_sources(src)
group_sources(docs)
endif() endif()
add_executable(rippled ${rippled_src} ${PROTO_HDRS}) add_executable(rippled ${rippled_src} ${PROTO_HDRS})
find_program(
B2_EXE
NAMES b2
PATHS ENV BOOST_ROOT
DOC "Location of the b2 build executable from Boost")
if(${B2_EXE} STREQUAL "b2-NOTFOUND")
message(WARNING
"Boost b2 executable not found. docs target will not be buildable")
endif()
add_custom_target(docs
COMMAND "./makeqbk.sh"
COMMAND ${B2_EXE}
BYPRODUCTS "${CMAKE_SOURCE_DIR}/docs/html/index.html"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/docs"
SOURCES "${doc_srcs}"
)
create_build_folder(rippled) create_build_folder(rippled)
set_startup_project(rippled) set_startup_project(rippled)

2
docs/makeqbk.sh Normal file → Executable file
View File

@@ -1,4 +1,4 @@
#!/usr/bin/bash #!/bin/bash
# Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot com) # Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot com)
# #