From 20c366670836d670b9c686e32a6c82ce28927d55 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 17 Feb 2014 11:26:02 +0400 Subject: [PATCH] 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. --- CMakeLists.txt | 6 +++--- salome_adm/cmake_files/FindSalomeLibBatch.cmake | 6 +++--- ...lomeSIMANIO.cmake => FindSalomeSimanIO.cmake} | 10 +++++----- .../{FindSIMANIO.cmake => FindSimanIO.cmake} | 16 ++++++++-------- src/SALOMEDS/CMakeLists.txt | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) rename salome_adm/cmake_files/{FindSalomeSIMANIO.cmake => FindSalomeSimanIO.cmake} (85%) rename salome_adm/cmake_files/{FindSIMANIO.cmake => FindSimanIO.cmake} (78%) 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/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 similarity index 85% rename from salome_adm/cmake_files/FindSalomeSIMANIO.cmake rename to salome_adm/cmake_files/FindSalomeSimanIO.cmake index 0a36c8407..15352690a 100644 --- a/salome_adm/cmake_files/FindSalomeSIMANIO.cmake +++ b/salome_adm/cmake_files/FindSalomeSimanIO.cmake @@ -19,15 +19,15 @@ # Author: Vadim SANDLER # -# SIMANIO detection dor Salome +# SimanIO detection dor Salome # # !! Please read the generic detection procedure in SalomeMacros.cmake !! # -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SIMANIO SIMANIO_INCLUDE_DIR 1) +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SimanIO SIMANIO_INCLUDE_DIRS 1) #MARK_AS_ADVANCED() -IF(SIMANIO_FOUND) - SALOME_ACCUMULATE_HEADERS(SIMANIO_INCLUDE_DIR) +IF(SIMANIO_FOUND) + SALOME_ACCUMULATE_HEADERS(SIMANIO_INCLUDE_DIRS) SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${SIMANIO_LIBRARIES}) -ENDIF() \ No newline at end of file +ENDIF() diff --git a/salome_adm/cmake_files/FindSIMANIO.cmake b/salome_adm/cmake_files/FindSimanIO.cmake similarity index 78% rename from salome_adm/cmake_files/FindSIMANIO.cmake rename to salome_adm/cmake_files/FindSimanIO.cmake index dadf08a1b..cf0420ddd 100644 --- a/salome_adm/cmake_files/FindSIMANIO.cmake +++ b/salome_adm/cmake_files/FindSimanIO.cmake @@ -1,9 +1,9 @@ -# - Find SIMANIO installation +# - 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 +# 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. @@ -36,19 +36,19 @@ ENDIF() # ------ -SET(SIMANIO_ROOT_DIR $ENV{SIMANIO_ROOT_DIR} CACHE PATH "Path to the SIMANIO.") +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_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_DIR SIMANIO_LIBRARIES) +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}") + 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 -- 2.39.2