From 2cef4d6f20d1e21afc3c12c9fb24c64a959d41f9 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 7 Nov 2019 23:05:52 +0100 Subject: [PATCH] CMakeLists.txt: add BUILD_DOC option (#165) Signed-off-by: Fabrice Fontaine --- AUTHORS | 1 + CMakeLists.txt | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 4f275e21..c6e0d27b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -23,3 +23,4 @@ slyshykO bmagistro richardbmx wnsgml972 +ffontaine diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fc5538b..2e239e23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,14 +56,19 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin) set(THREADS_PREFER_PTHREAD_FLAG ON) include(FindThreads) -find_package(Doxygen 1.8) # # Referenced directories and targets # -if(DOXYGEN_FOUND) - add_subdirectory(docs) +option(BUILD_DOC "Build documentation" ON) + +if(BUILD_DOCS) + find_package(Doxygen 1.8) + + if(DOXYGEN_FOUND) + add_subdirectory(docs) + endif() endif() if(BUILD_TESTING)