Skip to content

Commit f0e75ca

Browse files
author
Francois Budin
committed
cmake: Fix missing find_package(Doxygen)
When installing ITK from source (sdist), the CMakeLists.txt file provided at the root of the project is used. This CMakeLists.txt file uses the CMake variable `DOXYGEN_EXECUTABLE` assuming that it has been set ,which is the case when compiling ITKPythonPackage using the scripts available in the `scripts` subdirectory. However, when building ITK from source, this value was not set and compilation was failing with the following error message: `Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)`
1 parent ba3b925 commit f0e75ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ if(ITKPythonPackage_SUPERBUILD)
137137
if(DEFINED PYTHON_EXECUTABLE AND NOT EXISTS ${PYTHON_EXECUTABLE})
138138
message(FATAL_ERROR "PYTHON_EXECUTABLE variable is defined but corresponds to nonexistent file")
139139
endif()
140+
if(DEFINED DOXYGEN_EXECUTABLE AND NOT EXISTS ${DOXYGEN_EXECUTABLE})
141+
message(FATAL_ERROR "DOXYGEN_EXECUTABLE variable is defined but corresponds to nonexistent file")
142+
endif()
140143

141144
if(NOT DEFINED PYTHON_INCLUDE_DIR
142145
OR NOT DEFINED PYTHON_LIBRARY
@@ -146,6 +149,9 @@ if(ITKPythonPackage_SUPERBUILD)
146149
find_package ( PythonInterp REQUIRED )
147150

148151
endif()
152+
if(NOT DEFINED DOXYGEN_EXECUTABLE)
153+
find_package(Doxygen REQUIRED)
154+
endif()
149155

150156
message(STATUS "SuperBuild - PYTHON_INCLUDE_DIR: ${PYTHON_INCLUDE_DIR}")
151157
message(STATUS "SuperBuild - PYTHON_LIBRARY: ${PYTHON_LIBRARY}")

0 commit comments

Comments
 (0)