From: bruneton Date: Tue, 2 Jul 2013 08:25:21 +0000 (+0000) Subject: CMake: updated CMake procedure mainly to correctly expose targets needed by GUI. X-Git-Tag: B4KillOfAutomake~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ce94ec42b40aac616a7fe605e88b3f318ab1600;p=modules%2Fkernel.git CMake: updated CMake procedure mainly to correctly expose targets needed by GUI. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a5d044ebb..364711db3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 7090a3bbe..db4a3474f 100755 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -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() diff --git a/salome_adm/cmake_files/CMakeLists.txt b/salome_adm/cmake_files/CMakeLists.txt index caee7f68e..9474cb86c 100755 --- a/salome_adm/cmake_files/CMakeLists.txt +++ b/salome_adm/cmake_files/CMakeLists.txt @@ -27,7 +27,7 @@ ADD_SUBDIRECTORY(deprecated) SET(DATA FindCppUnit.cmake FindGraphviz.cmake - FindKERNEL.cmake + FindSalomeKERNEL.cmake FindOmniORB.cmake FindPThread.cmake FindSalomeBoost.cmake diff --git a/salome_adm/cmake_files/FindCppUnit.cmake b/salome_adm/cmake_files/FindCppUnit.cmake index f5d39a0c7..4460b9d0d 100644 --- a/salome_adm/cmake_files/FindCppUnit.cmake +++ b/salome_adm/cmake_files/FindCppUnit.cmake @@ -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 index 103d1f8e9..000000000 --- a/salome_adm/cmake_files/FindKERNEL.cmake +++ /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) diff --git a/salome_adm/cmake_files/FindOmniORB.cmake b/salome_adm/cmake_files/FindOmniORB.cmake index e43909d2e..3534dfbdf 100644 --- a/salome_adm/cmake_files/FindOmniORB.cmake +++ b/salome_adm/cmake_files/FindOmniORB.cmake @@ -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: diff --git a/salome_adm/cmake_files/FindSalomeBoost.cmake b/salome_adm/cmake_files/FindSalomeBoost.cmake index c890566ea..c20a0e505 100644 --- a/salome_adm/cmake_files/FindSalomeBoost.cmake +++ b/salome_adm/cmake_files/FindSalomeBoost.cmake @@ -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() diff --git a/salome_adm/cmake_files/FindSalomeHDF5.cmake b/salome_adm/cmake_files/FindSalomeHDF5.cmake index 00e7301fd..b00b1b421 100644 --- a/salome_adm/cmake_files/FindSalomeHDF5.cmake +++ b/salome_adm/cmake_files/FindSalomeHDF5.cmake @@ -30,7 +30,10 @@ 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() diff --git a/salome_adm/cmake_files/FindSalomeMPI.cmake b/salome_adm/cmake_files/FindSalomeMPI.cmake index 43824c99f..2d0df7a84 100644 --- a/salome_adm/cmake_files/FindSalomeMPI.cmake +++ b/salome_adm/cmake_files/FindSalomeMPI.cmake @@ -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}) diff --git a/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in b/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in index b9de34346..2c40c1ef4 100644 --- a/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in +++ b/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in @@ -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 @@ -40,13 +39,16 @@ # 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) + + diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 65e2d614a..7d55b71c6 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -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 ...) # 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 -# to obtain the package root directory. +# to obtain the package root directory. +# : 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() diff --git a/src/Basics/CMakeLists.txt b/src/Basics/CMakeLists.txt index 1516dd4a6..becf90fa7 100755 --- a/src/Basics/CMakeLists.txt +++ b/src/Basics/CMakeLists.txt @@ -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}) diff --git a/src/Communication/CMakeLists.txt b/src/Communication/CMakeLists.txt index 3cf617e71..212d782a2 100755 --- a/src/Communication/CMakeLists.txt +++ b/src/Communication/CMakeLists.txt @@ -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 diff --git a/src/Container/CMakeLists.txt b/src/Container/CMakeLists.txt index b6e1aa077..60d2b253c 100755 --- a/src/Container/CMakeLists.txt +++ b/src/Container/CMakeLists.txt @@ -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 diff --git a/src/DF/CMakeLists.txt b/src/DF/CMakeLists.txt index 2ddd3a6eb..73760e25a 100755 --- a/src/DF/CMakeLists.txt +++ b/src/DF/CMakeLists.txt @@ -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) diff --git a/src/DSC/DSC_Basic/CMakeLists.txt b/src/DSC/DSC_Basic/CMakeLists.txt index ae453c04d..deeba9a26 100755 --- a/src/DSC/DSC_Basic/CMakeLists.txt +++ b/src/DSC/DSC_Basic/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_User/Basic/CMakeLists.txt b/src/DSC/DSC_User/Basic/CMakeLists.txt index 4c44968b9..8d5fa512d 100755 --- a/src/DSC/DSC_User/Basic/CMakeLists.txt +++ b/src/DSC/DSC_User/Basic/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_User/CMakeLists.txt b/src/DSC/DSC_User/CMakeLists.txt index 6811ab425..61ac66f8a 100755 --- a/src/DSC/DSC_User/CMakeLists.txt +++ b/src/DSC/DSC_User/CMakeLists.txt @@ -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 diff --git a/src/DSC/DSC_User/Datastream/CMakeLists.txt b/src/DSC/DSC_User/Datastream/CMakeLists.txt index 4087321ad..b746c05de 100755 --- a/src/DSC/DSC_User/Datastream/CMakeLists.txt +++ b/src/DSC/DSC_User/Datastream/CMakeLists.txt @@ -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 diff --git a/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt b/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt index 94c2baa4e..e96127b6f 100755 --- a/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt +++ b/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt b/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt index d5abec22f..5d27ed9bc 100755 --- a/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt +++ b/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt @@ -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) diff --git a/src/DSC/ParallelDSC/CMakeLists.txt b/src/DSC/ParallelDSC/CMakeLists.txt index 1bd293567..e06433d19 100755 --- a/src/DSC/ParallelDSC/CMakeLists.txt +++ b/src/DSC/ParallelDSC/CMakeLists.txt @@ -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}) diff --git a/src/GenericObj/CMakeLists.txt b/src/GenericObj/CMakeLists.txt index ee80444e9..9a52b25e1 100755 --- a/src/GenericObj/CMakeLists.txt +++ b/src/GenericObj/CMakeLists.txt @@ -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}) diff --git a/src/HDFPersist/CMakeLists.txt b/src/HDFPersist/CMakeLists.txt index 2bb895025..7887af494 100755 --- a/src/HDFPersist/CMakeLists.txt +++ b/src/HDFPersist/CMakeLists.txt @@ -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") diff --git a/src/KernelHelpers/CMakeLists.txt b/src/KernelHelpers/CMakeLists.txt index 20e8550e7..8a9e40ad3 100755 --- a/src/KernelHelpers/CMakeLists.txt +++ b/src/KernelHelpers/CMakeLists.txt @@ -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}) diff --git a/src/Launcher/CMakeLists.txt b/src/Launcher/CMakeLists.txt index 55c3399c2..71437ba54 100755 --- a/src/Launcher/CMakeLists.txt +++ b/src/Launcher/CMakeLists.txt @@ -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") diff --git a/src/LifeCycleCORBA/CMakeLists.txt b/src/LifeCycleCORBA/CMakeLists.txt index e3c545cb4..3870da38f 100755 --- a/src/LifeCycleCORBA/CMakeLists.txt +++ b/src/LifeCycleCORBA/CMakeLists.txt @@ -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}) diff --git a/src/Logger/CMakeLists.txt b/src/Logger/CMakeLists.txt index d2c9d8c7f..b1b60f001 100755 --- a/src/Logger/CMakeLists.txt +++ b/src/Logger/CMakeLists.txt @@ -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}) diff --git a/src/MPIContainer/CMakeLists.txt b/src/MPIContainer/CMakeLists.txt index 01ec296b4..f69715cc9 100755 --- a/src/MPIContainer/CMakeLists.txt +++ b/src/MPIContainer/CMakeLists.txt @@ -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}) diff --git a/src/ModuleCatalog/CMakeLists.txt b/src/ModuleCatalog/CMakeLists.txt index 187d3a076..70f088016 100755 --- a/src/ModuleCatalog/CMakeLists.txt +++ b/src/ModuleCatalog/CMakeLists.txt @@ -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}) diff --git a/src/NamingService/CMakeLists.txt b/src/NamingService/CMakeLists.txt index 9c949bfdd..bb692657d 100755 --- a/src/NamingService/CMakeLists.txt +++ b/src/NamingService/CMakeLists.txt @@ -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}) diff --git a/src/Notification/CMakeLists.txt b/src/Notification/CMakeLists.txt index 165b00fee..c0b2a711c 100755 --- a/src/Notification/CMakeLists.txt +++ b/src/Notification/CMakeLists.txt @@ -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) diff --git a/src/ParallelContainer/CMakeLists.txt b/src/ParallelContainer/CMakeLists.txt index b411598ab..10b3d47d6 100755 --- a/src/ParallelContainer/CMakeLists.txt +++ b/src/ParallelContainer/CMakeLists.txt @@ -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 diff --git a/src/Registry/CMakeLists.txt b/src/Registry/CMakeLists.txt index 3423d9168..1cc93f01e 100755 --- a/src/Registry/CMakeLists.txt +++ b/src/Registry/CMakeLists.txt @@ -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}) diff --git a/src/ResourcesManager/CMakeLists.txt b/src/ResourcesManager/CMakeLists.txt index 90c542519..72a25650b 100755 --- a/src/ResourcesManager/CMakeLists.txt +++ b/src/ResourcesManager/CMakeLists.txt @@ -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") diff --git a/src/SALOMEDS/CMakeLists.txt b/src/SALOMEDS/CMakeLists.txt index 43b9c7722..0fe8dec8d 100755 --- a/src/SALOMEDS/CMakeLists.txt +++ b/src/SALOMEDS/CMakeLists.txt @@ -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}) diff --git a/src/SALOMEDSClient/CMakeLists.txt b/src/SALOMEDSClient/CMakeLists.txt index 08f44c0f4..ed187ffca 100755 --- a/src/SALOMEDSClient/CMakeLists.txt +++ b/src/SALOMEDSClient/CMakeLists.txt @@ -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}) diff --git a/src/SALOMEDSImpl/CMakeLists.txt b/src/SALOMEDSImpl/CMakeLists.txt index 9a22e8c43..75b6448cd 100755 --- a/src/SALOMEDSImpl/CMakeLists.txt +++ b/src/SALOMEDSImpl/CMakeLists.txt @@ -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}) diff --git a/src/SALOMELocalTrace/CMakeLists.txt b/src/SALOMELocalTrace/CMakeLists.txt index b061b3db2..3da322c7f 100755 --- a/src/SALOMELocalTrace/CMakeLists.txt +++ b/src/SALOMELocalTrace/CMakeLists.txt @@ -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}) diff --git a/src/SALOMETraceCollector/CMakeLists.txt b/src/SALOMETraceCollector/CMakeLists.txt index 7f83b5dc9..cb81ac4f1 100755 --- a/src/SALOMETraceCollector/CMakeLists.txt +++ b/src/SALOMETraceCollector/CMakeLists.txt @@ -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}) diff --git a/src/TOOLSDS/CMakeLists.txt b/src/TOOLSDS/CMakeLists.txt index 3fddefd3e..15ace71c5 100755 --- a/src/TOOLSDS/CMakeLists.txt +++ b/src/TOOLSDS/CMakeLists.txt @@ -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}) diff --git a/src/TestContainer/CMakeLists.txt b/src/TestContainer/CMakeLists.txt index da4c08f20..b4f4cb84b 100755 --- a/src/TestContainer/CMakeLists.txt +++ b/src/TestContainer/CMakeLists.txt @@ -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 diff --git a/src/Utils/CMakeLists.txt b/src/Utils/CMakeLists.txt index fa670120b..2bebc3a99 100755 --- a/src/Utils/CMakeLists.txt +++ b/src/Utils/CMakeLists.txt @@ -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