```cmake

FIND_PROGRAM(DOXYGEN_EXECUTABLE doxygen
    PATHS "C:/Program Files/doxygen/bin"
    ENV PATH
    NO_DEFAULT_PATH
    )

IF(DOXYGEN_EXECUTABLE-NOTFOUND)
ELSE(DOXYGEN_EXECUTABLE-NOTFOUND)
    SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")

    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 
          ${DOXY_CONFIG}
          @ONLY )

    ADD_CUSTOM_TARGET(DoxygenApiDocs ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})

    FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/html/")
    INSTALL(DIRECTORY "${PROJECT_BINARY_DIR}/html/"
            DESTINATION "core/doc/api/${PROJECT_NAME}/"
            )
ENDIF(DOXYGEN_EXECUTABLE-NOTFOUND)

```

Use canonical INCLUDE(FindDoxygen) line to find doxygen executable
user
```cmake
INCLUDE(FindDoxygen)

IF(DOXYGEN_EXECUTABLE-NOTFOUND)
ELSE(DOXYGEN_EXECUTABLE-NOTFOUND)
    SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")

    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 
          ${DOXY_CONFIG}
          @ONLY )

    ADD_CUSTOM_TARGET(DoxygenApiDocs ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})

    FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/html/")
    INSTALL(DIRECTORY "${PROJECT_BINARY_DIR}/html/"
            DESTINATION "core/doc/api/${PROJECT_NAME}/"
            )
ENDIF(DOXYGEN_EXECUTABLE-NOTFOUND)

```
assistant