]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make generation/instalation of documentation optional. Fixes install problems under...
authorsbh <sergey.belash@opencascade.com>
Thu, 22 Jan 2015 10:19:45 +0000 (13:19 +0300)
committersbh <sergey.belash@opencascade.com>
Thu, 22 Jan 2015 10:19:45 +0000 (13:19 +0300)
doc/CMakeLists.txt

index 095f643d5400fa0281c61e9fedc7596e730821c3..bf800eddae9ee46bb395c72f13549b7df153d7c7 100644 (file)
@@ -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)