]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CMake: updated CMake procedure mainly to correctly expose targets needed by GUI.
authorbruneton <bruneton>
Tue, 2 Jul 2013 08:25:21 +0000 (08:25 +0000)
committerbruneton <bruneton>
Tue, 2 Jul 2013 08:25:21 +0000 (08:25 +0000)
43 files changed:
CMakeLists.txt
idl/CMakeLists.txt
salome_adm/cmake_files/CMakeLists.txt
salome_adm/cmake_files/FindCppUnit.cmake
salome_adm/cmake_files/FindKERNEL.cmake [deleted file]
salome_adm/cmake_files/FindOmniORB.cmake
salome_adm/cmake_files/FindSalomeBoost.cmake
salome_adm/cmake_files/FindSalomeHDF5.cmake
salome_adm/cmake_files/FindSalomeMPI.cmake
salome_adm/cmake_files/SalomeKERNELConfig.cmake.in
salome_adm/cmake_files/SalomeMacros.cmake
src/Basics/CMakeLists.txt
src/Communication/CMakeLists.txt
src/Container/CMakeLists.txt
src/DF/CMakeLists.txt
src/DSC/DSC_Basic/CMakeLists.txt
src/DSC/DSC_User/Basic/CMakeLists.txt
src/DSC/DSC_User/CMakeLists.txt
src/DSC/DSC_User/Datastream/CMakeLists.txt
src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt
src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt
src/DSC/ParallelDSC/CMakeLists.txt
src/GenericObj/CMakeLists.txt
src/HDFPersist/CMakeLists.txt
src/KernelHelpers/CMakeLists.txt
src/Launcher/CMakeLists.txt
src/LifeCycleCORBA/CMakeLists.txt
src/Logger/CMakeLists.txt
src/MPIContainer/CMakeLists.txt
src/ModuleCatalog/CMakeLists.txt
src/NamingService/CMakeLists.txt
src/Notification/CMakeLists.txt
src/ParallelContainer/CMakeLists.txt
src/Registry/CMakeLists.txt
src/ResourcesManager/CMakeLists.txt
src/SALOMEDS/CMakeLists.txt
src/SALOMEDSClient/CMakeLists.txt
src/SALOMEDSImpl/CMakeLists.txt
src/SALOMELocalTrace/CMakeLists.txt
src/SALOMETraceCollector/CMakeLists.txt
src/TOOLSDS/CMakeLists.txt
src/TestContainer/CMakeLists.txt
src/Utils/CMakeLists.txt

index a5d044ebbcc590603f9a7623cff1b01c5da5c003..364711db3d3737d12a385a071720714f2ea9177f 100755 (executable)
@@ -72,27 +72,18 @@ MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_PACO_PARALLEL SALO
 #   -> 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
 # ======================
@@ -102,8 +93,6 @@ IF(NOT SALOME_LIGHT_ONLY)
 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()
@@ -135,19 +124,23 @@ SET(SALOME_INSTALL_APPLISKEL_SCRIPTS ${SALOME_INSTALL_BINS}/appliskel CACHE PATH
 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 
@@ -165,6 +158,8 @@ ENDIF()
 
 # 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}")
@@ -175,8 +170,27 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h DESTINATION ${SALOME_
 # ====================
 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:
@@ -225,4 +239,5 @@ INSTALL(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)
index 7090a3bbece60953f173151f8d3052081fdca078..db4a3474f6c746d5203c158ffc5f5b37c7a33156 100755 (executable)
@@ -77,7 +77,7 @@ OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUD
 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
@@ -91,5 +91,5 @@ IF(SALOME_PACO_PARALLEL)
   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()
index caee7f68eaf530fcb75a1b398e18b4c23eb5c1a1..9474cb86c4150cd95b99a04ac287e60d728fd221 100755 (executable)
@@ -27,7 +27,7 @@ ADD_SUBDIRECTORY(deprecated)
 SET(DATA
   FindCppUnit.cmake
   FindGraphviz.cmake
-  FindKERNEL.cmake
+  FindSalomeKERNEL.cmake
   FindOmniORB.cmake
   FindPThread.cmake
   FindSalomeBoost.cmake
index f5d39a0c794ebc2ee90713aed9b3b515ef5eb27f..4460b9d0d42595c7cba918507c33cef55be7c568 100644 (file)
@@ -1,6 +1,6 @@
 # - 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
 #
diff --git a/salome_adm/cmake_files/FindKERNEL.cmake b/salome_adm/cmake_files/FindKERNEL.cmake
deleted file mode 100644 (file)
index 103d1f8..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-# 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)
index e43909d2ee819877013cd497785675cdc2f88c86..3534dfbdfdde2b7accf7f7425fcf1efeab3b0087 100644 (file)
@@ -40,7 +40,7 @@
 
 # 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:
index c890566ea63c3d90c103afc60771584f99efbc49..c20a0e5056b8585ca3238d5ea86e3384db020d9a 100644 (file)
@@ -32,3 +32,8 @@ IF(Boost_FOUND OR BOOST_FOUND)
    MESSAGE(STATUS "Boost include dirs is: ${Boost_INCLUDE_DIRS}")
 ENDIF()   
 #MARK_AS_ADVANCED()
+
+## Specific definitions:
+IF(WIN32)
+  SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS)
+ENDIF()
index 00e7301fd2d75486ef60e7781c61c5c03e15ff14..b00b1b4216a4378ad49228bd934694d13445777a 100644 (file)
 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
@@ -54,3 +57,13 @@ IF(HDF5_ENABLE_PARALLEL OR HDF5_IS_PARALLEL)
   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()
index 43824c99fb1e740516a6b0c36441bf0be8986021..2d0df7a84c370e1dff8618ad826f00b250e3fee1 100644 (file)
@@ -26,3 +26,6 @@
 
 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})
index b9de34346a7a7ec4cc2ecbf824cc2ba92382a55c..2c40c1ef49e6bb4d47a3d81562d3df485346efc6 100644 (file)
@@ -4,11 +4,10 @@
 #  @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:
@@ -54,6 +56,7 @@ 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@)
+SET(SALOME_USE_LIBBATCH  @SALOME_USE_LIBBATCH@)
 
 # Prerequisites:
 IF(SALOME_BUILD_TESTS)
@@ -72,6 +75,8 @@ IF(NOT SALOME_LIGHT_ONLY)
 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@")
@@ -82,15 +87,61 @@ 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@")
+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)
+
+
index 65e2d614aeb735f41494ff0c3bcb18ba43ba84b5..7d55b71c604de8234efaf4c94ee9c61d2f4779ad 100755 (executable)
@@ -197,24 +197,33 @@ ENDMACRO()
 
 
 ####
-# 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)
@@ -224,30 +233,54 @@ MACRO(SALOME_FIND_PACKAGE englobPkg stdPkg mode)
     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) 
 #
@@ -270,45 +303,52 @@ ENDMACRO()
 # 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)
@@ -317,14 +357,14 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
   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})
@@ -334,7 +374,9 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable 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)
@@ -346,23 +388,29 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
         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()
index 1516dd4a688e9df10db555755e097b27f5d06082..becf90fa788cf01b7a22d75b79eb125196140f07 100755 (executable)
@@ -28,7 +28,7 @@ SET(SALOMEBasics_SOURCES
 )
 
 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})
 
index 3cf617e7179f3f8413350f5ebffde2bac0fbbf71..212d782a271b4716cbeebf7c5c8e2ac237fd2931 100755 (executable)
@@ -50,7 +50,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS})
 
 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
index b6e1aa077819702b90a6a9ebdd963875eaee7e09..60d2b253c5d20b44760e005513f373ec6654608d 100755 (executable)
@@ -87,7 +87,7 @@ SET(SalomeContainer_SOURCES
 
 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
index 2ddd3a6eb1706fd89f2970aad49044870ec9d686..73760e25a24f08f275d259ec28886aa221436bdf 100755 (executable)
@@ -32,7 +32,7 @@ SET(DF_SOURCES
 )
 
 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)
index ae453c04d95b99e2db87beb9a4914b6a4cd0604d..deeba9a267c7ef2cd94cb12fee1e3b31bebc689f 100755 (executable)
@@ -41,7 +41,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
 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
@@ -58,7 +58,7 @@ SET(SALOME_ConnectionManagerServer_LIBS
 
 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})
index 4c44968b99d0526b0362f3fdea6eabc8ab14e37b..8d5fa512da7763bf250497517dd10dc05773c293 100755 (executable)
@@ -40,7 +40,7 @@ SET(SalomeDSCSupervBasic_SOURCES
 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})
index 6811ab425e710164cbab87f9327539696c31d457..61ac66f8a0644616559bda7ccc77a4dee93d93f2 100755 (executable)
@@ -45,7 +45,7 @@ SET(SalomeDSCSuperv_SOURCES
 
 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 
index 4087321ad07fea1e46d7428ee932ebf2ca543853..b746c05de26dd5faae14347a9aaed9d583e3f290 100755 (executable)
@@ -40,7 +40,7 @@ ADD_DEFINITIONS(${BOOST_DEFINITIONS})
 
 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
index 94c2baa4edeed9534d8d01432bbf25f9f5e014a0..e96127b6f5ed3f87c19e2a6a2d5778960dda7aeb 100755 (executable)
@@ -58,7 +58,7 @@ ADD_DEFINITIONS(${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 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
@@ -68,7 +68,7 @@ SET(CalciumC_SOURCES
 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})
index d5abec22f30b45fe9106f1c2ca9ce32dcaf9ea53..5d27ed9bc6ce157f83490477df5edf6a8a54e9d4 100755 (executable)
@@ -38,7 +38,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 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)
index 1bd293567a0b5e458edb841aa542f253a8bcb4aa..e06433d190ced67cd41aedc72f2243cdc00538e3 100755 (executable)
@@ -48,7 +48,7 @@ SET(SalomeParallelDSCContainer_SOURCES
 
 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})
index ee80444e9c017ce320765afb9f90c0171b61b7c4..9a52b25e1161dc385469574f20fc0ef8bc3cc9aa 100755 (executable)
@@ -29,7 +29,7 @@ INCLUDE_DIRECTORIES(
 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})
 
index 2bb89502576521b00aa3a9d4d8d92eafcef4fdb5..7887af4946d3cf5aed7b17fe321dd647149f2b3e 100755 (executable)
@@ -29,7 +29,7 @@ ADD_DEFINITIONS(${HDF5_DEFINITIONS})
 
 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")
index 20e8550e7a558fdd6dbd2e0667be725bda3df4a6..8a9e40ad34a4b73af4ad2cc2ad9afd93cb619994 100755 (executable)
@@ -55,7 +55,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
 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})
index 55c3399c2d287de95701acd779661f25c357aca4..71437ba545a71f35d060334ef6d0a3630b83b8cd 100755 (executable)
@@ -72,7 +72,7 @@ SET(Launcher_SOURCES
 
 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}
@@ -89,7 +89,7 @@ INSTALL(TARGETS TestLauncher DESTINATION ${SALOME_INSTALL_BINS})
 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
@@ -105,7 +105,7 @@ IF(NOT SALOME_LAUNCHER_ONLY)
 
   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")
index e3c545cb48d0a072b7f12f5f7ae6ec492a4df55e..3870da38f59a32af0ffc1f483c3b173ecdbe29a4 100755 (executable)
@@ -52,7 +52,7 @@ ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
 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})
index d2c9d8c7ffa733fc43781abaffe800cc41c9c35c..b1b60f0017c1c5e4b6cae46fb2de89d31c65188e 100755 (executable)
@@ -28,7 +28,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
 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
@@ -43,7 +43,7 @@ SET(SALOME_Logger_Server_LIBS
 
 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})
index 01ec296b4d58ea07ccf709dfa358b82705e15c85..f69715cc99905e39931261500b6eaca18ef8006c 100755 (executable)
@@ -53,7 +53,7 @@ ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS} ${OMNIORB_DEFINITIONS})
 
 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})
@@ -61,7 +61,8 @@ TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PY
 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})
 
index 187d3a076a1c3d63ca8052387e271037d8853d6a..70f088016c2d9ae00dd739b3438f45879d9bafa9 100755 (executable)
@@ -50,7 +50,7 @@ ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
 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})
@@ -58,7 +58,9 @@ TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} $
 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})
index 9c949bfdd28f8225612850b8187f49f0b4dc0d75..bb692657db69d2335127a95e6f946cab1ee81e6c 100755 (executable)
@@ -39,7 +39,7 @@ ADD_LIBRARY(SalomeNS ${SalomeNS_SOURCES})
 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})
index 165b00feea42601d5c271566eaeb41043fb8bd30..c0b2a711ca1c626104d201c56a4f07bb624e524a 100755 (executable)
@@ -43,7 +43,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
 
 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)
index b411598ab8acef70430e625637ee7acc64c38bb8..10b3d47d66bbfdf49016235e34dac183934876a1 100755 (executable)
@@ -63,7 +63,7 @@ ADD_DEFINITIONS(${ONMIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS} ${PACO_DEFINITIO
 
 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
@@ -80,7 +80,9 @@ IF(SALOME_USE_MPI)
   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
index 3423d916894167c3eafb6cd0189e384617918a9b..1cc93f01e35472974cf2ecf3c9ec1ff822be08c0 100755 (executable)
@@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES(
 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
@@ -46,7 +46,7 @@ SET(SALOME_Registry_Server_LIBS
 
 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})
index 90c542519eb5e455e850696d8deae5371b7c48c3..72a25650b2c048a6940bad517938ca4e6863ce43 100755 (executable)
@@ -50,12 +50,14 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${PLATFORM_DEFINIT
 
 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")
index 43b9c7722c9c9799f87630609d7d70cf7d97a9bb..0fe8dec8d4d604ed04c1b92a06b86cb359fd3744 100755 (executable)
@@ -146,7 +146,7 @@ SET(SalomeDS_SOURCES
 
 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})
@@ -154,7 +154,9 @@ TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMN
 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})
index 08f44c0f45799da388ce1120082b7f780a79bc5c..ed187ffcab071de767fa0c530d2f7a48a6b1cf74 100755 (executable)
@@ -28,7 +28,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
 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})
index 9a22e8c43f6784ea6f5e4ee005a3acf67b20173b..75b6448cd6a097c8a01a33f8e4d160595e093e06 100755 (executable)
@@ -94,7 +94,7 @@ SET(SalomeDSImpl_SOURCES
 
 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})
index b061b3db22d8d8c2d98bf28bdda037fac7a4be67..3da322c7ff8d12af4a42064f06663645478c47f0 100755 (executable)
@@ -43,6 +43,6 @@ SET(SALOMELocalTrace_SOURCES
 
 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})
index 7f83b5dc9bbf82d2be620dcaff5a8adfdfa1a0bd..cb81ac4f1c4c6f2b98b30216efac1b0a732d9e80 100755 (executable)
@@ -30,7 +30,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
 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})
index 3fddefd3ef8459dba4f7b1fc37f0ee696b4c763a..15ace71c5513f9062898562365292a8d745ba478 100755 (executable)
@@ -32,7 +32,7 @@ INCLUDE_DIRECTORIES(
 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})
index da4c08f20484b939678e1a3033a912d5cff540d5..b4f4cb84b41839a9f8f49cf5ed631e65fb93e07b 100755 (executable)
@@ -56,7 +56,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 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})
@@ -64,7 +64,7 @@ TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON
 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
index fa670120bd2e342cd823843e8709be3cdf5e2053..2bebc3a9907a3d67265c72e6840f32280b08c097 100755 (executable)
@@ -41,7 +41,7 @@ SET(OpUtil_SOURCES
 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