about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--Dockerfile2
-rw-r--r--docs/CMakeLists.txt15
-rw-r--r--scripts/build/p-klee-linux-ubuntu.inc4
-rw-r--r--scripts/build/p-klee-osx.inc3
4 files changed, 18 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 7b94d4ee..327fdefb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -37,7 +37,7 @@ LABEL maintainer="KLEE Developers"
 # TODO remove adding sudo package
 # Create ``klee`` user for container with password ``klee``.
 # and give it password-less sudo access (temporarily so we can use the CI scripts)
-RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install sudo emacs-nox vim-nox file python3-dateutil doxygen && \
+RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install sudo emacs-nox vim-nox file python3-dateutil && \
     rm -rf /var/lib/apt/lists/* && \
     useradd -m klee && \
     echo klee:klee | chpasswd && \
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 8cbd93c9..b8a4a38b 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -12,9 +12,9 @@ add_custom_target(docs)
 
 option(ENABLE_DOXYGEN "Enable building doxygen documentation" OFF)
 if (ENABLE_DOXYGEN)
-  find_package(Doxygen)
-  if (DOXYGEN_FOUND)
-    message(STATUS "Doxygen found")
+  find_package(Doxygen OPTIONAL_COMPONENTS dot)
+  if (DOXYGEN_FOUND AND TARGET Doxygen::dot)
+    message(STATUS "Doxygen and dot found")
     set(abs_top_srcdir "${CMAKE_SOURCE_DIR}")
     set(abs_top_builddir "${CMAKE_BINARY_DIR}")
 
@@ -23,7 +23,7 @@ if (ENABLE_DOXYGEN)
 
     # Add rule to build doxygen documentation
     add_custom_target(doc-doxygen
-      COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg"
+      COMMAND Doxygen::doxygen "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg"
       COMMENT "Generating Doxygen documentation"
       USES_TERMINAL
     )
@@ -42,7 +42,12 @@ if (ENABLE_DOXYGEN)
     endif ()
 
   else()
-    message(WARNING "Doxygen not found. Can't build Doxygen documentation")
+    if (NOT DOXYGEN_FOUND)
+      message(WARNING "Doxygen not found. Can't build Doxygen documentation")
+    endif ()
+    if (NOT TARGET Doxygen::dot)
+      message(WARNING "dot (graphviz) not found. Can't build Doxygen documentation")
+    endif ()
     set(ENABLE_DOXYGEN OFF
       CACHE
       BOOL
diff --git a/scripts/build/p-klee-linux-ubuntu.inc b/scripts/build/p-klee-linux-ubuntu.inc
index d2847343..4b8a89bf 100644
--- a/scripts/build/p-klee-linux-ubuntu.inc
+++ b/scripts/build/p-klee-linux-ubuntu.inc
@@ -38,6 +38,10 @@ install_build_dependencies_klee() {
     dependencies+=(lcov curl git)
   fi
 
+  if [[ $(to_bool "${ENABLE_DOXYGEN}") -eq 1 ]]; then
+    dependencies+=(doxygen graphviz)
+  fi
+
   apt -y --no-install-recommends install "${dependencies[@]}"
 
   pip3 install lit
diff --git a/scripts/build/p-klee-osx.inc b/scripts/build/p-klee-osx.inc
index fae6bbd3..38eaa02c 100644
--- a/scripts/build/p-klee-osx.inc
+++ b/scripts/build/p-klee-osx.inc
@@ -2,5 +2,8 @@
 install_build_dependencies_klee() {
   brew upgrade python               # upgrade to Python 3
   brew link --overwrite python
+  if [[ $(to_bool "${ENABLE_DOXYGEN}") -eq 1 ]]; then
+    brew install doxygen graphviz
+  fi
   pip3 install lit tabulate
 }
\ No newline at end of file