]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix problems with using SimanIO and LibBatch third-party products in
authorrnv <rnv@opencascade.com>
Mon, 17 Feb 2014 07:26:02 +0000 (11:26 +0400)
committerrnv <rnv@opencascade.com>
Mon, 17 Feb 2014 07:26:02 +0000 (11:26 +0400)
different cases:

1) Third-party library contains the CMake configuration
files(<Name>Config.cmake and <Name>Targets.cmake).
2) Third-party library doesn't contain the CMake configuration files.

CMakeLists.txt
salome_adm/cmake_files/FindSIMANIO.cmake [deleted file]
salome_adm/cmake_files/FindSalomeLibBatch.cmake
salome_adm/cmake_files/FindSalomeSIMANIO.cmake [deleted file]
salome_adm/cmake_files/FindSalomeSimanIO.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSimanIO.cmake [new file with mode: 0644]
src/SALOMEDS/CMakeLists.txt

index 3e18d27483a07d78b061e4378900c5f89c6e8a8f..42ff8f10abe7e5295188c8cef6804fb4f700be2e 100755 (executable)
@@ -89,8 +89,8 @@ FIND_PACKAGE(SalomeBoost REQUIRED)
 # ======================
 
 IF(SALOME_USE_SIMAN)
-  FIND_PACKAGE(SalomeSIMANIO)
-  SALOME_LOG_OPTIONAL_PACKAGE(SIMANIO SALOME_USE_SIMAN)
+  FIND_PACKAGE(SalomeSimanIO)
+  SALOME_LOG_OPTIONAL_PACKAGE(SimanIO SALOME_USE_SIMAN)
   ADD_DEFINITIONS(-DWITH_SIMANIO)
 ENDIF()
 IF(NOT SALOME_LIGHT_ONLY)
@@ -254,7 +254,7 @@ SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/inc
 
 # Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
 SALOME_CONFIGURE_PREPARE(CppUnit Graphviz Doxygen Sphinx MPI omniORB LibBatch 
-                         PThread Boost HDF5 libXml2 Python SIMANIO)
+                         PThread Boost HDF5 libXml2 Python SimanIO)
 
 CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in 
     ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
diff --git a/salome_adm/cmake_files/FindSIMANIO.cmake b/salome_adm/cmake_files/FindSIMANIO.cmake
deleted file mode 100644 (file)
index dadf08a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# - Find SIMANIO installation
-#
-# The following variable are set:
-#   SIMANIO_FOUND       - TRUE if SIMANIO installation has been found
-#   SIMANIO_INCLUDE_DIR - SIMANIO headers path
-#   SIMANIO_LIBRARIES   - SIMANIO libraries
-#
-#  The CMake (or environment) variable SIMANIO_ROOT_DIR can be set to
-#  guide the detection and indicate a root directory to look into.
-#
-############################################################################
-# Copyright (C) 2012-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
-#
-
-# ------
-
-IF(NOT SIMANIO_FIND_QUIETLY)
-    MESSAGE(STATUS "Check for SimanIO ...")
-ENDIF()
-
-# ------
-
-SET(SIMANIO_ROOT_DIR $ENV{SIMANIO_ROOT_DIR} CACHE PATH "Path to the SIMANIO.")
-IF(SIMANIO_ROOT_DIR)
-  LIST(APPEND CMAKE_PREFIX_PATH "${SIMANIO_ROOT_DIR}")
-ENDIF()
-
-FIND_PATH(SIMANIO_INCLUDE_DIR SimanIO_Link.hxx)
-FIND_LIBRARY(SIMANIO_LIBRARIES NAMES SimanIO)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SIMANIO REQUIRED_VARS SIMANIO_INCLUDE_DIR SIMANIO_LIBRARIES)
-
-IF(SIMANIO_FOUND)
-  IF(NOT SIMANIO_FIND_QUIETLY)
-    MESSAGE(STATUS "SIMANIO library: ${SIMANIO_LIBRARIES}")
-  ENDIF()
-ENDIF()
index 8f01c2385d0124cf2731a31a70cf50a91e44790f..a9e0d06758025e17346019965628f869a16ab056 100644 (file)
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
 
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibBatch LIBBATCH_ROOT_DIR_EXP 0)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibBatch LIBBATCH_INCLUDE_DIRS 1)
 #MARK_AS_ADVANCED()
 
-IF(SALOMELIBBATCH_FOUND) 
+IF(SALOMELIBBATCH_FOUND)
   SALOME_ACCUMULATE_HEADERS(LIBBATCH_INCLUDE_DIRS)
   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBBATCH_LIBRARIES})
-ENDIF()
\ No newline at end of file
+ENDIF()
diff --git a/salome_adm/cmake_files/FindSalomeSIMANIO.cmake b/salome_adm/cmake_files/FindSalomeSIMANIO.cmake
deleted file mode 100644 (file)
index 0a36c84..0000000
+++ /dev/null
@@ -1,33 +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: Vadim SANDLER
-#
-
-# SIMANIO detection dor Salome
-#
-#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SIMANIO SIMANIO_INCLUDE_DIR 1)
-#MARK_AS_ADVANCED()
-
-IF(SIMANIO_FOUND) 
-  SALOME_ACCUMULATE_HEADERS(SIMANIO_INCLUDE_DIR)
-  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${SIMANIO_LIBRARIES})
-ENDIF()
\ No newline at end of file
diff --git a/salome_adm/cmake_files/FindSalomeSimanIO.cmake b/salome_adm/cmake_files/FindSalomeSimanIO.cmake
new file mode 100644 (file)
index 0000000..1535269
--- /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
+#
+# Author: Vadim SANDLER
+#
+
+# SimanIO detection dor Salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SimanIO SIMANIO_INCLUDE_DIRS 1)
+#MARK_AS_ADVANCED()
+
+IF(SIMANIO_FOUND)
+  SALOME_ACCUMULATE_HEADERS(SIMANIO_INCLUDE_DIRS)
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${SIMANIO_LIBRARIES})
+ENDIF()
diff --git a/salome_adm/cmake_files/FindSimanIO.cmake b/salome_adm/cmake_files/FindSimanIO.cmake
new file mode 100644 (file)
index 0000000..cf0420d
--- /dev/null
@@ -0,0 +1,54 @@
+# - Find SimanIO installation
+#
+# The following variable are set:
+#   SIMANIO_FOUND        - TRUE if SimanIO installation has been found
+#   SIMANIO_INCLUDE_DIRS - SimanIO headers path
+#   SIMANIO_LIBRARIES    - SimanIO libraries
+#
+#  The CMake (or environment) variable SIMANIO_ROOT_DIR can be set to
+#  guide the detection and indicate a root directory to look into.
+#
+############################################################################
+# Copyright (C) 2012-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
+#
+
+# ------
+
+IF(NOT SIMANIO_FIND_QUIETLY)
+    MESSAGE(STATUS "Check for SimanIO ...")
+ENDIF()
+
+# ------
+
+SET(SIMANIO_ROOT_DIR $ENV{SIMANIO_ROOT_DIR} CACHE PATH "Path to the SimanIO.")
+IF(SIMANIO_ROOT_DIR)
+  LIST(APPEND CMAKE_PREFIX_PATH "${SIMANIO_ROOT_DIR}")
+ENDIF()
+
+FIND_PATH(SIMANIO_INCLUDE_DIRS SimanIO_Link.hxx)
+FIND_LIBRARY(SIMANIO_LIBRARIES NAMES SimanIO)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SimanIO REQUIRED_VARS SIMANIO_INCLUDE_DIRS SIMANIO_LIBRARIES)
+
+IF(SIMANIO_FOUND)
+  IF(NOT SIMANIO_FIND_QUIETLY)
+    MESSAGE(STATUS "SimanIO library: ${SIMANIO_LIBRARIES}")
+  ENDIF()
+ENDIF()
index b03dd349ef25d499db41e8fd1e48df129f2301fe..ac6853ed61b4e1df80b86ca6acd413efa51f4472 100755 (executable)
@@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR}
   ${HDF5_INCLUDE_DIRS}
   ${Boost_INCLUDE_DIR}
-  ${SIMANIO_INCLUDE_DIR}
+  ${SIMANIO_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics