From: rnv Date: Mon, 17 Feb 2014 07:26:02 +0000 (+0400) Subject: Fix problems with using SimanIO and LibBatch third-party products in X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=20c366670836d670b9c686e32a6c82ce28927d55;p=modules%2Fyacs.git Fix problems with using SimanIO and LibBatch third-party products in different cases: 1) Third-party library contains the CMake configuration files(Config.cmake and Targets.cmake). 2) Third-party library doesn't contain the CMake configuration files. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e18d2748..42ff8f10a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 SalomeConfig.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 index dadf08a1b..000000000 --- a/salome_adm/cmake_files/FindSIMANIO.cmake +++ /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() diff --git a/salome_adm/cmake_files/FindSalomeLibBatch.cmake b/salome_adm/cmake_files/FindSalomeLibBatch.cmake index 8f01c2385..a9e0d0675 100644 --- a/salome_adm/cmake_files/FindSalomeLibBatch.cmake +++ b/salome_adm/cmake_files/FindSalomeLibBatch.cmake @@ -24,10 +24,10 @@ # !! 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 index 0a36c8407..000000000 --- a/salome_adm/cmake_files/FindSalomeSIMANIO.cmake +++ /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 index 000000000..15352690a --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeSimanIO.cmake @@ -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 index 000000000..cf0420ddd --- /dev/null +++ b/salome_adm/cmake_files/FindSimanIO.cmake @@ -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() diff --git a/src/SALOMEDS/CMakeLists.txt b/src/SALOMEDS/CMakeLists.txt index b03dd349e..ac6853ed6 100755 --- a/src/SALOMEDS/CMakeLists.txt +++ b/src/SALOMEDS/CMakeLists.txt @@ -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