]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Roll-back previous intagrations related to the new CMake procedure, for the preparati...
authorrnv <rnv@opencascade.com>
Wed, 19 Jun 2013 07:36:33 +0000 (07:36 +0000)
committerrnv <rnv@opencascade.com>
Wed, 19 Jun 2013 07:36:33 +0000 (07:36 +0000)
18 files changed:
salome_adm/cmake_files/FindCPPUNIT.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindGraphviz.cmake [deleted file]
salome_adm/cmake_files/FindOMNIORB.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindPThread.cmake [deleted file]
salome_adm/cmake_files/FindSPHINX.cmake [new file with mode: 0755]
salome_adm/cmake_files/FindSalomeBOOST.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeCPPUNIT.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeDOXYGEN.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeGraphviz.cmake [deleted file]
salome_adm/cmake_files/FindSalomeLIBBATCH.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeLIBXML2.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeOmniORB.cmake [deleted file]
salome_adm/cmake_files/FindSalomePThread.cmake [deleted file]
salome_adm/cmake_files/FindSalomePYTHON.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeSPHINX.cmake [new file with mode: 0644]
salome_adm/cmake_files/SalomeKERNELConfig.cmake.in [deleted file]
salome_adm/cmake_files/SalomeSetupPlatform.cmake [deleted file]
salome_adm/cmake_files/UseOMNIORB.cmake [new file with mode: 0644]

diff --git a/salome_adm/cmake_files/FindCPPUNIT.cmake b/salome_adm/cmake_files/FindCPPUNIT.cmake
new file mode 100644 (file)
index 0000000..1d24a87
--- /dev/null
@@ -0,0 +1,155 @@
+# Copyright (C) 2007-2013  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 cppunit ...")
+
+# ------
+
+IF(CPPUNIT_IS_MANDATORY STREQUAL 0)
+  SET(CPPUNIT_IS_MANDATORY 0)
+  SET(CPPUNIT_IS_OPTIONAL 1)
+ENDIF(CPPUNIT_IS_MANDATORY STREQUAL 0)
+IF(CPPUNIT_IS_OPTIONAL STREQUAL 0)
+  SET(CPPUNIT_IS_MANDATORY 1)
+  SET(CPPUNIT_IS_OPTIONAL 0)
+ENDIF(CPPUNIT_IS_OPTIONAL STREQUAL 0)
+IF(NOT CPPUNIT_IS_MANDATORY AND NOT CPPUNIT_IS_OPTIONAL)
+  SET(CPPUNIT_IS_MANDATORY 0)
+  SET(CPPUNIT_IS_OPTIONAL 1)
+ENDIF(NOT CPPUNIT_IS_MANDATORY AND NOT CPPUNIT_IS_OPTIONAL)
+
+# ------
+
+SET(CPPUNIT_STATUS 1)
+IF(WITHOUT_CPPUNIT OR WITH_CPPUNIT STREQUAL 0)
+  SET(CPPUNIT_STATUS 0)
+  MESSAGE(STATUS "cppunit disabled from command line.")
+ENDIF(WITHOUT_CPPUNIT OR WITH_CPPUNIT STREQUAL 0)
+
+# ------
+
+IF(CPPUNIT_STATUS)
+  IF(WITH_CPPUNIT)
+    SET(CPPUNIT_ROOT_USER ${WITH_CPPUNIT})
+  ENDIF(WITH_CPPUNIT)
+  IF(NOT CPPUNIT_ROOT_USER)
+    SET(CPPUNIT_ROOT_USER $ENV{CPPUNIT_ROOT})
+  ENDIF(NOT CPPUNIT_ROOT_USER)
+  IF(NOT CPPUNIT_ROOT_USER)
+    SET(CPPUNIT_ROOT_USER $ENV{CPPUNITHOME})
+  ENDIF(NOT CPPUNIT_ROOT_USER)
+ENDIF(CPPUNIT_STATUS)
+
+# -----
+
+IF(CPPUNIT_STATUS)
+  IF(CPPUNIT_ROOT_USER)
+    SET(CPPUNIT_FIND_PATHS_OPTION NO_DEFAULT_PATH)
+  ELSE(CPPUNIT_ROOT_USER)
+    SET(CPPUNIT_FIND_PATHS_OPTION)
+  ENDIF(CPPUNIT_ROOT_USER)
+ENDIF(CPPUNIT_STATUS)
+
+# -----
+
+IF(CPPUNIT_STATUS)
+  IF(CPPUNIT_ROOT_USER)
+    SET(CPPUNIT_INCLUDE_PATHS ${CPPUNIT_ROOT_USER} ${CPPUNIT_ROOT_USER}/include)
+  ELSE(CPPUNIT_ROOT_USER)
+    SET(CPPUNIT_INCLUDE_PATHS)
+  ENDIF(CPPUNIT_ROOT_USER)
+  SET(CPPUNIT_INCLUDE_TO_FIND cppunit/extensions/HelperMacros.h)
+  FIND_PATH(CPPUNIT_INCLUDE_DIR ${CPPUNIT_INCLUDE_TO_FIND} PATHS ${CPPUNIT_INCLUDE_PATHS} ${CPPUNIT_FIND_PATHS_OPTION})
+  IF(CPPUNIT_INCLUDE_DIR)
+    IF(CPPUNIT_ROOT_USER)
+      SET(CPPUNIT_INCLUDES -I${CPPUNIT_INCLUDE_DIR})# to be removed
+      IF(${CPPUNIT_INCLUDE_DIR} STREQUAL /usr/include)
+       SET(CPPUNIT_INCLUDE_DIRS)
+      ELSE(${CPPUNIT_INCLUDE_DIR} STREQUAL /usr/include)
+       SET(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR})
+      ENDIF(${CPPUNIT_INCLUDE_DIR} STREQUAL /usr/include)
+    ENDIF(CPPUNIT_ROOT_USER)
+    MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} found in ${CPPUNIT_INCLUDE_DIR}")
+  ELSE(CPPUNIT_INCLUDE_DIR)
+    SET(CPPUNIT_STATUS 0)
+    IF(CPPUNIT_ROOT_USER)
+      MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found in ${CPPUNIT_INCLUDE_PATHS}, check your CPPUNIT installation.")
+    ELSE(CPPUNIT_ROOT_USER)
+      MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT (or CPPUNITHOME) environment variable.")
+    ENDIF(CPPUNIT_ROOT_USER)
+  ENDIF(CPPUNIT_INCLUDE_DIR)
+ENDIF(CPPUNIT_STATUS)
+
+# ----
+
+IF(CPPUNIT_STATUS)
+  IF(CPPUNIT_ROOT_USER)
+    SET(CPPUNIT_LIB_PATHS ${CPPUNIT_ROOT_USER}/lib)
+  ELSE(CPPUNIT_ROOT_USER)
+    SET(CPPUNIT_LIB_PATHS)
+  ENDIF(CPPUNIT_ROOT_USER)
+ENDIF(CPPUNIT_STATUS)
+
+IF(CPPUNIT_STATUS)
+  IF(WINDOWS)
+    IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+      FIND_LIBRARY(CPPUNIT_LIB cppunitd_dll PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION})
+    ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
+      FIND_LIBRARY(CPPUNIT_LIB cppunit_dll PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION})
+    ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
+  ELSE(WINDOWS)
+    FIND_LIBRARY(CPPUNIT_LIB cppunit PATHS ${CPPUNIT_LIB_PATHS} ${CPPUNIT_FIND_PATHS_OPTION})
+  ENDIF(WINDOWS)
+  SET(CPPUNIT_LIBS)
+  IF(CPPUNIT_LIB)
+    SET(CPPUNIT_LIBS ${CPPUNIT_LIBS} ${CPPUNIT_LIB})
+    MESSAGE(STATUS "cppunit lib found: ${CPPUNIT_LIB}")
+  ELSE(CPPUNIT_LIB)
+    SET(CPPUNIT_STATUS 0)
+    IF(CPPUNIT_ROOT_USER)
+      MESSAGE(STATUS "cppunit lib not found in ${CPPUNIT_LIB_PATHS}, check your CPPUNIT installation.")
+    ELSE(CPPUNIT_ROOT_USER)
+      MESSAGE(STATUS "cppunit lib not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT environment variable.")
+    ENDIF(CPPUNIT_ROOT_USER)
+  ENDIF(CPPUNIT_LIB)
+ENDIF(CPPUNIT_STATUS)
+
+# ----
+
+IF(CPPUNIT_STATUS)
+  SET(CPPUNIT_IS_OK 1)
+  SET(CPPUNIT_DEFINITIONS)
+  IF(WINDOWS)
+    SET(CPPUNIT_INCLUDES ${CPPUNIT_INCLUDES} -DCPPUNIT_DLL)
+    SET(CPPUNIT_DEFINITIONS "-DCPPUNIT_DLL")
+  ENDIF(WINDOWS)
+ELSE(CPPUNIT_STATUS)
+  IF(CPPUNIT_IS_MANDATORY)
+    MESSAGE(FATAL_ERROR "cppunit not found ... mandatory ... abort")
+  ELSE(CPPUNIT_IS_MANDATORY)
+    MESSAGE(STATUS "cppunit not found ... optional ... disabled")
+  ENDIF(CPPUNIT_IS_MANDATORY)
+ENDIF(CPPUNIT_STATUS)
+
+# ------
diff --git a/salome_adm/cmake_files/FindGraphviz.cmake b/salome_adm/cmake_files/FindGraphviz.cmake
deleted file mode 100644 (file)
index cf987be..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# - Graphviz detection
-#
-# Output variable: GRAPHVIZ_EXECUTABLE
-# 
-# The executable 'dot' is looked for and returned in the above variable.
-#
-
-###########################################################################
-# Copyright (C) 2007-2013  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
-#
-###########################################################################
-
-FIND_PROGRAM(GRAPHVIZ_EXECUTABLE dot)
-
-# Handle the standard arguments of the find_package() command:
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Graphviz REQUIRED_VARS GRAPHVIZ_EXECUTABLE)
-
diff --git a/salome_adm/cmake_files/FindOMNIORB.cmake b/salome_adm/cmake_files/FindOMNIORB.cmake
new file mode 100644 (file)
index 0000000..354ac15
--- /dev/null
@@ -0,0 +1,309 @@
+# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+# Find OmniORB4 cmake module and Pyhon backends
+#
+# sets the following variables:
+# OMNIORB_FOUND        - TRUE if OmniORB4 installation has been found
+# OMNIORB_INCLUDE_DIR  - OmniORB4 headers path
+# OMNIORB_LIBRARIES    - OmniORB4 libraries 
+# OMNIORB_VERSION      - OmniORB4 version
+# OMNIORB_IDL_COMPILER - OmniORB4 idl compiler command (omniidl)
+# OMNIORB_NAMESERVER   - OmniORB4 CORBA naming service (omniNames)
+#
+# optional variables:
+# OMNIORB_DIR          - OmniORB4 local installation path
+# OMNIORBPY_DIR        - OmniORBpy local installation path
+#
+# This module could use OMNIORB_DIR environment variable if set
+# WARNING: The precedence order is the following:
+#   1. OMNIORB_DIR cmake variable
+#   2. OMNIORB_DIR environment variable
+#   3. default cmake search paths
+#
+# This module could use OMNIORBPY_DIR environment variable if set
+# WARNING: The precedence order is the following:
+#   1. OMNIORBPY_DIR cmake variable
+#   2. OMNIORBPY_DIR environment variable
+#   3. default cmake search paths
+#
+# NOTE: this goes against cmake default behavior for Find* macros, 
+# more on this issue: 
+# http://www.mail-archive.com/kde-buildsystem@kde.org/msg00589.html
+#
+
+# minimum OmniORB4 supported version
+# 4.0.6 has known bug float/double marshalling using CORBA::Any
+set(OMNIORB_MINIMUM_VERSION "4.1.2")
+set(OMNIORB_DIR $ENV{OMNIORB_DIR} CACHE PATH "Path to OmniORB directory")
+
+##############################################################################
+# find headers
+##############################################################################
+find_path(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h
+  PATHS "${OMNIORB_DIR}/include" "$ENV{OMNIORB_DIR}/include"
+  NO_DEFAULT_PATH)
+
+find_path(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h)
+
+
+##############################################################################
+# find libraries
+##############################################################################
+if (WIN32)
+  find_library(OMNIORB_LIBRARY_omniORB4
+       NAMES
+       ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4${CMAKE_STATIC_LIBRARY_SUFFIX}
+       PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+       NO_DEFAULT_PATH
+  )
+  find_library(OMNIORB_LIBRARY_omniORB4 NAMES
+    ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_omniORB4
+    NAMES omniORB4
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_omniORB4
+    NAMES omniORB4)
+endif (WIN32)   
+  
+if (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
+       NAMES
+       ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread${CMAKE_STATIC_LIBRARY_SUFFIX}
+       PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+       NO_DEFAULT_PATH
+  )
+
+  FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
+       NAMES
+       ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_omnithread
+    NAMES omnithread
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_omnithread
+    NAMES omnithread)
+endif (WIN32)
+
+
+if (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+    NO_DEFAULT_PATH
+  )
+
+  FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_omniDynamic4
+    NAMES omniDynamic4
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_omniDynamic4
+    NAMES omniDynamic4)
+endif (WIN32)    
+
+# optional libraries
+
+if (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_COS4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}COS4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+    NO_DEFAULT_PATH 
+  )
+
+  FIND_LIBRARY( OMNIORB_LIBRARY_COS4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}COS4${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_COS4
+    NAMES COS4
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_COS4
+    NAMES COS4)
+endif (WIN32)
+
+if (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+    NO_DEFAULT_PATH
+  )
+
+  FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_COSDynamic4
+    NAMES COSDynamic4
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_COSDynamic4
+    NAMES COSDynamic4)
+endif (WIN32)
+##############################################################################
+# find command line tools
+##############################################################################
+IF (WIN32)
+FIND_PROGRAM( OMNIORB_IDL_COMPILER
+  NAMES omniidl
+  PATHS ${OMNIORB_DIR}/bin/x86_win32 $ENV{OMNIORB_DIR}/bin/x86_win32
+  DOC "What is the path where omniidl (the idl compiler) can be found"
+  NO_DEFAULT_PATH
+)
+FIND_PROGRAM( OMNIORB_IDL_COMPILER
+  NAMES omniidl
+  DOC "What is the path where omniidl (the idl compiler) can be found"
+)
+
+FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
+  NAMES omniNames
+  PATHS ${OMNIORB_DIR}/bin/x86_win32 $ENV{OMNIORB_DIR}/bin/x86_win32
+  DOC "What is the path where omniNames (the ORB server) can be found"
+  NO_DEFAULT_PATH
+)
+FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
+  NAMES omniNames
+  DOC "What is the path where omniNames (the ORB server) can be found"
+)
+ELSE(WIN32)
+  find_program(OMNIORB_IDL_COMPILER
+    NAMES omniidl
+    PATHS "${OMNIORB_DIR}/bin" "$ENV{OMNIORB_DIR}/bin"
+    NO_DEFAULT_PATH)
+    
+  find_program(OMNIORB_IDL_COMPILER
+    NAMES omniidl)
+
+  find_program(OMNIORB_NAMESERVER
+    NAMES omniNames
+    PATHS "${OMNIORB_DIR}/bin" "$ENV{OMNIORB_DIR}/bin"
+    NO_DEFAULT_PATH)
+    
+  find_program(OMNIORB_NAMESERVER
+    NAMES omniNames)
+ENDIF (WIN32)
+
+##############################################################################
+# find python back-end
+##############################################################################
+FIND_PATH( OMNIORB_PYTHON_BACKEND
+  NAMES python.py
+  PATHS $ENV{OMNIORB_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/omniidl_be $ENV{OMNIORBPY_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/omniidl_be
+        ${OMNIORB_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/omniidl_be ${OMNIORBPY_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/omniidl_be
+  DOC "Path to python-backend directory (omniidl_be) including python.py file"
+  NO_DEFAULT_PATH )
+
+FIND_PATH( OMNIORB_PYTHON_BACKEND
+  NAMES python.py
+  PATHS /usr/lib/omniidl/omniidl_be
+  DOC "Path to python-backend directory (omniidl_be) including python.py file" )
+##############################################################################
+# cook our stuff
+##############################################################################
+set(OMNIORB_FOUND "FALSE")
+
+if(OMNIORB_INCLUDE_DIR AND
+    OMNIORB_LIBRARY_omniORB4 AND
+    OMNIORB_LIBRARY_omnithread AND
+    OMNIORB_LIBRARY_omniDynamic4 AND
+    OMNIORB_IDL_COMPILER)
+  set(OMNIORB_FOUND "TRUE")
+  mark_as_advanced(OMNIORB_DIR)
+  mark_as_advanced(OMNIORB_INCLUDE_DIR)
+  mark_as_advanced(OMNIORB_LIBRARY_omniORB4)
+  mark_as_advanced(OMNIORB_LIBRARY_omnithread)
+  mark_as_advanced(OMNIORB_LIBRARY_omniDynamic4)
+  mark_as_advanced(OMNIORB_IDL_COMPILER)
+  mark_as_advanced(OMNIORB_NAMESERVER)
+  mark_as_advanced(OMNIORB_VERSION)
+  mark_as_advanced(OMNIORB_LIBRARY_COS4)
+  mark_as_advanced(OMNIORB_LIBRARY_COSDynamic4)
+  mark_as_advanced(OMNIORB_PYTHON_BACKEND)
+
+  set(OMNIORB_LIBRARIES
+    ${OMNIORB_LIBRARY_omniORB4}
+    ${OMNIORB_LIBRARY_omnithread}
+    ${OMNIORB_LIBRARY_omniDynamic4})
+
+  if(OMNIORB_LIBRARY_COS4)
+    set(OMNIORB_LIBRARIES ${OMNIORB_LIBRARIES} ${OMNIORB_LIBRARY_COS4})
+  endif()
+  if(OMNIORB_LIBRARY_COSDynamic4)
+    set(OMNIORB_LIBRARIES ${OMNIORB_LIBRARIES} ${OMNIORB_LIBRARY_COSDynamic4})
+  endif()
+
+  # Optionaly, extract the the version number from the acconfig.h file:
+  if( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+    file( READ ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h OMNIORB_ACCONFIG_H )
+    string( REGEX MATCH "#define[\t ]+PACKAGE_VERSION[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" OMNIORB_ACCONFIG_H "${OMNIORB_ACCONFIG_H}" )
+    string( REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" OMNIORB_VERSION "${OMNIORB_ACCONFIG_H}" )
+
+    if( ${OMNIORB_VERSION} VERSION_LESS ${OMNIORB_MINIMUM_VERSION} )
+      message( "WARNING: your version of omniORB is older than the minimum required one (${OMNIORB_MINIMUM_VERSION}), using DIET with this version may result in undetermined behaviors." )
+    endif()
+
+
+  else( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+    set( OMNIORB_VERSION "NOT-FOUND" )
+  endif( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+  set( OMNIORB_VERSION ${OMNIORB_VERSION}
+      CACHE STRING "OmniORB version number." )
+  
+  SET(OMNIORB_IDLCXXFLAGS -Wba -nf)
+  SET(OMNIORB_IDLPYFLAGS -bpython)
+  IF (OMNIORB_PYTHON_BACKEND) 
+    SET(OMNIORB_IDLPYFLAGS "-p ${OMNIORB_PYTHON_BACKEND} ${OMNIORB_IDLPYFLAGS}")
+  ENDIF(OMNIORB_PYTHON_BACKEND)
+  SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
+  SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS})
+  SET(IDL_CLN_H .hh)
+  SET(IDL_SRV_H .hh)
+  SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
+  IF(WINDOWS)
+    SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
+  ENDIF(WINDOWS)
+  IF(APPLE)
+    SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...
+  ENDIF(APPLE)
+
+
+else()
+  message(FATAL_ERROR "OmniORB is required, please define OMNIORB_DIR as environment or cmake variable")
+endif()
diff --git a/salome_adm/cmake_files/FindPThread.cmake b/salome_adm/cmake_files/FindPThread.cmake
deleted file mode 100644 (file)
index 406ed2d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# - Find PThread
-# This module finds an installed PThread using the variable PTHREAD_ROOT_DIR 
-# as a lookup path.
-# It sets the following variables:
-#  PTHREAD_FOUND       - set to true if PThread is found
-#  PTHREAD_INCLUDE_DIR - the directory where the include files are located
-#  PTHREAD_LIBRARIES   - the path to PThread library
-#
-# The file "pthread.h" is looked for PTHREAD_INCLUDE_DIR.
-# Libraries are searched with following names: 
-#    pthread
-# On Win32:
-#    pthreadVC2
-# or in Debug mode:
-#    pthreadVC2d
-#
-
-
-#############################################################
-#  Copyright (C) 2007-2013  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
-#
-#############################################################
-
-IF(NOT PThread_FIND_QUIETLY)
-    MESSAGE(STATUS "Looking for PThread...")
-ENDIF ()
-
-IF(WIN32)
-    SET(PTHREADS_INCLUDE_TO_FIND pthread.h)
-    FIND_PATH(PTHREAD_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND})
-    # Default build type is assumed to be Release:
-    IF(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
-        FIND_LIBRARY(PTHREAD_LIBRARIES pthreadVC2)
-    ELSE()
-        FIND_LIBRARY(PTHREAD_LIBRARIES pthreadVC2d)
-    ENDIF()
-ELSE(WIN32)
-    FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h)
-    FIND_LIBRARY(PTHREAD_LIBRARIES NAMES pthread)
-ENDIF(WIN32)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PThread REQUIRED_VARS PTHREAD_INCLUDE_DIR PTHREAD_LIBRARIES)
-
-IF(PTHREAD_FOUND)
-  IF(NOT PThread_FIND_QUIETLY)
-    MESSAGE(STATUS "PThread library: ${PTHREAD_LIBRARIES}")
-  ENDIF()
-ENDIF()
diff --git a/salome_adm/cmake_files/FindSPHINX.cmake b/salome_adm/cmake_files/FindSPHINX.cmake
new file mode 100755 (executable)
index 0000000..4bf545a
--- /dev/null
@@ -0,0 +1,105 @@
+# Copyright (C) 2007-2013  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 sphinx ...")
+# ------
+
+IF(SPHINX_IS_MANDATORY STREQUAL 0)
+  SET(SPHINX_IS_MANDATORY 0)
+  SET(SPHINX_IS_OPTIONAL 1)
+ENDIF(SPHINX_IS_MANDATORY STREQUAL 0)
+IF(SPHINX_IS_OPTIONAL STREQUAL 0)
+  SET(SPHINX_IS_MANDATORY 1)
+  SET(SPHINX_IS_OPTIONAL 0)
+ENDIF(SPHINX_IS_OPTIONAL STREQUAL 0)
+IF(NOT SPHINX_IS_MANDATORY AND NOT SPHINX_IS_OPTIONAL)
+  SET(SPHINX_IS_MANDATORY 0)
+  SET(SPHINX_IS_OPTIONAL 1)
+ENDIF(NOT SPHINX_IS_MANDATORY AND NOT SPHINX_IS_OPTIONAL)
+
+# ------
+
+SET(SPHINX_STATUS 1)
+IF(WITHOUT_SPHINX OR WITH_SPHINX STREQUAL 0)
+  SET(SPHINX_STATUS 0)
+  MESSAGE(STATUS "sphinx disabled from command line.")
+ENDIF(WITHOUT_SPHINX OR WITH_SPHINX STREQUAL 0)
+
+# ------
+
+IF(SPHINX_STATUS)
+  IF(WITH_SPHINX)
+    SET(SPHINX_ROOT_USER ${WITH_SPHINX})
+  ENDIF(WITH_SPHINX)
+  IF(NOT SPHINX_ROOT_USER)
+    SET(SPHINX_ROOT_USER $ENV{SPHINX_ROOT})
+  ENDIF(NOT SPHINX_ROOT_USER)
+  IF(NOT SPHINX_ROOT_USER)
+    SET(SPHINX_ROOT_USER $ENV{SPHINXHOME})
+  ENDIF(NOT SPHINX_ROOT_USER)
+ENDIF(SPHINX_STATUS)
+
+# ------
+
+IF(SPHINX_STATUS)
+  SET(SPHINX_EXECUTABLE_TO_FIND sphinx-build)
+  IF(SPHINX_ROOT_USER)
+    SET(BINDIR)
+    IF(WINDOWS)
+  SET(BINDIR ${SPHINX_ROOT_USER}/Scripts)
+    ELSE(WINDOWS)
+  SET(BINDIR ${SPHINX_ROOT_USER}/bin)
+    ENDIF(WINDOWS)
+    FIND_PROGRAM(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE_TO_FIND} PATHS ${BINDIR} NO_DEFAULT_PATH)
+  ELSE(SPHINX_ROOT_USER)
+    FIND_PROGRAM(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE_TO_FIND})
+  ENDIF(SPHINX_ROOT_USER)
+  IF(SPHINX_EXECUTABLE)
+    EXECUTE_PROCESS(COMMAND ${SPHINX_EXECUTABLE} -v ERROR_VARIABLE STATUS_CHECK_SPHINX)
+    STRING(REGEX MATCH "^Sphinx v[0-9]+\\.[0-9]+\\.[0-9]+" IS_SPHINX_USABLE ${STATUS_CHECK_SPHINX})
+    IF(IS_SPHINX_USABLE)
+      MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found: ${SPHINX_EXECUTABLE}")
+    ELSE(IS_SPHINX_USABLE)
+      MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found but NOT usable ! Check coherency between your python and Sphinx ! Sphinx DISABLED !")
+      SET(SPHINX_STATUS 0)
+    ENDIF(IS_SPHINX_USABLE)
+  ELSE(SPHINX_EXECUTABLE)
+    MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} not found, try to use WITH_SPHINX option or SPHINX_ROOT (or SPHINXHOME) environment variable")
+    SET(SPHINX_STATUS 0)
+  ENDIF(SPHINX_EXECUTABLE)
+ENDIF(SPHINX_STATUS)
+
+# ----
+
+IF(SPHINX_STATUS)
+  SET(SPHINX_IS_OK 1)
+ELSE(SPHINX_STATUS)
+  SET(SPHINX_IS_OK 0)
+  IF(SPHINX_IS_MANDATORY)
+    MESSAGE(FATAL_ERROR "sphinx not found ... mandatory ... abort")
+  ELSE(SPHINX_IS_MANDATORY)
+    MESSAGE(STATUS "sphinx not found ... optional ... disabled")
+  ENDIF(SPHINX_IS_MANDATORY)
+ENDIF(SPHINX_STATUS)
+
+# ----
diff --git a/salome_adm/cmake_files/FindSalomeBOOST.cmake b/salome_adm/cmake_files/FindSalomeBOOST.cmake
new file mode 100644 (file)
index 0000000..57e7019
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+# Boost detection dor Salome
+
+set(Boost_ROOT_DIR $ENV{Boost_ROOT_DIR} CACHE PATH "Path to Boost directory")
+if(EXISTS ${Boost_ROOT_DIR})
+  set(CMAKE_INCLUDE_PATH ${Boost_ROOT_DIR}/include)
+  set(CMAKE_LIBRARY_PATH ${Boost_ROOT_DIR}/lib)
+endif(EXISTS ${Boost_ROOT_DIR})
+set(Boost_USE_STATIC_LIBS       OFF)
+set(Boost_USE_MULTITHREADED      ON)
+set(Boost_USE_STATIC_RUNTIME    OFF)
+#find_package( Boost 1.49 REQUIRED  )#COMPONENTS thread date_time signals filesystem system)
+find_package( Boost REQUIRED  )#COMPONENTS thread date_time signals filesystem system)
+if(WINDOWS)
+  set(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS)
+endif(WINDOWS)
diff --git a/salome_adm/cmake_files/FindSalomeCPPUNIT.cmake b/salome_adm/cmake_files/FindSalomeCPPUNIT.cmake
new file mode 100644 (file)
index 0000000..1c2b578
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+# CPPUNIT detection for Salome
+
+set(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR} CACHE PATH "Path to Cppunit directory")
+if(EXISTS ${CPPUNIT_ROOT_DIR})
+  set(CMAKE_INCLUDE_PATH ${CPPUNIT_ROOT_DIR}/include)
+  set(CMAKE_LIBRARY_PATH ${CPPUNIT_ROOT_DIR}/lib)
+  set(CMAKE_PROGRAM_PATH ${CPPUNIT_ROOT_DIR}/bin)
+endif(EXISTS ${CPPUNIT_ROOT_DIR})
+find_package(CPPUNIT)
diff --git a/salome_adm/cmake_files/FindSalomeDOXYGEN.cmake b/salome_adm/cmake_files/FindSalomeDOXYGEN.cmake
new file mode 100644 (file)
index 0000000..03f881c
--- /dev/null
@@ -0,0 +1,33 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+# Doxygen and graphviz detection for salome
+
+set(DOXYGEN_ROOT_DIR $ENV{DOXYGEN_ROOT_DIR} CACHE PATH "Path to Doxygen directory")
+set(GRAPHVIZ_ROOT_DIR $ENV{GRAPHVIZ_ROOT_DIR} CACHE PATH "Path to Graphviz directory")
+if(EXISTS ${DOXYGEN_ROOT_DIR})
+  set(CMAKE_PROGRAM_PATH ${DOXYGEN_ROOT_DIR}/bin)
+endif(EXISTS ${DOXYGEN_ROOT_DIR})
+if(EXISTS ${GRAPHVIZ_ROOT_DIR})
+  set(CMAKE_PROGRAM_PATH ${GRAPHVIZ_ROOT_DIR}/bin)
+  if(EXISTS ${DOXYGEN_ROOT_DIR})
+    set(CMAKE_PROGRAM_PATH ${GRAPHVIZ_ROOT_DIR}/bin ${DOXYGEN_ROOT_DIR}/bin)
+  endif(EXISTS ${DOXYGEN_ROOT_DIR})
+endif(EXISTS ${GRAPHVIZ_ROOT_DIR})
+find_package(Doxygen)
diff --git a/salome_adm/cmake_files/FindSalomeGraphviz.cmake b/salome_adm/cmake_files/FindSalomeGraphviz.cmake
deleted file mode 100644 (file)
index e9b02f7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-# Author: Adrien Bruneton
-#
-
-# Graphviz detection for salome
-#
-#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Graphviz GRAPHVIZ_EXECUTABLE 2)
-MARK_AS_ADVANCED(GRAPHVIZ_EXECUTABLE)
diff --git a/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake b/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake
new file mode 100644 (file)
index 0000000..5344953
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+# LIBBATCH detection for Salome
+
+include(FindPackageHandleStandardArgs)
+
+set(LIBBATCH_ROOT_DIR $ENV{LIBBATCH_ROOT_DIR} CACHE PATH "Path to libbatch directory")
+if(EXISTS ${LIBBATCH_ROOT_DIR})
+  find_package(libbatch QUIET CONFIG PATHS ${LIBBATCH_ROOT_DIR}/lib NO_DEFAULT_PATH)
+endif(EXISTS ${LIBBATCH_ROOT_DIR})
+find_package(libbatch QUIET CONFIG)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(libbatch DEFAULT_MSG
+  LIBBATCH_ROOT_DIR LIBBATCH_INCLUDE_DIRS LIBBATCH_LIBRARIES
+  LIBBATCH_RUNTIME_LIBRARY_DIRS LIBBATCH_PYTHONPATH)
diff --git a/salome_adm/cmake_files/FindSalomeLIBXML2.cmake b/salome_adm/cmake_files/FindSalomeLIBXML2.cmake
new file mode 100644 (file)
index 0000000..3b2608b
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+# LIBXML2 detection for Salome
+
+set(LIBXML2_ROOT_DIR $ENV{LIBXML2_ROOT_DIR} CACHE PATH "Path to LibXml2 directory")
+if(EXISTS ${LIBXML2_ROOT_DIR})
+  set(CMAKE_INCLUDE_PATH ${LIBXML2_ROOT_DIR}/include)
+  set(CMAKE_LIBRARY_PATH ${LIBXML2_ROOT_DIR}/lib)
+  set(CMAKE_PROGRAM_PATH ${LIBXML2_ROOT_DIR}/bin)
+endif(EXISTS ${LIBXML2_ROOT_DIR})
+find_package(LibXml2 REQUIRED)
+#if(${LIBXML2_VERSION_STRING} VERSION_LESS "2.7.6")
+#  message(FATAL_ERROR "LIbXml2 required version is 2.7.6, version is ${LIBXML2_VERSION_STRING} , please defined LIBXML2_ROOT_DIR as environment or cmake variable")
+#endif(${LIBXML2_VERSION_STRING} VERSION_LESS "2.7.6")
diff --git a/salome_adm/cmake_files/FindSalomeOmniORB.cmake b/salome_adm/cmake_files/FindSalomeOmniORB.cmake
deleted file mode 100644 (file)
index 3b7d582..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-# Author: Adrien Bruneton
-#
-
-# omniORB detection for SALOME
-#
-#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORB OMNIORB_INCLUDE_DIR 1)
-#MARK_AS_ADVANCED()
diff --git a/salome_adm/cmake_files/FindSalomePThread.cmake b/salome_adm/cmake_files/FindSalomePThread.cmake
deleted file mode 100644 (file)
index 4d1353f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-# Author: Adrien Bruneton
-#
-
-# PThread detection for SALOME
-#
-#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PThread PTHREAD_INCLUDE_DIR 1)
-MARK_AS_ADVANCED(PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
diff --git a/salome_adm/cmake_files/FindSalomePYTHON.cmake b/salome_adm/cmake_files/FindSalomePYTHON.cmake
new file mode 100644 (file)
index 0000000..a75238b
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+# Python detection for Salome
+
+set(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR} CACHE PATH "Path to Python directory")
+if(EXISTS ${PYTHON_ROOT_DIR})
+  set(CMAKE_INCLUDE_PATH ${PYTHON_ROOT_DIR}/include)
+  set(CMAKE_LIBRARY_PATH ${PYTHON_ROOT_DIR}/lib)
+  set(CMAKE_PROGRAM_PATH ${PYTHON_ROOT_DIR}/bin)
+endif(EXISTS ${PYTHON_ROOT_DIR})
+find_package(PythonInterp REQUIRED)
+if(EXISTS ${PYTHON_ROOT_DIR})
+  set(PYTHON_INCLUDE_DIR ${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+  set(PYTHON_LIBRARY ${PYTHON_ROOT_DIR}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX})
+endif(EXISTS ${PYTHON_ROOT_DIR})
+find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED)
+MESSAGE("Python includes : " ${PYTHON_INCLUDE_DIR})
+MESSAGE("Python library  : " ${PYTHON_LIBRARY})
+MESSAGE("Python binary   : " ${PYTHON_EXECUTABLE})
+set(PYLOGLEVEL WARNING)
diff --git a/salome_adm/cmake_files/FindSalomeSPHINX.cmake b/salome_adm/cmake_files/FindSalomeSPHINX.cmake
new file mode 100644 (file)
index 0000000..a22eeff
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+# Sphinx detection for Salome
+
+set(SPHINX_ROOT_DIR $ENV{SPHINX_ROOT_DIR} CACHE PATH "Path to Sphinx directory")
+if(EXISTS ${SPHINX_ROOT_DIR})
+  set(CMAKE_PROGRAM_PATH ${SPHINX_ROOT_DIR}/bin)
+endif(EXISTS ${SPHINX_ROOT_DIR})
+find_package(SPHINX)
diff --git a/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in b/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in
deleted file mode 100644 (file)
index b9de343..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# - Config file for the @PROJECT_NAME@ package
-# It defines the following variables. 
-# Specific to the pacakge @PROJECT_NAME@ itself:
-#  @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
-#
-# Other stuff specific to this package:
-#  1. Some flags:
-#   LIBBATCH_LOCAL_SUBMISSION - boolean indicating whether LibBatch was built with the 
-#   local submission support.
-#   LIBBATCH_PYTHON_WRAPPING  - boolean indicating whether the Python wrapping was built.
-#   LIBBATCH_PYTHONPATH       - (if above is True) path to the Python wrapping. 
-
-###############################################################
-#  Copyright (C) 2007-2013  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
-###############################################################
-
-### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
-@PACKAGE_INIT@
-
-# Load the dependencies for the libraries of @PROJECT_NAME@ 
-# (contains definitions for IMPORTED targets). This is only 
-# imported if we are not built as a subproject (in this case targets are already there)
-IF(NOT batch AND NOT @PROJECT_NAME@_BINARY_DIR)
-  INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE@/@PROJECT_NAME@Targets.cmake")
-ENDIF()   
-
-# Package root dir:
-SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
-
-#### Now the specificities
-
-# Options exported by the package:
-SET(SALOME_USE_MPI     @SALOME_USE_MPI@)
-SET(SALOME_BUILD_DOC   @SALOME_BUILD_DOC@)
-SET(SALOME_BUILD_TESTS @SALOME_BUILD_TESTS@)
-SET(SALOME_LIGHT_ONLY  @SALOME_LIGHT_ONLY@)
-
-# Prerequisites:
-IF(SALOME_BUILD_TESTS)
-  SET_AND_CHECK(CPPUNIT_ROOT_DIR_EXP  "@PACKAGE_CPPUNIT_ROOT_DIR@")
-ENDIF()
-IF(SALOME_BUILD_DOC)
-  SET_AND_CHECK(GRAPHVIZ_ROOT_DIR_EXP "@PACKAGE_GRAPHVIZ_ROOT_DIR@")
-  SET_AND_CHECK(DOXYGEN_ROOT_DIR_EXP  "@PACKAGE_DOXYGEN_ROOT_DIR@")
-  SET_AND_CHECK(SPHINX_ROOT_DIR_EXP   "@PACKAGE_SPHINX_ROOT_DIR@")
-ENDIF()
-IF(SALOME_USE_MPI)
-  SET_AND_CHECK(MPI_ROOT_DIR_EXP      "@PACKAGE_MPI_ROOT_DIR@")
-ENDIF()
-IF(NOT SALOME_LIGHT_ONLY)
-  SET_AND_CHECK(OMNIORB_ROOT_DIR_EXP  "@PACKAGE_OMNIORB_ROOT_DIR@")
-ENDIF()
-IF(SALOME_USE_LIBBATCH)
-  SET_AND_CHECK(LIBBATCH_ROOT_DIR_EXP "@PACKAGE_LIBBATCH_ROOT_DIR@")
-ENDIF()
-
-SET_AND_CHECK(PTHREAD_ROOT_DIR_EXP  "@PACKAGE_PTHREAD_ROOT_DIR@")
-SET_AND_CHECK(BOOST_ROOT_DIR_EXP    "@PACKAGE_BOOST_ROOT_DIR@")
-SET_AND_CHECK(HDF5_ROOT_DIR_EXP     "@PACKAGE_HDF5_ROOT_DIR@")
-SET_AND_CHECK(LIBXML2_ROOT_DIR_EXP  "@PACKAGE_LIBXML2_ROOT_DIR@")
-SET_AND_CHECK(PYTHON_ROOT_DIR_EXP   "@PACKAGE_PYTHON_ROOT_DIR@")
-SET_AND_CHECK(SWIG_ROOT_DIR_EXP     "@PACKAGE_SWIG_ROOT_DIR@")
-
-# Installation directories
-SET_AND_CHECK(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
-SET_AND_CHECK(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
-SET_AND_CHECK(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
-SET_AND_CHECK(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
-SET_AND_CHECK(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
-SET_AND_CHECK(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
-SET_AND_CHECK(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
-SET_AND_CHECK(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
-SET_AND_CHECK(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") 
-SET_AND_CHECK(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
-SET_AND_CHECK(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
-SET_AND_CHECK(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
diff --git a/salome_adm/cmake_files/SalomeSetupPlatform.cmake b/salome_adm/cmake_files/SalomeSetupPlatform.cmake
deleted file mode 100644 (file)
index 7c511fa..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-
-## Detect architecture
-IF(WIN32)
-  SET(MACHINE WINDOWS)
-ELSE()
-  SET(MACHINE PCLINUX)
-ENDIF()
-
-## Test for 64 bits
-IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
-  SET(MACHINE_IS_64 TRUE)
-ELSE()
-  SET(MACHINE_IS_64 FALSE)
-ENDIF()
-
-## Force CMAKE_BUILD_TYPE to Release if not set
-IF(NOT CMAKE_BUILD_TYPE)
-  SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE})
-ENDIF(NOT CMAKE_BUILD_TYPE)
-IF(NOT CMAKE_BUILD_TYPE)
-  SET(CMAKE_BUILD_TYPE Release)
-ENDIF(NOT CMAKE_BUILD_TYPE)
-
-## Make all warnings errors on non-windows platforms
-#  CURRENTLY DISABLED
-IF(NOT (WIN32 OR APPLE))
-  SET(ADD_WERROR ON)
-  SET(NAMES ACCEPT_SALOME_WARNINGS ACCEPT_${MODULE}_WARNINGS I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS)
-  FOREACH(name ${NAMES})
-    SET(VAL $ENV{${name}})
-    IF("${VAL}" STREQUAL "0")
-      SET(ADD_WERROR ON)
-    ENDIF()
-    IF("${VAL}" STREQUAL "1")
-      SET(ADD_WERROR OFF)
-    ENDIF()
-  ENDFOREACH()
-  
-  IF(ADD_WERROR)
-#    SET(CMAKE_C_FLAGS "-Werror")
-#    SET(CMAKE_CXX_FLAGS "-Werror")
-  ENDIF()
-ENDIF()
-
-## TODO: remove this ?
-#IF(WIN32)
-#    MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES)
-#    SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE)
-#ELSE()
-#    IF(CMAKE_BUILD_TYPE STREQUAL Debug)
-#      SET(CMAKE_C_FLAGS_DEBUG "-g")
-#      SET(CMAKE_CXX_FLAGS_DEBUG "-g")
-#    ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
-#    IF(CMAKE_BUILD_TYPE STREQUAL Release)
-#      SET(CMAKE_C_FLAGS_RELEASE "-O1 -DNDEBUG")
-#      SET(CMAKE_CXX_FLAGS_RELEASE "-O1 -DNDEBUG")
-#    ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
-#ENDIF()
-
-
-IF(WIN32)
-  ## Windows specific:  
-  ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)  # To disable windows warnings for strcpy, fopen, ...
-  ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)  # To disable windows warnings std::copy, std::transform, ...
-  ADD_DEFINITIONS(-DWNT -DWIN32)
-  ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500)      # Windows 2000 or later API is required
-  ADD_DEFINITIONS(-DPPRO_NT)                  # For medfile
-  #ADD_DEFINITIONS(-D_USE_MATH_DEFINES)        # for MEDMEM
-    
-  SET(PLATFORM_LIBS Ws2_32.lib)
-  LIST(APPEND PLATFORM_LIBS Userenv.lib)      # At least for GEOM suit
-  
-  IF(MACHINE_IS_64)      
-    ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
-    ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators
-    SET(SIZE_OF_LONG "4")                        # set sizeof(long) to 4 byte 
-  ENDIF()
-ELSE()
-  ## Linux specific:
-  SET(PLATFORM_LIBS dl)    # Dynamic loading (dlopen, dlsym)
-ENDIF()
-
-## Apple specific:
-IF(APPLE)
-  SET(CMAKE_C_COMPILER gcc)
-  SET(CMAKE_CXX_COMPILER g++)
-  # because default is clang(llvm) with mountain lion at least
-ENDIF()
-
diff --git a/salome_adm/cmake_files/UseOMNIORB.cmake b/salome_adm/cmake_files/UseOMNIORB.cmake
new file mode 100644 (file)
index 0000000..1efa8b2
--- /dev/null
@@ -0,0 +1,92 @@
+# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+INSTALL( CODE "
+SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome) # R1 CHECK
+IF(WINDOWS)
+  SET(INSTALL_PYIDL_DIR bin/salome) # R1 CHECK
+ENDIF(WINDOWS)
+
+MACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL MYOMNIORBIDLPYTHON MYIDLPYFLAGS MYIDLFILE MYFULLDIR)
+  FILE(MAKE_DIRECTORY \${MYFULLDIR})
+  STRING(REPLACE \" \" \";\" MYIDLPYFLAGS2 \${MYIDLPYFLAGS})
+  MESSAGE(STATUS \"Compiling \${MYIDLFILE} into \${MYFULLDIR}\")
+  EXECUTE_PROCESS(COMMAND \${MYOMNIORBIDLPYTHON} \${MYIDLPYFLAGS2} -C\${MYFULLDIR} \${MYIDLFILE})
+ENDMACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL)
+")
+
+# This MACRO uses the following vars
+# - OMNIORB_IDL : the idl tool (given by default by FindOMNIORB.cmake)
+# - OMNIORB_IDLCXXFLAGS : the options (include excluded) to give to omniidl generator (given by default by FindOMNIORB.cmake)
+#
+# MYMODULE is a string that will be used to create a target with sources containing *.cc coming from the compilation of ${MYIDLFILES}
+# MYIDLFILES containing all idl files to be compiled.
+# MYIDLCXXFLAGS containing all directories (only directories) where to find *.idl which depend ${MYIDLFILES}.
+# TYPE contains type of the library 
+MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS TYPE)
+  SET(MYSOURCES)
+  FOREACH(input ${MYIDLFILES})
+    GET_FILENAME_COMPONENT(base ${input} NAME_WE)
+#    STRING(REGEX REPLACE ".idl" "" base ${input})
+    SET(OMNIORB_IDLCXXFLAGS2 "${OMNIORB_IDLCXXFLAGS}")
+    SET(src ${CMAKE_CURRENT_BINARY_DIR}/${base}SK.cc)
+    SET(MYSOURCES ${MYSOURCES} ${src})
+    SET(outputs ${src})
+    SET(dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}DynSK.cc)
+    SET(MYSOURCES ${MYSOURCES} ${dynsrc})
+    SET(outputs ${outputs} ${dynsrc})
+    SET(inc ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh)
+    SET(outputs ${outputs} ${inc})
+    GET_FILENAME_COMPONENT(path ${input} PATH)
+    IF(NOT path)
+      SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
+    ENDIF(NOT path)
+    SET(flags ${OMNIORB_IDLCXXFLAGS2})
+    STRING(REGEX MATCH "-bcxx" ISBCXX ${flags})
+    IF(NOT ISBCXX)
+      SET(flags -bcxx ${flags})
+    ENDIF(NOT ISBCXX)
+    FOREACH(f ${MYIDLCXXFLAGS})
+      SET(flags ${flags} "-I${f}")
+    ENDFOREACH(f ${MYIDLCXXFLAGS})
+    ADD_CUSTOM_COMMAND(OUTPUT ${outputs}
+      COMMAND ${OMNIORB_IDL_COMPILER} ${flags} ${input}
+      MAIN_DEPENDENCY ${input})
+    SET(IDLPYFLAGS ${flags})
+    INSTALL(FILES ${input} DESTINATION idl/salome)
+    SET(IDL_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh)
+    INSTALL(FILES ${IDL_HEADER} DESTINATION include/salome)
+    SET(flags)
+    FOREACH(f ${MYIDLCXXFLAGS})
+      SET(flags "${flags} -I${f}")
+    ENDFOREACH(f ${MYIDLCXXFLAGS})
+    STRING(REGEX MATCH "-bpython" ISBPYTHON ${flags})
+    IF(NOT ISBPYTHON)
+      SET(flags "-bpython ${flags}")
+    ENDIF(NOT ISBPYTHON)
+    SET(IDLPYFLAGS ${flags})
+    STRING(REPLACE "\\" "/" IDLPYFLAGS ${IDLPYFLAGS})
+    IF(OMNIORB_PYTHON_BACKEND)
+      SET(IDLPYFLAGS "${IDLPYFLAGS} -p${OMNIORB_PYTHON_BACKEND}")
+      INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_COMPILER}\" \"${IDLPYFLAGS}\" \"${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )")
+    ENDIF(OMNIORB_PYTHON_BACKEND)
+  ENDFOREACH(input ${MYIDLFILES})
+  ADD_LIBRARY(${MYMODULE} ${TYPE} ${MYSOURCES})
+
+ENDMACRO(OMNIORB_ADD_MODULE)