]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
*** empty log message ***
authoradam <adam>
Tue, 6 Oct 2009 10:05:35 +0000 (10:05 +0000)
committeradam <adam>
Tue, 6 Oct 2009 10:05:35 +0000 (10:05 +0000)
salome_adm/cmake_files/FindDOXYGEN.cmake [new file with mode: 0644]
salome_adm/cmake_files/Makefile.am
salome_adm/cmake_files/am2cmake.py

diff --git a/salome_adm/cmake_files/FindDOXYGEN.cmake b/salome_adm/cmake_files/FindDOXYGEN.cmake
new file mode 100644 (file)
index 0000000..72dbe31
--- /dev/null
@@ -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)
+
+# ----
index 740e93a23ae7a8e66916cd9f390fb2e1da259f2b..fc18d6d4a0c9512b3c1a9a2544ece0d7cf43e21b 100644 (file)
@@ -25,6 +25,7 @@ dist_salome_cmake_DATA = \
 am2cmake.py \
 FindBOOST.cmake \
 FindCPPUNIT.cmake \
+FindDOXYGEN.cmake \
 FindHDF5.cmake \
 FindKERNEL.cmake \
 FindLIBXML2.cmake \
index e12d67a99602597ac4468e712570719d6ed37b05..183e5444e2f5940fc4115a55b84ca3b75cf16ad1 100644 (file)
@@ -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":