Make building docs optional
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6b610aaa84
commit
e9c7141d40
2 changed files with 13 additions and 9 deletions
|
@ -16,7 +16,7 @@ steps:
|
|||
image: alpine
|
||||
commands:
|
||||
- apk add -t hermes-build-deps --no-cache perl graphviz doxygen gcc make openssl-dev libspf2-dev cmake g++ sqlite-dev gettext-dev
|
||||
- cmake -B build_dir
|
||||
- cmake -B build_dir -D BUILD_DOCS=ON
|
||||
- cmake --build build_dir
|
||||
- name: docker image build
|
||||
image: plugins/docker
|
||||
|
|
|
@ -14,6 +14,8 @@ add_executable (hermes
|
|||
src/Proxy.cpp
|
||||
src/Socket.cpp)
|
||||
|
||||
option(BUILD_DOC "Build documentation")
|
||||
|
||||
if(WIN32)
|
||||
set(SOURCES ${SOURCES}
|
||||
src/FileLogger.cpp
|
||||
|
@ -56,14 +58,16 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Configfile.cpp
|
|||
|
||||
|
||||
# doxygen
|
||||
find_package (Doxygen REQUIRED dot)
|
||||
if(DOXYGEN_FOUND)
|
||||
add_custom_target(doc ALL
|
||||
doxygen
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs)
|
||||
install(
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs/html
|
||||
TYPE DOC)
|
||||
if (BUILD_DOCS)
|
||||
find_package (Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
add_custom_target(doc ALL
|
||||
doxygen
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs)
|
||||
install(
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs/html
|
||||
TYPE DOC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(hermes
|
||||
|
|
Loading…
Add table
Reference in a new issue