# -> this can help finding the smaller prerequisites and detect conficts.
# =======================
-FIND_PACKAGE(SalomeLibBatch REQUIRED)
+# Exception: LibBatch is optional but is loaded first, as it can
+# give Python, Pthread and SWIG:
+IF(SALOME_USE_LIBBATCH)
+ FIND_PACKAGE(SalomeLibBatch REQUIRED)
+ENDIF()
+
FIND_PACKAGE(SalomePython REQUIRED)
FIND_PACKAGE(SalomePThread REQUIRED)
FIND_PACKAGE(SalomeSWIG REQUIRED)
FIND_PACKAGE(SalomeLibXml2 REQUIRED)
-
-# HDF5 requires a bit more work to ensure MPI is selected:
-FIND_PACKAGE(SalomeHDF5 REQUIRED)
-ADD_DEFINITIONS(-DH5_USE_16_API)
-IF(WINDOWS)
- ADD_DEFINITIONS(-D_HDF5USEDLL_)
-ENDIF()
-IF(HDF5_IS_PARALLEL AND NOT SALOME_USE_MPI)
- MESSAGE(FATAL_ERROR "HDF5 is compiled with MPI, you have to set SALOME_USE_MPI to ON")
-ENDIF()
-
-# Boost
+FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C)
FIND_PACKAGE(SalomeBoost REQUIRED)
-IF(WIN32)
- SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS)
-ENDIF()
# Optional prerequisites
# ======================
ENDIF()
IF(SALOME_USE_MPI)
FIND_PACKAGE(SalomeMPI REQUIRED)
- SET(MPI_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH})
- SET(MPI_LIBRARIES ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
ENDIF()
IF(SALOME_BUILD_TESTS)
ENABLE_TESTING()
SET(SALOME_INSTALL_APPLISKEL_PYTHON ${SALOME_INSTALL_BINS}/appliskel CACHE PATH
"Install path: SALOME application skeleton - Python")
SET(SALOME_INSTALL_CMAKE salome_adm/cmake_files CACHE PATH "Install path: SALOME CMake files")
+SET(SALOME_INSTALL_CMAKE_LOCAL adm_local/cmake_files CACHE PATH
+ "Install path: local SALOME CMake files")
SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
SET(SALOME_INSTALL_PYTHON ${_pydir}/salome CACHE PATH "Install path: SALOME Python stuff")
SET(SALOME_INSTALL_PYTHON_SHARED ${SALOME_INSTALL_PYTHON}/shared_modules CACHE PATH
"Install path: SALOME Python shared modules")
+SET(SALOME_INSTALL_RES share/salome/resources CACHE PATH "Install path: SALOME resources")
+
# Kernel specific:
-SET(SALOME_KERNEL_INSTALL_RES_DATA share/salome/resources/kernel CACHE PATH "Install path: SALOME KERNEL specific data")
-SET(SALOME_KERNEL_INSTALL_RES_SCRIPTS share/salome/resources/kernel CACHE PATH "Install path: SALOME KERNEL specific scripts")
+SET(SALOME_KERNEL_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/kernel" CACHE PATH "Install path: SALOME KERNEL specific data")
+SET(SALOME_KERNEL_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/kernel" CACHE PATH "Install path: SALOME KERNEL specific scripts")
MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS)
MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME_INSTALL_SCRIPT_PYTHON)
-MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE)
+MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE SALOME_INSTALL_CMAKE_LOCAL SALOME_INSTALL_RES)
MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED SALOME_KERNEL_INSTALL_RES_DATA SALOME_KERNEL_INSTALL_RES_SCRIPTS)
# Sources
# Header configuration
# ====================
+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${${PROJECT_NAME_UC}_VERSION}
+ OUTPUT_VARIABLE XVERSION)
SET(input ${CMAKE_CURRENT_SOURCE_DIR}/KERNEL_version.h.in)
SET(output ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h)
MESSAGE(STATUS "Creation of ${output}")
# ====================
INCLUDE(CMakePackageConfigHelpers)
+# List of targets in this project we want to make visible to the rest of the world.
+# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
+SET(_${PROJECT_NAME}_exposed_targets
+ CalciumC SalomeCalcium DF Launcher LifeCycleCORBATest NamingServiceTest
+ OpUtil Registry ResourcesManager SALOMEBasics SalomeCatalog SalomeCommunication
+ SalomeContainer SalomeDatastream SalomePalm SalomeDSCContainer SalomeDSClient
+ SalomeDSCSupervBasic SalomeDSCSuperv SalomeDSImpl SALOMEDSImplTest
+ SalomeDS SALOMEDSTest SalomeGenericObj SalomeHDFPersist SalomeIDLKernel
+ SalomeLauncher SalomeLifeCycleCORBA SALOMELocalTrace SALOMELocalTraceTest
+ SalomeLoggerServer SalomeNotification SalomeNS
+ SalomeResourcesManager SalomeTestComponentEngine
+ SALOMETraceCollectorTest TOOLSDS UtilsTest with_loggerTraceCollector SalomeKernelHelpers)
+
+# MPI specific targets:
+IF(SALOME_USE_MPI)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ SalomeMPIContainer SalomeTestMPIComponentEngine)
+ENDIF()
+
# Add all targets to the build-tree export set
-EXPORT(TARGETS SALOMEBasics
+EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
# Create the configuration files:
DESTINATION "${SALOME_INSTALL_CMAKE}")
# Install the export set for use with the install-tree
-INSTALL(EXPORT ${PROJECT_NAME}Targets DESTINATION "${SALOME_INSTALL_CMAKE}")
+INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE}"
+ FILE ${PROJECT_NAME}Targets.cmake)
ADD_DEFINITIONS(${COMMON_FLAGS})
TARGET_LINK_LIBRARIES(SalomeIDLKernel ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS SalomeIDLKernel DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeIDLKernel EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
IF(SALOME_PACO_PARALLEL)
SET(SalomeParallelIDLKernel_IDLSOURCES
OMNIORB_ADD_MODULE(SalomeParallelIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${OMNIORB_LIBRARIES})
- INSTALL(TARGETS SalomeParallelIDLKernel DESTINATION ${SALOME_INSTALL_LIBS})
+ INSTALL(TARGETS SalomeParallelIDLKernel EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ENDIF()
SET(DATA
FindCppUnit.cmake
FindGraphviz.cmake
- FindKERNEL.cmake
+ FindSalomeKERNEL.cmake
FindOmniORB.cmake
FindPThread.cmake
FindSalomeBoost.cmake
# - Find CppUnit
# Sets the following variables:
-# CPPUNIT_INCLUDE_DIR - path to the CppUnit include directory
+# CPPUNIT_INCLUDE_DIRS - path to the CppUnit include directory
# CPPUNIT_LIBRARIES - path to the CppUnit libraries to be linked against
# CPPUNIT_DEFINITIONS - specific CppUnit definitions to be added
#
+++ /dev/null
-# 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
-#
-
-SET(KERNEL_CXXFLAGS -I${KERNEL_ROOT_DIR}/include/salome) # to be removed
-SET(KERNEL_INCLUDE_DIRS ${KERNEL_ROOT_DIR}/include/salome)
-
-FIND_LIBRARY(KERNEL_CalciumC CalciumC ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_DF DF ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_Launcher Launcher ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_LifeCycleCORBATest LifeCycleCORBATest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_NamingServiceTest NamingServiceTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_OpUtil OpUtil ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_Registry Registry ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_ResourcesManager ResourcesManager ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMEBasics SALOMEBasics ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeCatalog SalomeCatalog ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeCommunication SalomeCommunication ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeContainer SalomeContainer ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDatastream SalomeDatastream ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSCContainer SalomeDSCContainer ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSClient SalomeDSClient ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSCSupervBasic SalomeDSCSupervBasic ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSCSuperv SalomeDSCSuperv ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSImpl SalomeDSImpl ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMEDSImplTest SALOMEDSImplTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDS SalomeDS ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMEDSTest SALOMEDSTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeGenericObj SalomeGenericObj ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeHDFPersist SalomeHDFPersist ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeIDLKernel SalomeIDLKernel ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeLauncher SalomeLauncher ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeLifeCycleCORBA SalomeLifeCycleCORBA ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMELocalTrace SALOMELocalTrace ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMELocalTraceTest SALOMELocalTraceTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeLoggerServer SalomeLoggerServer ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeMPIContainer SalomeMPIContainer ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeNotification SalomeNotification ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeNS SalomeNS ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeResourcesManager SalomeResourcesManager ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeTestComponentEngine SalomeTestComponentEngine ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeTestMPIComponentEngine SalomeTestMPIComponentEngine ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMETraceCollectorTest SALOMETraceCollectorTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_TOOLSDS TOOLSDS ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_UtilsTest UtilsTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_with_loggerTraceCollector with_loggerTraceCollector ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeKernelHelpers SalomeKernelHelpers ${KERNEL_ROOT_DIR}/lib/salome)
# 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_MINIMUM_VERSION "4.1.2")
IF(WIN32)
# Guide the FIND_LIBRARY command towards the correct directory <...>/lib/x86_win32:
MESSAGE(STATUS "Boost include dirs is: ${Boost_INCLUDE_DIRS}")
ENDIF()
#MARK_AS_ADVANCED()
+
+## Specific definitions:
+IF(WIN32)
+ SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS)
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1)
MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB)
-# 7. Expose MPI configuration to the rest of the world
+##
+## 7. Specific to HDF5 only:
+## Expose MPI configuration to the rest of the world
+##
IF(HDF5_ENABLE_PARALLEL OR HDF5_IS_PARALLEL)
# Set only one reference boolean variable:
# (unfortunately what is found in /usr/share/cmake/Modules/FindHDF5.cmake
ENDIF()
ENDIF()
+## Add definitions
+ADD_DEFINITIONS(-DH5_USE_16_API)
+IF(WIN32)
+ ADD_DEFINITIONS(-D_HDF5USEDLL_)
+ENDIF()
+
+## Ensure SALOME uses MPI if HDF5 was parallel:
+IF(HDF5_IS_PARALLEL AND NOT SALOME_USE_MPI)
+ MESSAGE(FATAL_ERROR "HDF5 is compiled with MPI, you have to set SALOME_USE_MPI to ON")
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MPI MPIEXEC 2)
MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY)
+
+SET(MPI_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH})
+SET(MPI_LIBRARIES ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
# @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.
+# SALOME_USE_MPI -
+# SALOME_BUILD_DOC -
+# SALOME_BUILD_TESTS -
+# SALOME_LIGHT_ONLY -
###############################################################
# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
# 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)
+IF(NOT SALOMEBasics 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@")
+# Include directories
+SET_AND_CHECK(KERNEL_INCLUDE_DIRS "${KERNEL_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
+
#### Now the specificities
# Options exported by the package:
SET(SALOME_BUILD_DOC @SALOME_BUILD_DOC@)
SET(SALOME_BUILD_TESTS @SALOME_BUILD_TESTS@)
SET(SALOME_LIGHT_ONLY @SALOME_LIGHT_ONLY@)
+SET(SALOME_USE_LIBBATCH @SALOME_USE_LIBBATCH@)
# Prerequisites:
IF(SALOME_BUILD_TESTS)
ENDIF()
IF(SALOME_USE_LIBBATCH)
SET_AND_CHECK(LIBBATCH_ROOT_DIR_EXP "@PACKAGE_LIBBATCH_ROOT_DIR@")
+ # Make libbatch targets available, so the linking of dependent projects find them:
+ INCLUDE("${LIBBATCH_ROOT_DIR_EXP}/share/cmake/libbatch/LibBatchTargets.cmake")
ENDIF()
SET_AND_CHECK(PTHREAD_ROOT_DIR_EXP "@PACKAGE_PTHREAD_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@")
+SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@")
+SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@")
+SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@")
+SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@")
+SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@")
+SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@")
+SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
+SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
+SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@")
+SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
+SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
+SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
+SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
+SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
+
+# Exposed targets:
+SET(KERNEL_CalciumC CalciumC)
+SET(KERNEL_DF DF)
+SET(KERNEL_Launcher Launcher)
+SET(KERNEL_LifeCycleCORBATest LifeCycleCORBATest)
+SET(KERNEL_NamingServiceTest NamingServiceTest)
+SET(KERNEL_OpUtil OpUtil)
+SET(KERNEL_Registry Registry)
+SET(KERNEL_ResourcesManager ResourcesManager)
+SET(KERNEL_SALOMEBasics SALOMEBasics)
+SET(KERNEL_SalomeCatalog SalomeCatalog)
+SET(KERNEL_SalomeCommunication SalomeCommunication)
+SET(KERNEL_SalomeContainer SalomeContainer)
+SET(KERNEL_SalomeDatastream SalomeDatastream)
+SET(KERNEL_SalomeDSCContainer SalomeDSCContainer)
+SET(KERNEL_SalomeDSClient SalomeDSClient)
+SET(KERNEL_SalomeDSCSupervBasic SalomeDSCSupervBasic)
+SET(KERNEL_SalomeDSCSuperv SalomeDSCSuperv)
+SET(KERNEL_SalomeDSImpl SalomeDSImpl)
+SET(KERNEL_SALOMEDSImplTest SALOMEDSImplTest)
+SET(KERNEL_SalomeDS SalomeDS)
+SET(KERNEL_SALOMEDSTest SALOMEDSTest)
+SET(KERNEL_SalomeGenericObj SalomeGenericObj)
+SET(KERNEL_SalomeHDFPersist SalomeHDFPersist)
+SET(KERNEL_SalomeIDLKernel SalomeIDLKernel)
+SET(KERNEL_SalomeLauncher SalomeLauncher)
+SET(KERNEL_SalomeLifeCycleCORBA SalomeLifeCycleCORBA)
+SET(KERNEL_SALOMELocalTrace SALOMELocalTrace)
+SET(KERNEL_SALOMELocalTraceTest SALOMELocalTraceTest)
+SET(KERNEL_SalomeLoggerServer SalomeLoggerServer)
+SET(KERNEL_SalomeMPIContainer SalomeMPIContainer)
+SET(KERNEL_SalomeNotification SalomeNotification)
+SET(KERNEL_SalomeNS SalomeNS)
+SET(KERNEL_SalomeResourcesManager SalomeResourcesManager)
+SET(KERNEL_SalomeTestComponentEngine SalomeTestComponentEngine)
+SET(KERNEL_SalomeTestMPIComponentEngine SalomeTestMPIComponentEngine)
+SET(KERNEL_SALOMETraceCollectorTest SALOMETraceCollectorTest)
+SET(KERNEL_TOOLSDS TOOLSDS)
+SET(KERNEL_UtilsTest UtilsTest)
+SET(KERNEL_with_loggerTraceCollector with_loggerTraceCollector)
+SET(KERNEL_SalomeKernelHelpers SalomeKernelHelpers)
+
+
####
-# SALOME_FIND_PACKAGE(englobingPackageName standardPackageName modus)
+# SALOME_FIND_PACKAGE(englobingPackageName standardPackageName modus [onlyTryQuietly])
+#
+# example: SALOME_FIND_PACKAGE(SalomeVTK VTK CONFIG)
+#
# Encapsulate the call to the standard FIND_PACKAGE(standardPackageName) passing all the options
-# given when calling the command FIND_PACKAGE(customPackageName)
+# given when calling the command FIND_PACKAGE(SalomeXYZ). Those options are stored implicitly in
+# CMake variables: xyz__FIND_QUIETLY, xyz_FIND_REQUIRED, etc ...
+#
# Modus is either MODULE or CONFIG (cf standard FIND_PACKAGE() documentation).
-# This macro is to be called from within the FindCustomPackage.cmake file.
+# The last argument is optional and if set to TRUE will force the search to be OPTIONAL and QUIET.
+#
+# This macro is to be called from within the FindSalomeXXXX.cmake file.
+#
####
MACRO(SALOME_FIND_PACKAGE englobPkg stdPkg mode)
+ SET(_OPT_ARG ${ARGV3})
# Only bother if the package was not already found:
# Some old packages use the lower case version - standard should be to always use
# upper case:
STRING(TOUPPER ${stdPkg} stdPkgUC)
IF(NOT (${stdPkg}_FOUND OR ${stdPkgUC}_FOUND))
- IF(${englobPkg}_FIND_QUIETLY)
+ IF(${englobPkg}_FIND_QUIETLY OR _OPT_ARG)
SET(_tmp_quiet "QUIET")
ELSE()
SET(_tmp_quiet)
ENDIF()
- IF(${englobPkg}_FIND_REQUIRED)
+ IF(${englobPkg}_FIND_REQUIRED AND NOT _OPT_ARG)
SET(_tmp_req "REQUIRED")
ELSE()
SET(_tmp_req)
ELSE()
SET(_tmp_exact)
ENDIF()
- IF(${englobPkg}_FIND_COMPONENTS)
- STRING(REPLACE ";" " " _tmp_compo ${${englobPkg}_FIND_COMPONENTS})
- ELSE()
- SET(_tmp_compo)
- ENDIF()
- # Call the root FIND_PACKAGE():
- #MESSAGE("blo / ${CMAKE_PREFIX_PATH} / ${CMAKE_FIND_ROOT_PATH}")
- IF(_tmp_compo)
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} ${mode} ${_tmp_quiet} ${_tmp_req} COMPONENTS ${_tmp_compo})
+ # Call the CMake FIND_PACKAGE() command:
+ STRING(TOLOWER ${stdPkg} _pkg_lc)
+ IF(("${mode}" STREQUAL "NO_MODULE") OR ("${mode}" STREQUAL "CONFIG"))
+ # Hope to find direclty a CMake config file, indicating the SALOME CMake file
+ # paths (the command already look in places like "share/cmake", etc ... by default)
+
+ # Do we need to call the signature using components?
+ IF(${englobPkg}_FIND_COMPONENTS)
+ FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
+ NO_MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS}
+ PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files")
+ ELSE()
+ FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
+ NO_MODULE ${_tmp_quiet} ${_tmp_req}
+ PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files")
+ ENDIF()
+ MARK_AS_ADVANCED(${stdPkg}_DIR)
+
+ ELSEIF("${mode}" STREQUAL "MODULE")
+
+ # Do we need to call the signature using components?
+ IF(${englobPkg}_FIND_COMPONENTS)
+ FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
+ MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS})
+ ELSE()
+ FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
+ MODULE ${_tmp_quiet} ${_tmp_req})
+ ENDIF()
+
ELSE()
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} ${mode} ${_tmp_quiet} ${_tmp_req})
+
+ MESSAGE(FATAL_ERROR "Invalid mode argument in the call to the macro SALOME_FIND_PACKAGE. Should be CONFIG or MODULE.")
+
ENDIF()
+
ENDIF()
ENDMACRO()
-####################################################################"
-# SALOME_FIND_PACKAGE_DETECT_CONFLICTS(pkg referenceVariable upCount)
+####################################################################
+# SALOME_FIND_PACKAGE_DETECT_CONFLICTS(pkg referenceVariable upCount <component1> <component2> ...)
# pkg : name of the system package to be detected
# referenceVariable: variable containing a path that can be browsed up to
# retrieve the package root directory (xxx_ROOT_DIR)
# upCount : number of times we have to go up from the path <referenceVariable>
-# to obtain the package root directory.
+# to obtain the package root directory.
+# <component_n> : an optional list of components to be found.
#
# For example: SALOME_FIND_PACKAGE_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2)
#
# conflict detection. This is added after the call to the macro by the callee.
#
MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
+ ##
+ ## 0. Initialization
+ ##
+
+ # Package name, upper case
STRING(TOUPPER ${pkg} pkg_UC)
- # 1. Load environment or any previously detected root dir for the package
+ ##
+ ## 1. Load environment or any previously detected root dir for the package
+ ##
IF(DEFINED ENV{${pkg_UC}_ROOT_DIR})
FILE(TO_CMAKE_PATH "$ENV{${pkg_UC}_ROOT_DIR}" _${pkg_UC}_ROOT_DIR_ENV)
SET(_dflt_value "${_${pkg_UC}_ROOT_DIR_ENV}")
ELSE()
- # will be blank if no package was previously loaded
+ # will be blank if no package was previously loaded:
SET(_dflt_value "${${pkg_UC}_ROOT_DIR_EXP}")
ENDIF()
+ # Detect if the variable has been set on the command line or elsewhere:
+ IF(DEFINED ${pkg_UC}_ROOT_DIR)
+ SET(_var_already_there TRUE)
+ ELSE()
+ SET(_var_already_there FALSE)
+ ENDIF()
# Make cache entry
SET(${pkg_UC}_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory")
- # 2. Find package - config mode first (i.e. looking for XYZ-config.cmake)
- IF(EXISTS "${${pkg_UC}_ROOT_DIR}")
- # Hope to find direclty a CMake config file there
- SET(_CONF_DIR "${${pkg_UC}_ROOT_DIR}/share/cmake")
-
- # Try find_package in config mode with a hard-coded guess. This
- # has the priority.
- STRING(TOLOWER ${pkg} _pkg_lc)
- FIND_PACKAGE(${pkg} NO_MODULE QUIET PATHS "${_CONF_DIR}" "${_CONF_DIR}/${pkg}"
- "${_CONF_DIR}/${_pkg_lc}")
- MARK_AS_ADVANCED(${pkg}_DIR)
-
- IF (NOT (${pkg_UC}_FOUND OR ${pkg}_FOUND))
- # Override the variable - don't append to it, as it would give precedence
- # to what was stored there before!
- SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
- #MESSAGE("pkg ${pkg} / ${CMAKE_PREFIX_PATH}")
- ELSE()
- MESSAGE(STATUS "Found ${pkg} in CONFIG mode!")
- ENDIF()
+ ##
+ ## 2. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)
+ ##
+
+ # Override the variable - don't append to it, as it would give precedence
+ # to what was stored there before!
+ SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
+
+ # Try find_package in config mode. This has the priority, but is
+ # performed QUIET and not REQUIRED:
+ SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} NO_MODULE TRUE)
+
+ IF (${pkg_UC}_FOUND OR ${pkg}_FOUND)
+ MESSAGE(STATUS "Found ${pkg} in CONFIG mode!")
ENDIF()
# Otherwise try the standard way (module mode, with the standard CMake Find*** macro):
SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} MODULE)
- #MESSAGE("dbg ${pkg_UC} / ${PTHREAD_FOUND} / ${${pkg_UC}_FOUND}")
+
# Set the "FOUND" variable for the SALOME wrapper:
IF(${pkg_UC}_FOUND OR ${pkg}_FOUND)
SET(SALOME${pkg_UC}_FOUND TRUE)
ENDIF()
IF (${pkg_UC}_FOUND OR ${pkg}_FOUND)
- # 3. Set the root dir which was finally retained by going up "upDir" times
- # from the given reference path. The variable "referenceVariable" may be a list
- # - we take its first element.
- # Note the double de-reference of "referenceVariable":
- LIST(LENGTH "${${referenceVariable}}" _tmp_len)
+ ## 3. Set the root dir which was finally retained by going up "upDir" times
+ ## from the given reference path. The variable "referenceVariable" may be a list.
+ ## In this case we take its first element.
+ LIST(LENGTH ${referenceVariable} _tmp_len)
IF(_tmp_len)
- LIST(GET "${${referenceVariable}}" 0 _tmp_ROOT_DIR)
+ LIST(GET ${referenceVariable} 0 _tmp_ROOT_DIR)
ELSE()
+ # Note the double de-reference of "referenceVariable":
SET(_tmp_ROOT_DIR "${${referenceVariable}}")
ENDIF()
IF(${upCount})
ENDFOREACH()
ENDIF()
- # 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
+ ##
+ ## 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
+ ##
IF(DEFINED ENV{${pkg_UC}_ROOT_DIR})
SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${_${pkg_UC}_ROOT_DIR_ENV}")
IF(NOT _res)
MESSAGE(STATUS "${pkg} found directory matches what was specified in the ${pkg_UC}_ROOT_DIR variable, all good!")
ENDIF()
ELSE()
- MESSAGE(STATUS "Environment variable ${pkg_UC}_ROOT_DIR is not defined. The system installation was found.")
+ IF(NOT _var_already_there)
+ MESSAGE(STATUS "Variable ${pkg_UC}_ROOT_DIR was not explicitly defined. "
+ "An installation was found anyway: ${_tmp_ROOT_DIR}")
+ ENDIF()
ENDIF()
- # 5. Conflict detection
- # 5.1 From another prerequisite using the package
+ ##
+ ## 5. Conflict detection
+ ## From another prerequisite using the package:
+ ##
IF(${pkg_UC}_ROOT_DIR_EXP)
SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${${pkg_UC}_ROOT_DIR_EXP}")
IF(NOT _res)
MESSAGE(WARNING "Warning: ${pkg}: detected version conflicts with a previously found ${pkg}!"
- "The two paths are " ${_tmp_ROOT_DIR} " vs " ${${pkg_UC}_ROOT_DIR_EXP})
+ " The two paths are " ${_tmp_ROOT_DIR} " vs " ${${pkg_UC}_ROOT_DIR_EXP})
ELSE()
MESSAGE(STATUS "${pkg} directory matches what was previously exposed by another prereq, all good!")
ENDIF()
ENDIF()
- # 6. Save the found installation
- #
+ ##
+ ## 6. Save the detected installation
+ ##
SET(${pkg_UC}_ROOT_DIR "${_tmp_ROOT_DIR}")
ELSE()
)
ADD_LIBRARY(SALOMEBasics ${SALOMEBasics_SOURCES})
-INSTALL(TARGETS SALOMEBasics EXPORT ${PROJECT_NAME}Targets DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SALOMEBasics EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
TARGET_LINK_LIBRARIES(SALOMEBasics ${PLATFORM_LIBS})
ADD_LIBRARY(SalomeCommunication ${SalomeCommunication_SOURCES})
TARGET_LINK_LIBRARIES(SalomeCommunication ${COMMON_LIBS})
-INSTALL(TARGETS SalomeCommunication DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeCommunication EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(COMMON_HEADERS_HXX
MatrixClient.hxx
ADD_LIBRARY(SalomeContainer ${SalomeContainer_SOURCES})
TARGET_LINK_LIBRARIES(SalomeContainer ${COMMON_LIBS} ${PTHREAD_LIBRARIES})
-INSTALL(TARGETS SalomeContainer DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(SALOME_Container_LIBS
SalomeContainer
)
ADD_LIBRARY(DF ${DF_SOURCES})
-INSTALL(TARGETS DF DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS DF EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(testDF testDF.cxx)
TARGET_LINK_LIBRARIES(testDF DF)
ADD_LIBRARY(SalomeDSCContainer ${SalomeDSCContainer_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDSCContainer SalomeContainer ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS SalomeDSCContainer DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeDSCContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(SALOME_ConnectionManagerServer_SOURCES
SALOME_ConnectionManagerServer.cxx
ADD_EXECUTABLE(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_SOURCES})
TARGET_LINK_LIBRARIES(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_LIBS})
-INSTALL(TARGETS SALOME_ConnectionManagerServer DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS SALOME_ConnectionManagerServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
ADD_LIBRARY(SalomeDSCSupervBasic ${SalomeDSCSupervBasic_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDSCSupervBasic SalomeDSCSuperv)
-INSTALL(TARGETS SalomeDSCSupervBasic DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeDSCSupervBasic EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_LIBRARY(SalomeDSCSuperv ${SalomeDSCSuperv_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDSCSuperv SalomeDSCContainer ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeDSCSuperv DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeDSCSuperv EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(test_DSC_Exception test_DSC_Exception.cxx)
TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace
ADD_LIBRARY(SalomeDatastream fake.cc)
TARGET_LINK_LIBRARIES(SalomeDatastream ${COMMON_LIBS})
-INSTALL(TARGETS SalomeDatastream DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeDatastream EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(COMMON_HEADERS_HXX
AdjacentFunctor.hxx
ADD_LIBRARY(SalomeCalcium ${SalomeCalcium_SOURCES})
TARGET_LINK_LIBRARIES(SalomeCalcium SalomeDSCSuperv SalomeContainer ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeCalcium DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeCalcium EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(CalciumC_SOURCES
CalciumC.c
ADD_LIBRARY(CalciumC ${CalciumC_SOURCES})
TARGET_LINK_LIBRARIES(CalciumC SalomeDSCSuperv SalomeCalcium)
-INSTALL(TARGETS CalciumC DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS CalciumC EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(test_DataIdContainer_Calcium test_DataIdContainer.cxx)
TARGET_LINK_LIBRARIES(test_DataIdContainer_Calcium SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
ADD_LIBRARY(SalomePalm palm_port_factory.cxx)
TARGET_LINK_LIBRARIES(SalomePalm SalomeDSCSuperv ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS SalomePalm DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomePalm EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(test_DataIdContainer_Palm test_DataIdContainer.cxx)
ADD_DEPENDENCIES(test_DataIdContainer_Palm SalomeIDLKernel)
ADD_LIBRARY(SalomeParallelDSCContainer ${SalomeParallelDSCContainer_SOURCES})
SET_TARGET_PROPERTIES(SalomeParallelDSCContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-INSTALL(TARGETS SalomeParallelDSCContainer DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeParallelDSCContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
ADD_LIBRARY(SalomeGenericObj SALOME_GenericObj_i.cc)
TARGET_LINK_LIBRARIES(SalomeGenericObj SALOMELocalTrace SalomeIDLKernel)
-INSTALL(TARGETS SalomeGenericObj DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeGenericObj EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
INSTALL(FILES SALOME_GenericObj_i.hh SALOME_GenericObj_wrap.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_LIBRARY(SalomeHDFPersist ${SalomeHDFPersist_SOURCES})
TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeHDFPersist DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeHDFPersist EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
ADD_LIBRARY(SalomeKernelHelpers ${SalomeKernelHelpers_SOURCES})
TARGET_LINK_LIBRARIES(SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
-INSTALL(TARGETS SalomeKernelHelpers DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeKernelHelpers EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(KernelHelpersUseCases KernelHelpersUseCases.cxx)
TARGET_LINK_LIBRARIES(KernelHelpersUseCases SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
ADD_LIBRARY(Launcher ${Launcher_SOURCES})
TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBRARIES} ${MPI_CXX_LIBRARIES} ${LIBXML2_LIBS})
-INSTALL(TARGETS Launcher DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS Launcher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(TestLauncher_LIBS
${LIBXML2_LIBRARIES}
IF(NOT SALOME_LAUNCHER_ONLY)
ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx)
TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
- INSTALL(TARGETS SalomeLauncher DESTINATION ${SALOME_INSTALL_LIBS})
+ INSTALL(TARGETS SalomeLauncher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(SALOME_LauncherServer_LIBS
Launcher
ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
- INSTALL(TARGETS SALOME_LauncherServer DESTINATION ${SALOME_INSTALL_BINS})
+ INSTALL(TARGETS SALOME_LauncherServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
ENDIF()
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
ADD_LIBRARY(SalomeLifeCycleCORBA SALOME_LifeCycleCORBA.cxx SALOME_FileTransferCORBA.cxx)
TARGET_LINK_LIBRARIES(SalomeLifeCycleCORBA ${COMMON_LIBS})
-INSTALL(TARGETS SalomeLifeCycleCORBA DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeLifeCycleCORBA EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(Test_LifeCycleCORBA Test_LifeCycleCORBA.cxx)
TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
ADD_LIBRARY(SalomeLoggerServer SALOME_Trace.cxx SALOME_Logger_Server.cxx)
TARGET_LINK_LIBRARIES(SalomeLoggerServer SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeLoggerServer DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeLoggerServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(SALOME_Logger_Server_SOURCES
SALOME_Logger_Server_main.cxx
ADD_EXECUTABLE(SALOME_Logger_Server ${SALOME_Logger_Server_SOURCES})
TARGET_LINK_LIBRARIES(SALOME_Logger_Server ${SALOME_Logger_Server_LIBS})
-INSTALL(TARGETS SALOME_Logger_Server DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS SALOME_Logger_Server EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
# Executable scripts to be installed
SALOME_INSTALL_SCRIPTS(SALOME_Trace.py ${SALOME_INSTALL_SCRIPT_PYTHON})
ADD_LIBRARY(SalomeMPIContainer MPIObject_i.cxx MPIContainer_i.cxx)
TARGET_LINK_LIBRARIES(SalomeMPIContainer ${COMMON_LIBS})
-INSTALL(TARGETS SalomeMPIContainer DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeMPIContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(SALOME_MPIContainer SALOME_MPIContainer.cxx)
TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES})
ADD_EXECUTABLE(testMPI2 testMPI2.cxx)
TARGET_LINK_LIBRARIES(testMPI2 ${MPI_CXX_LIBRARIES})
-INSTALL(TARGETS SALOME_MPIContainer testMPI2 DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS SALOME_MPIContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS testMPI2 DESTINATION ${SALOME_INSTALL_BINS})
INSTALL(FILES launch_testMPI2.csh DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS})
ADD_LIBRARY(SalomeCatalog ${SalomeCatalog_SOURCES})
TARGET_LINK_LIBRARIES(SalomeCatalog ${COMMON_LIBS})
-INSTALL(TARGETS SalomeCatalog DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeCatalog EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Server.cxx)
TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
ADD_EXECUTABLE(SALOME_ModuleCatalog_Client SALOME_ModuleCatalog_Client.cxx)
TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client
+ EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_INSTALL_BINS})
# Executable scripts to be installed
SALOME_INSTALL_SCRIPTS(TestModuleCatalog.py ${SALOME_INSTALL_SCRIPT_PYTHON})
ADD_DEPENDENCIES(SalomeNS SalomeIDLKernel)
TARGET_LINK_LIBRARIES(SalomeNS OpUtil)
-INSTALL(TARGETS SalomeNS DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeNS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
# Executable scripts to be installed
SALOME_INSTALL_SCRIPTS(SALOME_NamingServicePy.py ${SALOME_INSTALL_SCRIPT_PYTHON})
ADD_LIBRARY(SalomeNotification ${SalomeNotification_SOURCES})
TARGET_LINK_LIBRARIES(SalomeNotification ${COMMON_LIBS})
-INSTALL(TARGETS SalomeNotification DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeNotification EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
SET(COMMON_HEADERS ${COMMON_HEADERS_HXX} CosNotifyShorthands.h)
ADD_LIBRARY(SalomeParallelContainer ${SalomeParallelContainer_SOURCES})
TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
-INSTALL(TARGETS Registry DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS Registry EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
IF(SALOME_USE_MPI)
SET(SALOME_ParallelContainerProxyMpi_LIBS
ADD_EXECUTABLE(SALOME_ParallelContainerNodeMpi SALOME_ParallelContainerNodeMpi.cxx)
TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
- INSTALL(TARGETS SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerNodeMpi DESTINATION ${SALOME_INSTALL_BINS})
+ INSTALL(TARGETS SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerNodeMpi
+ EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_INSTALL_BINS})
ENDIF(SALOME_USE_MPI)
SET(SALOME_ParallelContainerProxyDummy_LIBS
ADD_LIBRARY(Registry RegistryConnexion.cxx RegistryService.cxx)
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
TARGET_LINK_LIBRARIES(Registry SalomeNS OpUtil SALOMELocalTrace SalomeIDLKernel ${PLATFORM_LIBS})
-INSTALL(TARGETS Registry DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS Registry EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(SALOME_Registry_Server_LIBS
SalomeIDLKernel
ADD_EXECUTABLE(SALOME_Registry_Server SALOME_Registry_Server.cxx)
TARGET_LINK_LIBRARIES(SALOME_Registry_Server ${SALOME_Registry_Server_LIBS})
-INSTALL(TARGETS SALOME_Registry_Server DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS SALOME_Registry_Server EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_LIBRARY(ResourcesManager ${ResourcesManager_SOURCES})
TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics OpUtil ${LIBXML2_LIBRARIES})
-INSTALL(TARGETS ResourcesManager DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS ResourcesManager EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_INSTALL_LIBS})
IF(NOT SALOME_LAUNCHER_ONLY)
ADD_LIBRARY(SalomeResourcesManager SALOME_ResourcesManager.cxx)
TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS})
- INSTALL(TARGETS SalomeResourcesManager DESTINATION ${SALOME_INSTALL_LIBS})
+ INSTALL(TARGETS SalomeResourcesManager EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_INSTALL_LIBS})
ENDIF()
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
ADD_LIBRARY(SalomeDS ${SalomeDS_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDS ${COMMON_LIBS})
-INSTALL(TARGETS SalomeDS DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(SALOMEDS_Server SALOMEDS_Server.cxx)
TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
ADD_EXECUTABLE(SALOMEDS_Client SALOMEDS_Client.cxx)
TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS SALOMEDS_Server SALOMEDS_Client DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS SALOMEDS_Server SALOMEDS_Client
+ EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_INSTALL_BINS})
# Executable scripts to be installed
SALOME_INSTALL_SCRIPTS(SALOME_DriverPy.py ${SALOME_INSTALL_SCRIPT_PYTHON})
ADD_LIBRARY(SalomeDSClient SALOMEDSClient_ClientFactory.cxx)
TARGET_LINK_LIBRARIES(SalomeDSClient SalomeIDLKernel)
-INSTALL(TARGETS SalomeDSClient DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeDSClient EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_LIBRARY(SalomeDSImpl ${SalomeDSImpl_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeDSImpl DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeDSImpl EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(testDS testDS.cxx)
TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${PLATFORM_LIBS})
ADD_LIBRARY(SALOMELocalTrace ${SALOMELocalTrace_SOURCES})
TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBRARIES})
-INSTALL(TARGETS SALOMELocalTrace DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SALOMELocalTrace EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_LIBRARY(with_loggerTraceCollector SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PTHREAD_LIBRARIES})
-INSTALL(TARGETS with_loggerTraceCollector DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS with_loggerTraceCollector EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_LIBRARY(TOOLSDS SALOMEDS_Tool.cxx)
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS TOOLSDS DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS TOOLSDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_LIBRARY(SalomeTestComponentEngine ${SalomeTestComponentEngine_SOURCES})
TARGET_LINK_LIBRARIES(SalomeTestComponentEngine ${COMMON_LIBS})
-INSTALL(TARGETS SalomeTestComponentEngine DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeTestComponentEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(TestLogger TestLogger.cxx)
TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
ADD_EXECUTABLE(TestContainer TestContainer.cxx)
TARGET_LINK_LIBRARIES(TestContainer SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS TestLogger TestContainer DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestLogger TestContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
# Executable scripts to be installed
SET(SCRIPTS
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
ADD_LIBRARY(OpUtil ${OpUtil_SOURCES})
TARGET_LINK_LIBRARIES(OpUtil SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PTHREAD_LIBRARIES})
-INSTALL(TARGETS OpUtil DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS OpUtil EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(COMMON_SCRIPTS
Utils_Identity.py