From ec519a2f840cab1079a68babd5f9e1881bc6518c Mon Sep 17 00:00:00 2001 From: sbh Date: Thu, 22 Jan 2015 13:19:45 +0300 Subject: [PATCH] Make generation/instalation of documentation optional. Fixes install problems under the linux --- doc/CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 095f643d5..bf800edda 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,12 +1,18 @@ # Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -FIND_PROGRAM(DOXYGEN_EXECUTABLE Doxygen) +IF (WIN32) + FIND_PROGRAM(DOXYGEN_EXECUTABLE Doxygen) +ELSE (WIN32) + FIND_PROGRAM(DOXYGEN_EXECUTABLE doxygen) +ENDIF(WIN32) CONFIGURE_FILE(doxyfile.in "${CMAKE_CURRENT_BINARY_DIR}/doxyfile" IMMEDIATE @ONLY) -ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE}) - -INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)") -INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tui DESTINATION doc) +ADD_CUSTOM_TARGET(INSTALL_DOCS + COMMAND "${DOXYGEN_EXECUTABLE}" + COMMAND "${CMAKE_COMMAND}" --build "${PROJECT_BINARY_DIR}" --target install + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc" +) +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tui DESTINATION doc OPTIONAL) -- 2.39.2