# doxygen not found, \`DOXYGEN\_FOUND\` is \`false\`

**URL:** https://discourse.cmake.org/t/doxygen-not-found-doxygen-found-is-false/8005
**Category:** Usage
**Created:** [April 27, 2023, 3:15pm UTC](https://discourse.cmake.org/t/doxygen-not-found-doxygen-found-is-false/8005 "2023-04-27T15:15:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jankap](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jankap/32/3393_2.png) [@jankap](https://discourse.cmake.org/u/jankap)
#### Post date: [April 27, 2023, 3:15pm UTC](https://discourse.cmake.org/t/doxygen-not-found-doxygen-found-is-false/8005/1 "2023-04-27T15:15:26Z")

</div>

Not sure what I’m doing wrong here. I try to use `DOXYGEN_FOUND`, but that variable seems to be unset though doxygen is available.  
The CMakeLists.txt contains

```auto
cmake_minimum_required(VERSION 3.18)

if (DOXYGEN_FOUND)
    message("Doxygen was found")
else (DOXYGEN_FOUND)
  message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)

...

```

and is called via

```auto
dev@8fe0fb32f9a1:/$ cmake -G Ninja .
Doxygen need to be installed to generate the doxygen documentation

```

Am I using it wrong?

Thanks!

My environment:

```auto
dev@8fe0fb32f9a1:/$ cmake --version
cmake version 3.22.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
dev@8fe0fb32f9a1:/$ which doxygen
/usr/bin/doxygen
dev@8fe0fb32f9a1:/$ doxygen -v
1.9.1

```

---

<div class="post-metadata">

### Author: ![jankap](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jankap/32/3393_2.png) [@jankap](https://discourse.cmake.org/u/jankap)
#### Post date: [April 27, 2023, 4:35pm UTC](https://discourse.cmake.org/t/doxygen-not-found-doxygen-found-is-false/8005/2 "2023-04-27T16:35:26Z")

</div>

It was not clear to me that it’s mandatory to run

```auto
find_package(Doxygen
        REQUIRED dot
        OPTIONAL_COMPONENTS mscgen dia)

```

before using `DOXYGEN_FOUND`.

However, it works now.
