diff --git a/CMakeLists.txt b/CMakeLists.txt index 8403ea510b..367726bb54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -565,6 +565,7 @@ if(LYX_INSTALL) include(../Install) endif() +add_subdirectory(sourcedoc "${TOP_BINARY_DIR}/sourcedoc") message(STATUS) message(STATUS "Build options, switch LYX_* variables by -DLYX_*=1 or 0:") diff --git a/sourcedoc/CMakeLists.txt b/sourcedoc/CMakeLists.txt new file mode 100644 index 0000000000..42c2c4829d --- /dev/null +++ b/sourcedoc/CMakeLists.txt @@ -0,0 +1,22 @@ +# This file is part of LyX, the document processor. +# Licence details can be found in the file COPYING. +# +# Copyright (c) 2011 Peter Kümmel, +# Copyright (c) 2011 Kornel Benko, +# + +project(doxydoc) + +find_program(DOXYGEN_EXECUTABLE doxygen) +if(DOXYGEN_EXECUTABLE MATCHES "-NOTFOUND") + message(STATUS "doxygen not found, ==> no doxygen creation") +else() + add_custom_command( + OUTPUT doxy_created + COMMAND ${DOXYGEN_EXECUTABLE} ${TOP_SRC_DIR}/sourcedoc/Doxyfile + COMMAND ${CMAKE_COMMAND} -E touch doxy_created + DEPENDS ${TOP_SRC_DIR}/sourcedoc/Doxyfile + ) + add_custom_target(doxydoc DEPENDS doxy_created) +endif() +