From 754673bff8f3cbd90b1eb0fd622fe332613053bf Mon Sep 17 00:00:00 2001
From: patrick96
Date: Fri, 14 Dec 2018 10:12:42 +0100
Subject: [PATCH] refactor(cmake): Make documentation optional
---
cmake/02-opts.cmake | 1 +
cmake/05-summary.cmake | 1 +
doc/CMakeLists.txt | 4 ++++
3 files changed, 6 insertions(+)
diff --git a/cmake/02-opts.cmake b/cmake/02-opts.cmake
index 4a2e1cbe..65cae7e3 100644
--- a/cmake/02-opts.cmake
+++ b/cmake/02-opts.cmake
@@ -30,6 +30,7 @@ option(CXXLIB_GCC "Link against stdlibc++" OFF)
option(BUILD_IPC_MSG "Build ipc messager" ON)
option(BUILD_TESTS "Build testsuite" OFF)
+option(BUILD_TESTS "Build documentation" ON)
option(ENABLE_ALSA "Enable alsa support" ON)
option(ENABLE_CURL "Enable curl support" ON)
diff --git a/cmake/05-summary.cmake b/cmake/05-summary.cmake
index 42a3a335..02b0106b 100644
--- a/cmake/05-summary.cmake
+++ b/cmake/05-summary.cmake
@@ -12,6 +12,7 @@ message_colored(STATUS " LD: ${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE
message(STATUS " Targets:")
colored_option(" polybar-msg" BUILD_IPC_MSG)
colored_option(" testsuite" BUILD_TESTS)
+colored_option(" documentation" BUILD_DOC)
message(STATUS " Module support:")
colored_option(" alsa" ENABLE_ALSA)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index aa2dd85e..d5105d62 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,3 +1,7 @@
+if(NOT BUILD_DOC)
+ return()
+endif()
+
#
# Generate configuration file
#