From c95650fe461250d20fd34c63ced77115b9119c3b Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 6 Oct 2009 10:05:35 +0000 Subject: [PATCH] *** empty log message *** --- salome_adm/cmake_files/FindDOXYGEN.cmake | 93 ++++++++++++++++++++++++ salome_adm/cmake_files/Makefile.am | 1 + salome_adm/cmake_files/am2cmake.py | 4 + 3 files changed, 98 insertions(+) create mode 100644 salome_adm/cmake_files/FindDOXYGEN.cmake diff --git a/salome_adm/cmake_files/FindDOXYGEN.cmake b/salome_adm/cmake_files/FindDOXYGEN.cmake new file mode 100644 index 000000000..72dbe31a9 --- /dev/null +++ b/salome_adm/cmake_files/FindDOXYGEN.cmake @@ -0,0 +1,93 @@ +# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# ------ + +MESSAGE(STATUS "Check for doxygen ...") + +# ------ + +IF(DOXYGEN_IS_MANDATORY STREQUAL 0) + SET(DOXYGEN_IS_MANDATORY 0) + SET(DOXYGEN_IS_OPTIONAL 1) +ENDIF(DOXYGEN_IS_MANDATORY STREQUAL 0) +IF(DOXYGEN_IS_OPTIONAL STREQUAL 0) + SET(DOXYGEN_IS_MANDATORY 1) + SET(DOXYGEN_IS_OPTIONAL 0) +ENDIF(DOXYGEN_IS_OPTIONAL STREQUAL 0) +IF(NOT DOXYGEN_IS_MANDATORY AND NOT DOXYGEN_IS_OPTIONAL) + SET(DOXYGEN_IS_MANDATORY 0) + SET(DOXYGEN_IS_OPTIONAL 1) +ENDIF(NOT DOXYGEN_IS_MANDATORY AND NOT DOXYGEN_IS_OPTIONAL) + +# ------ + +SET(DOXYGEN_STATUS 1) +IF(WITHOUT_DOXYGEN OR WITH_DOXYGEN STREQUAL 0) + SET(DOXYGEN_STATUS 0) + MESSAGE(STATUS "doxygen disabled from command line.") +ENDIF(WITHOUT_DOXYGEN OR WITH_DOXYGEN STREQUAL 0) + +# ------ + +IF(DOXYGEN_STATUS) + IF(WITH_DOXYGEN) + SET(DOXYGEN_ROOT_USER ${WITH_DOXYGEN}) + ENDIF(WITH_DOXYGEN) + IF(NOT DOXYGEN_ROOT_USER) + SET(DOXYGEN_ROOT_USER $ENV{DOXYGEN_ROOT}) + ENDIF(NOT DOXYGEN_ROOT_USER) + IF(NOT DOXYGEN_ROOT_USER) + SET(DOXYGEN_ROOT_USER $ENV{DOXYGENHOME}) + ENDIF(NOT DOXYGEN_ROOT_USER) +ENDIF(DOXYGEN_STATUS) + +# ------ + +IF(DOXYGEN_STATUS) + SET(DOXYGEN_EXECUTABLE_TO_FIND doxygen) + IF(DOXYGEN_ROOT_USER) + FIND_PROGRAM(DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE_TO_FIND} PATHS ${DOXYGEN_ROOT_USER}/bin NO_DEFAULT_PATH) + ELSE(DOXYGEN_ROOT_USER) + FIND_PROGRAM(DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE_TO_FIND}) + ENDIF(DOXYGEN_ROOT_USER) + IF(DOXYGEN_EXECUTABLE) + MESSAGE(STATUS "${DOXYGEN_EXECUTABLE_TO_FIND} found: ${DOXYGEN_EXECUTABLE}") + ELSE(DOXYGEN_EXECUTABLE) + MESSAGE(STATUS "${DOXYGEN_EXECUTABLE_TO_FIND} not found, try to use WITH_DOXYGEN option or DOXYGEN_ROOT (or DOXYGENHOME) environment variable") + SET(DOXYGEN_STATUS 0) + ENDIF(DOXYGEN_EXECUTABLE) +ENDIF(DOXYGEN_STATUS) + +# ---- + +IF(DOXYGEN_STATUS) + SET(DOXYGEN_IS_OK 1) +ELSE(DOXYGEN_STATUS) + SET(DOXYGEN_IS_OK 0) + IF(DOXYGEN_IS_MANDATORY) + MESSAGE(FATAL_ERROR "doxygen not found ... mandatory ... abort") + ELSE(DOXYGEN_IS_MANDATORY) + MESSAGE(STATUS "doxygen not found ... optional ... disabled") + ENDIF(DOXYGEN_IS_MANDATORY) +ENDIF(DOXYGEN_STATUS) + +# ---- diff --git a/salome_adm/cmake_files/Makefile.am b/salome_adm/cmake_files/Makefile.am index 740e93a23..fc18d6d4a 100644 --- a/salome_adm/cmake_files/Makefile.am +++ b/salome_adm/cmake_files/Makefile.am @@ -25,6 +25,7 @@ dist_salome_cmake_DATA = \ am2cmake.py \ FindBOOST.cmake \ FindCPPUNIT.cmake \ +FindDOXYGEN.cmake \ FindHDF5.cmake \ FindKERNEL.cmake \ FindLIBXML2.cmake \ diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index e12d67a99..183e5444e 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -438,6 +438,8 @@ class CMakeFile(object): INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSWIG.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) + SET(DOXYGEN_IS_OK 0) """) pass else: @@ -452,6 +454,8 @@ class CMakeFile(object): INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) + SET(DOXYGEN_IS_OK 0) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) """) if self.module == "gui": -- 2.39.2