]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
New CMake build procedure.
authorbruneton <bruneton>
Tue, 18 Jun 2013 07:42:22 +0000 (07:42 +0000)
committerbruneton <bruneton>
Tue, 18 Jun 2013 07:42:22 +0000 (07:42 +0000)
** Here are the Git messages leading to this commit:
Renamed two flags to: SALOME_BUILD_TESTS and SALOME_BUILD_DOC
Versioning in root CMakeLists.txt
New prerequisite detection for: PThread, Python, HDF5, MPI and SWIG.
New prerequisite system for Sphinx, Doxygen, Graphviz, Boost.
Rewrote OmniORB find logic. The override of CMAKE_PREFIX_PATH should cover most cases.
Rewrote LibBatch detection procedure.
Renaming function in  to avoid name conflict with HDF5.
Fixed path detection for Graphiz and Doxygen. Added PTHREAD_LIBRARY where needed.
Removed SWIG warning: specifying lang in typemap is deprecated.
Rewrote FindCppUnit. Renamed flags.
Option WITHONLYLAUNCHER renamed to SALOME_LAUNCHER_ONLY. Not tested.

88 files changed:
CMakeLists.txt
bin/CMakeLists.txt
bin/appliskel/CMakeLists.txt
idl/CMakeLists.txt
resources/CMakeLists.txt
salome_adm/CMakeLists.txt
salome_adm/cmake_files/CMakeLists.txt
salome_adm/cmake_files/FindCppUnit.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindGraphviz.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindOmniORB.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindPThread.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeBoost.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeCppUnit.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeDoxygen.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeGraphviz.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeHDF5.cmake
salome_adm/cmake_files/FindSalomeLibBatch.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeLibXml2.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeMPI.cmake
salome_adm/cmake_files/FindSalomeOmniORB.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomePThread.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomePython.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSalomeSWIG.cmake
salome_adm/cmake_files/FindSalomeSphinx.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindSphinx.cmake [new file with mode: 0644]
salome_adm/cmake_files/SalomeKERNELConfig.cmake.in [new file with mode: 0644]
salome_adm/cmake_files/SalomeMacros.cmake
salome_adm/cmake_files/SalomeSetupPlatform.cmake [new file with mode: 0644]
salome_adm/cmake_files/UseOmniORB.cmake [new file with mode: 0644]
salome_adm/cmake_files/deprecated/CMakeLists.txt
src/Basics/CMakeLists.txt
src/Basics/Test/CMakeLists.txt
src/CMakeLists.txt
src/Communication/CMakeLists.txt
src/Communication_SWIG/CMakeLists.txt
src/Communication_SWIG/libSALOME_Comm.i
src/Container/CMakeLists.txt
src/DF/CMakeLists.txt
src/DSC/CMakeLists.txt
src/DSC/DSC_Basic/CMakeLists.txt
src/DSC/DSC_Python/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/Calcium/calciumf.c
src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt
src/DSC/ParallelDSC/CMakeLists.txt
src/GenericObj/CMakeLists.txt
src/HDFPersist/CMakeLists.txt
src/KERNEL_PY/CMakeLists.txt
src/KERNEL_PY/kernel/CMakeLists.txt
src/KERNEL_PY/kernel/parametric/CMakeLists.txt
src/KernelHelpers/CMakeLists.txt
src/KernelHelpers/Test/CMakeLists.txt
src/Launcher/CMakeLists.txt
src/LifeCycleCORBA/CMakeLists.txt
src/LifeCycleCORBA/Test/CMakeLists.txt
src/LifeCycleCORBA_SWIG/CMakeLists.txt
src/LifeCycleCORBA_SWIG/Test/CMakeLists.txt
src/Logger/CMakeLists.txt
src/Logger/Test/CMakeLists.txt
src/MPIContainer/CMakeLists.txt
src/ModuleCatalog/CMakeLists.txt
src/ModuleGenerator/CMakeLists.txt
src/NOTIFICATION_SWIG/CMakeLists.txt
src/NamingService/CMakeLists.txt
src/NamingService/Test/CMakeLists.txt
src/Notification/CMakeLists.txt
src/ParallelContainer/CMakeLists.txt
src/Registry/CMakeLists.txt
src/ResourcesManager/CMakeLists.txt
src/SALOMEDS/CMakeLists.txt
src/SALOMEDS/Test/CMakeLists.txt
src/SALOMEDSClient/CMakeLists.txt
src/SALOMEDSImpl/CMakeLists.txt
src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx
src/SALOMEDSImpl/Test/CMakeLists.txt
src/SALOMELocalTrace/CMakeLists.txt
src/SALOMELocalTrace/Test/CMakeLists.txt
src/SALOMETraceCollector/CMakeLists.txt
src/SALOMETraceCollector/Test/CMakeLists.txt
src/TOOLSDS/CMakeLists.txt
src/TestContainer/CMakeLists.txt
src/TestMPIContainer/CMakeLists.txt
src/UnitTests/CMakeLists.txt
src/Utils/CMakeLists.txt
src/Utils/Test/CMakeLists.txt

index 1fd90c7cc6372ec33dab26e83a2bd7871086aa99..338fc3f8e851be88a21e07105dc6c0ed64174dde 100755 (executable)
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-PROJECT(SALOME_KERNEL)
-
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
-
-IF(COMMAND cmake_policy)
-  cmake_policy(SET CMP0003 NEW)
-ENDIF(COMMAND cmake_policy)
-
-# directories for packages detection
-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/salome_adm/cmake_files)
-
-find_package(PLATFORM)
-
-IF(APPLE)
-  SET(CMAKE_C_COMPILER gcc)
-  SET(CMAKE_CXX_COMPILER g++)
-  # because default is clang(llvm) with mountain lion at least
-ENDIF(APPLE)
-
-
-# Temporary step instead Find Calcium.cmake
-SET(CALCIUM_IDL_INT_F77 long)
-SET(CALCIUM_CORBA_INT_F77 CORBA::Long)
-SET(LONG_OR_INT int)
-
-# Temporary definitions
-SET(DOXYGEN_IS_OK 0)
-IF(WINDOWS)
- SET(CPPUNIT_IS_OK 0)
-ENDIF(WINDOWS)
-SET(WITH_LOCAL 1)
-SET(WITH_BATCH 1)
-
-ENABLE_TESTING()
-SET(VERSION "7.2.0")
+PROJECT(SalomeKERNEL C CXX)
+
+# Ensure a proper linker behavior:
+CMAKE_POLICY(SET CMP0003 NEW)
+
+# Versioning
+# ===========
+# Project name, upper case
+STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
+
+SET(${PROJECT_NAME_UC}_MAJOR_VERSION 2)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 0)
+SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
+SET(${PROJECT_NAME_UC}_VERSION
+  ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
+# Temporary backward compatibility:
+SET(VERSION ${${PROJECT_NAME_UC}_VERSION})
 SET(VERSION_DEV "0")
 
-SET(BUILD_SHARED_LIBS true)
-
-#Defining all options first
-option(SALOME_USE_MPI "Use MPI containers" OFF)
-option(SALOME_USE_CORBA "Use distribute application with components" ON)
-option(SALOME_USE_DOC "Generate documentation" ON)
-option(SALOME_USE_TEST "Generate test" OFF)
-option(SALOME_USE_LIBBATCH "Generate Launcher" ON)
-
-# Threads
-SET(CMAKE_THREAD_PREFER_PTHREAD)
-find_package(Threads REQUIRED)
-
-# required prerequisites
-
-find_package(SalomePYTHON)
-find_package(SalomeSWIG)
-find_package(SalomeLIBXML2)
-find_package(SalomeHDF5)
-find_package(SalomeBOOST)
-
-# optional prerequisites
-
-if(SALOME_USE_MPI OR HDF5_IS_PARALLEL)
-  find_package(SalomeMPI)
-endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL)
-
-if(SALOME_USE_CORBA)
-  find_package(OMNIORB)
-endif(SALOME_USE_CORBA)
-
-if(SALOME_USE_TEST)
-  find_package(SalomeCPPUNIT)
-endif(SALOME_USE_TEST)
-
-if(SALOME_USE_DOC)
-  find_package(SalomeDOXYGEN)
-  find_package(SalomeSPHINX)
-endif(SALOME_USE_DOC)
-
-if(SALOME_USE_LIBBATCH)
-  find_package(SalomeLIBBATCH)
-endif(SALOME_USE_LIBBATCH)
-
+# Our own set of macros:
+LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/salome_adm/cmake_files")
 INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
 
+# Platform setup
+# ==============
+INCLUDE(SalomeSetupPlatform)
+# Always build libraries as shared objects:
+SET(BUILD_SHARED_LIBS TRUE)
+# Temporary step instead of Find Calcium.cmake
 SET(CALCIUM_IDL_INT_F77 long)
 SET(CALCIUM_CORBA_INT_F77 CORBA::Long)
 SET(LONG_OR_INT int)
-
-
-SET(KERNEL_salomebin_BINS bin/salome)
-
-SET(KERNEL_salomelib_LIBS lib/salome)
-
-SET(KERNEL_salomeidl_IDLS idl/salome)
-
-SET(KERNEL_salomeinclude_HEADERS include/salome)
-
-SET(KERNEL_salomeres_DATA share/salome/resources/kernel)
-
-SET(KERNEL_salomeres_SCRIPTS share/salome/resources/kernel)
-
-SET(KERNEL_salomescript_SCRIPTS bin/salome)
-
-SET(KERNEL_salomescript_DATA bin/salome)
-
-SET(KERNEL_salomescript_PYTHON bin/salome)
-
-SET(KERNEL_appliskel_SCRIPTS bin/salome/appliskel)
-
-SET(KERNEL_appliskel_PYTHON bin/salome/appliskel)
-
-SET(KERNEL_pythondir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
-
-SET(KERNEL_salomepythondir ${KERNEL_pythondir}/salome)
-
-SET(KERNEL_sharedpkgpython_PYTHON ${KERNEL_salomepythondir}/shared_modules)
-
-SET(KERNEL_salomeadmcmake salome_adm/cmake_files)
-
-IF(SALOME_USE_CORBA)
+# Global definitions
+ADD_DEFINITIONS(-DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_INT=4)
+## OmniORB already defines SIZEOF_LONG 
+# ADD_DEFINITIONS(-DSIZEOF_LONG=${SIZE_OF_LONG})
+
+# User options
+# ============
+OPTION(SALOME_USE_MPI "Use MPI containers" OFF)
+OPTION(SALOME_BUILD_DOC "Generate SALOME KERNEL documentation" ON)
+OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
+
+# Advanced:
+OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF)
+OPTION(SALOME_USE_LIBBATCH "Use LibBatch in KERNEL" ON)
+OPTION(SALOME_PACO_PARALLEL "Build with PACO in parallel" OFF)
+OPTION(SALOME_LAUNCHER_ONLY "Build only the Launcher part" OFF)
+MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_PACO_PARALLEL SALOME_LAUNCHER_ONLY)
+
+# Directories
+# ===========
+SET(SALOME_INSTALL_BINS bin/salome CACHE PATH "Install path: SALOME binaries")
+SET(SALOME_INSTALL_LIBS lib/salome CACHE PATH "Install path: SALOME libs")
+SET(SALOME_INSTALL_IDLS idl/salome CACHE PATH "Install path: SALOME IDL files")
+SET(SALOME_INSTALL_HEADERS include/salome CACHE PATH "Install path: SALOME headers")
+SET(SALOME_INSTALL_SCRIPT_SCRIPTS ${SALOME_INSTALL_BINS} CACHE PATH 
+   "Install path: SALOME scripts")
+SET(SALOME_INSTALL_SCRIPT_DATA ${SALOME_INSTALL_BINS} CACHE PATH 
+   "Install path: SALOME script data")
+SET(SALOME_INSTALL_SCRIPT_PYTHON ${SALOME_INSTALL_BINS} CACHE PATH 
+   "Install path: SALOME Python scripts")
+SET(SALOME_INSTALL_APPLISKEL_SCRIPTS ${SALOME_INSTALL_BINS}/appliskel CACHE PATH 
+   "Install path: SALOME application skeleton - scripts")
+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(_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")
+
+# 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")
+
+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_PYTHON SALOME_INSTALL_PYTHON_SHARED SALOME_KERNEL_INSTALL_RES_DATA SALOME_KERNEL_INSTALL_RES_SCRIPTS)
+
+# Required prerequisites
+#   Find "big" prerequisites first - they reference themselves many others
+#   -> this can help finding the smaller prerequisites and detect conficts.
+# =======================
+
+FIND_PACKAGE(SalomeLibBatch REQUIRED)
+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(SalomeBoost REQUIRED)
+IF(WIN32)
+  SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS)
+ENDIF()
+
+# Optional prerequisites
+# ======================
+
+IF(NOT SALOME_LIGHT_ONLY)
+  FIND_PACKAGE(SalomeOmniORB REQUIRED)
+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()
+  FIND_PACKAGE(SalomeCppUnit REQUIRED)  
+ENDIF()
+IF(SALOME_BUILD_DOC)
+  FIND_PACKAGE(SalomeDoxygen REQUIRED)
+  FIND_PACKAGE(SalomeGraphviz)          # Remains optional even here.
+  FIND_PACKAGE(SalomeSphinx REQUIRED)
+ENDIF()
+
+# Sources 
+# ========
+IF(NOT SALOME_LIGHT_ONLY)
   ADD_SUBDIRECTORY(idl)
-ENDIF(SALOME_USE_CORBA)
-
+ENDIF()
 ADD_SUBDIRECTORY(src)
 ADD_SUBDIRECTORY(resources)
+ADD_SUBDIRECTORY(bin)
+ADD_SUBDIRECTORY(salome_adm)
+IF(SALOME_BUILD_DOC)
+  ADD_SUBDIRECTORY(doc)
+ENDIF()
 
-IF(NOT WITHONLYLAUNCHER)
-  ADD_SUBDIRECTORY(bin)
-  ADD_SUBDIRECTORY(salome_adm)
-ENDIF(NOT WITHONLYLAUNCHER)
-
+# Header configuration
+# ====================
 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/KERNEL_version.h.in)
 SET(output ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h)
 MESSAGE(STATUS "Creation of ${output}")
 CONFIGURE_FILE(${input} ${output} @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h DESTINATION ${KERNEL_salomeinclude_HEADERS})
-
-IF(SALOME_USE_DOC)
-  ADD_SUBDIRECTORY(doc)
-ENDIF(SALOME_USE_DOC)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h DESTINATION ${SALOME_INSTALL_HEADERS})
+
+# Configuration export
+# ====================
+INCLUDE(CMakePackageConfigHelpers)
+
+# Add all targets to the build-tree export set
+EXPORT(TARGETS SALOMEBasics
+  FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
+
+# Create the configuration files:
+#   - in the build tree:
+
+#      Ensure the variables are always defined for the configure:
+SET(CPPUNIT_ROOT_DIR "${CPPUNIT_ROOT_DIR}")
+SET(GRAPHVIZ_ROOT_DIR "${GRAPHVIZ_ROOT_DIR}")
+SET(DOXYGEN_ROOT_DIR "${DOXYGEN_ROOT_DIR}")
+SET(SPHINX_ROOT_DIR "${SPHINX_ROOT_DIR}")
+SET(MPI_ROOT_DIR "${MPI_ROOT_DIR}")
+SET(OMNIORB_ROOT_DIR "${OMNIORB_ROOT_DIR}")
+SET(LIBBATCH_ROOT_DIR "${LIBBATCH_ROOT_DIR}")
+SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
+CONFIGURE_PACKAGE_CONFIG_FILE(salome_adm/cmake_files/${PROJECT_NAME}Config.cmake.in 
+    ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
+    INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
+    PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX
+       CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
+       SPHINX_ROOT_DIR MPI_ROOT_DIR OMNIORB_ROOT_DIR LIBBATCH_ROOT_DIR
+       PTHREAD_ROOT_DIR BOOST_ROOT_DIR HDF5_ROOT_DIR LIBXML2_ROOT_DIR
+       PYTHON_ROOT_DIR SWIG_ROOT_DIR)
+
+#   - in the install tree:
+#       Get the relative path of the include directory so 
+#       we can register it in the generated configuration files:
+SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
+CONFIGURE_PACKAGE_CONFIG_FILE(salome_adm/cmake_files/${PROJECT_NAME}Config.cmake.in 
+    ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
+    INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
+    PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX 
+       CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
+       SPHINX_ROOT_DIR MPI_ROOT_DIR OMNIORB_ROOT_DIR LIBBATCH_ROOT_DIR
+       PTHREAD_ROOT_DIR BOOST_ROOT_DIR HDF5_ROOT_DIR LIBXML2_ROOT_DIR
+       PYTHON_ROOT_DIR SWIG_ROOT_DIR)
+
+WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
+    VERSION ${${PROJECT_NAME_UC}_VERSION}
+    COMPATIBILITY AnyNewerVersion)
+  
+# Install the CMake configuration files:
+INSTALL(FILES
+  "${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake"
+  "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
+  DESTINATION "${SALOME_INSTALL_CMAKE}")
+
+# Install the export set for use with the install-tree
+INSTALL(EXPORT salomeKernelTargets DESTINATION "${SALOME_INSTALL_CMAKE}")
index 94907c106edd47faea79c8f445ed598a167f53dc..a45d2a9c18538f1aa377e6bc39a1b3639acc26c4 100755 (executable)
@@ -21,14 +21,14 @@ ADD_SUBDIRECTORY(appliskel)
 
 CONFIGURE_FILE(VERSION.in VERSION @ONLY)
 
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${SALOME_INSTALL_BINS})
 
 # ===============================================================
 # Files to be installed
 # ===============================================================
 
 # These files are data, module or lib files
-INSTALL(FILES config_appli.xml salome.launch DESTINATION ${KERNEL_salomescript_DATA})
+INSTALL(FILES config_appli.xml salome.launch DESTINATION ${SALOME_INSTALL_SCRIPT_DATA})
 
 # These files are executable scripts
 SET(SCRIPTS
@@ -67,4 +67,4 @@ SET(SCRIPTS
   waitContainers.py
   waitNS.py
   )
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_SCRIPTS})
+SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_SCRIPTS})
index d388e497efda10a9c2319948c66025079c074cd5..d8c28c4411e5b1da9f122da27dbb170e1dc25715 100755 (executable)
@@ -37,4 +37,4 @@ SET(SCRIPTS
   kill_remote_containers.py
 )
 
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_SCRIPTS}/appliskel)
+SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_SCRIPTS}/appliskel)
index dd86501439171ff0bca8f35ce2f34f6c55e5e6e3..7090a3bbece60953f173151f8d3052081fdca078 100755 (executable)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake)
+INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/UseOmniORB.cmake)
 
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR}
@@ -77,9 +77,9 @@ OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUD
 ADD_DEFINITIONS(${COMMON_FLAGS})
 TARGET_LINK_LIBRARIES(SalomeIDLKernel ${OMNIORB_LIBRARIES})
 
-INSTALL(TARGETS SalomeIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeIDLKernel DESTINATION ${SALOME_INSTALL_LIBS})
 
-IF(WITH_PACO_PARALLEL)
+IF(SALOME_PACO_PARALLEL)
   SET(SalomeParallelIDLKernel_IDLSOURCES
     SALOME_ComponentPaCO.idl
     SALOME_PortsPaCO.idl
@@ -91,5 +91,5 @@ IF(WITH_PACO_PARALLEL)
   OMNIORB_ADD_MODULE(SalomeParallelIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
   TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${OMNIORB_LIBRARIES})
 
-  INSTALL(TARGETS SalomeParallelIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
-ENDIF(WITH_PACO_PARALLEL)
+  INSTALL(TARGETS SalomeParallelIDLKernel DESTINATION ${SALOME_INSTALL_LIBS})
+ENDIF()
index 9b216c4e89096057beafbb4daff7455bac155018..df7d256ee2e4cb431b8449d764d61799b6d0c43a 100755 (executable)
 # ===============================================================
 
 # These files are data, module or lib files
-INSTALL(FILES CatalogModulePersonnel.xml_skel DESTINATION ${KERNEL_salomeres_DATA})
+INSTALL(FILES CatalogModulePersonnel.xml_skel DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
 
 CONFIGURE_FILE(CatalogResources.xml.in CatalogResources.xml @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CatalogResources.xml DESTINATION ${KERNEL_salomeres_DATA})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CatalogResources.xml DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
 
-IF(NOT WITHONLYLAUNCHER)
-  INSTALL(FILES channel.cfg SALOMEDS_Resources DESTINATION ${KERNEL_salomeres_DATA})
+IF(NOT SALOME_LAUNCHER_ONLY)
+  INSTALL(FILES channel.cfg SALOMEDS_Resources DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
 
   CONFIGURE_FILE(KERNELCatalog.xml.in KERNELCatalog.xml @ONLY)
-  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNELCatalog.xml DESTINATION ${KERNEL_salomeres_DATA})
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNELCatalog.xml DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
 
-ENDIF(NOT WITHONLYLAUNCHER)
+ENDIF()
 
 
 
index f444bc264015b38f72c6d60a8e9dbf5161ce46c8..0e2733cceae1c41b50da700112e5be308cf43cac 100755 (executable)
@@ -20,5 +20,5 @@
 ADD_SUBDIRECTORY(unix)
 ADD_SUBDIRECTORY(cmake_files)
 
-SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in" "${CMAKE_CURRENT_BINARY_DIR}/SALOMEconfig.h" INSTALL ${KERNEL_salomeinclude_HEADERS})
+SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in" "${CMAKE_CURRENT_BINARY_DIR}/SALOMEconfig.h" INSTALL ${SALOME_INSTALL_HEADERS})
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in DESTINATION salome_adm/unix RENAME SALOMEconfig.h.in)
\ No newline at end of file
index 03e167cd0318980f27bef590e414fdbba11f6403..caee7f68eaf530fcb75a1b398e18b4c23eb5c1a1 100755 (executable)
@@ -25,26 +25,31 @@ ADD_SUBDIRECTORY(deprecated)
 
 # These files are data, module or lib files
 SET(DATA
-  FindCPPUNIT.cmake
+  FindCppUnit.cmake
+  FindGraphviz.cmake
   FindKERNEL.cmake
-  FindOMNIORB.cmake
-  UseOMNIORB.cmake
-  FindPLATFORM.cmake
-  FindSPHINX.cmake
-  FindSalomeBOOST.cmake
-  FindSalomeCPPUNIT.cmake
-  FindSalomeDOXYGEN.cmake
+  FindOmniORB.cmake
+  FindPThread.cmake
+  FindSalomeBoost.cmake
+  FindSalomeCppUnit.cmake
+  FindSalomeDoxygen.cmake
+  FindSalomeGraphviz.cmake
   FindSalomeHDF5.cmake
-  FindSalomeLIBBATCH.cmake
-  FindSalomeLIBXML2.cmake
+  FindSalomeLibBatch.cmake
+  FindSalomeLibXml2.cmake
   FindSalomeMPI.cmake
-  FindSalomePYTHON.cmake
-  FindSalomeSPHINX.cmake
+  FindSalomeOmniORB.cmake
+  FindSalomePThread.cmake
+  FindSalomePython.cmake
+  FindSalomeSphinx.cmake
   FindSalomeSWIG.cmake
+  FindSphinx.cmake  
   InstallAndCompilePythonFile.cmake
+  UseOmniORB.cmake
   SalomeMacros.cmake
+  SalomeSetupPlatform.cmake  
 )
-INSTALL(FILES ${DATA} DESTINATION ${KERNEL_salomeadmcmake})
+INSTALL(FILES ${DATA} DESTINATION ${SALOME_INSTALL_CMAKE})
 
 # These files are executable scripts
-SALOME_INSTALL_SCRIPTS(prepare_generating_doc.py ${KERNEL_salomescript_SCRIPTS})
+SALOME_INSTALL_SCRIPTS(prepare_generating_doc.py ${SALOME_INSTALL_SCRIPT_SCRIPTS})
diff --git a/salome_adm/cmake_files/FindCppUnit.cmake b/salome_adm/cmake_files/FindCppUnit.cmake
new file mode 100644 (file)
index 0000000..e1264de
--- /dev/null
@@ -0,0 +1,64 @@
+# - Find CppUnit
+# Sets the following variables:
+#   CPPUNIT_INCLUDE_DIR  - 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
+#
+#  The header cppunit/extensions/HelperMacros.h is looked for.
+#  The following libraries are searched  
+#        cppunit_dll, or cppunitd_dll (Windows) 
+#        cppunit (Linux)
+#
+
+#########################################################################
+# 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
+#
+
+IF(NOT CppUnit_FIND_QUIETLY)
+    MESSAGE(STATUS "Looking for CppUnit ...")
+ENDIF()
+
+# Headers  
+SET(CPPUNIT_INCLUDE_TO_FIND cppunit/extensions/HelperMacros.h)
+FIND_PATH(CPPUNIT_INCLUDE_DIR ${CPPUNIT_INCLUDE_TO_FIND})
+
+# Libraries
+IF(WINDOWS)
+  IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+    FIND_LIBRARY(CPPUNIT_LIBRARIES cppunitd_dll)
+  ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
+    FIND_LIBRARY(CPPUNIT_LIBRARIES cppunit_dll)
+  ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
+ELSE(WINDOWS)
+  FIND_LIBRARY(CPPUNIT_LIBRARIES cppunit)
+ENDIF(WINDOWS)
+
+# Global variables
+SET(CPPUNIT_DEFINITIONS)
+IF(WINDOWS)
+  SET(CPPUNIT_DEFINITIONS -DCPPUNIT_DLL)
+ENDIF(WINDOWS)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppUnit REQUIRED_VARS CPPUNIT_INCLUDE_DIR CPPUNIT_LIBRARIES)
+
+
diff --git a/salome_adm/cmake_files/FindGraphviz.cmake b/salome_adm/cmake_files/FindGraphviz.cmake
new file mode 100644 (file)
index 0000000..cf987be
--- /dev/null
@@ -0,0 +1,37 @@
+# - Graphviz detection
+#
+# Output variable: GRAPHVIZ_EXECUTABLE
+# 
+# The executable 'dot' is looked for and returned in the above variable.
+#
+
+###########################################################################
+# 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
+#
+###########################################################################
+
+FIND_PROGRAM(GRAPHVIZ_EXECUTABLE dot)
+
+# Handle the standard arguments of the find_package() command:
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Graphviz REQUIRED_VARS GRAPHVIZ_EXECUTABLE)
+
diff --git a/salome_adm/cmake_files/FindOmniORB.cmake b/salome_adm/cmake_files/FindOmniORB.cmake
new file mode 100644 (file)
index 0000000..357c532
--- /dev/null
@@ -0,0 +1,168 @@
+# - Find OmniORB4 cmake module and Pyhon backends
+#
+# Sets the following variables:
+# OMNIORB_FOUND        - TRUE if OmniORB4 installation has been found
+# OMNIORB_INCLUDE_DIR  - OmniORB4 headers path
+# OMNIORB_LIBRARIES    - OmniORB4 libraries 
+# OMNIORB_VERSION      - OmniORB4 version
+# OMNIORB_IDL_COMPILER - OmniORB4 idl compiler command (omniidl)
+# OMNIORB_NAMESERVER   - OmniORB4 CORBA naming service (omniNames)
+# OMNIORB_PYTHON_BACKEND
+# and many other mainly used in UseOmniORB.cmake  
+#
+# Detection is made through calls to 
+# find_library, find_program, find_path
+# and can be guided by extending CMAKE_PREFIX_PATH. Given the CMake precedence
+# rule this will take precedence over the standard system paths.
+# See for example doc of find_library().  
+#
+
+################################################################
+# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+################################################################
+
+# minimum OmniORB4 supported version
+# 4.0.6 has known bug float/double marshalling using CORBA::Any
+set(OMNIORB_MINIMUM_VERSION "4.1.2")
+
+##############################################################################
+# find headers
+##############################################################################
+FIND_PATH(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h)
+
+##############################################################################
+# find libraries
+##############################################################################
+IF (WIN32)
+  FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4 
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS lib/x86_win32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS lib/x86_win32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS lib/x86_win32)
+ELSE (WIN32)
+  FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4 NAMES omniORB4)
+  FIND_LIBRARY(OMNIORB_LIBRARY_omnithread NAMES omnithread)
+  FIND_LIBRARY(OMNIORB_LIBRARY_omniDynamic4 NAMES omniDynamic4)
+ENDIF (WIN32)   
+  
+# Optional libraries
+
+IF (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_COS4
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS lib/x86_win32 )
+  FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS lib/x86_win32) 
+ELSE (WIN32)
+  FIND_LIBRARY(OMNIORB_LIBRARY_COS4 NAMES COS4)
+  FIND_LIBRARY(OMNIORB_LIBRARY_COSDynamic4 NAMES COSDynamic4)
+ENDIF (WIN32)
+
+##############################################################################
+# find command line tools
+##############################################################################
+IF (WIN32)
+  FIND_PROGRAM( OMNIORB_IDL_COMPILER
+    NAMES omniidl PATHS bin/x86_win32
+    DOC "What is the path where omniidl (the idl compiler) can be found")
+  FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
+    NAMES omniNames PATHS bin/x86_win32 
+  DOC "What is the path where omniNames (the ORB server) can be found")
+ELSE(WIN32)
+  FIND_PROGRAM(OMNIORB_IDL_COMPILER NAMES omniidl)
+  FIND_PROGRAM(OMNIORB_NAMESERVER NAMES omniNames)
+ENDIF (WIN32)
+
+##############################################################################
+# find python back-end
+##############################################################################
+
+SET(_py_version "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
+SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH})
+FIND_PATH(OMNIORB_PYTHON_BACKEND
+  NAMES python.py
+  PATHS "/lib/python${_py_version}/site-packages/omniidl_be" "/usr/lib/omniidl/omniidl_be" 
+  DOC "Path to python-backend directory (omniidl_be) including python.py file" )
+
+##############################################################################
+# Cook our stuff
+##############################################################################
+
+MARK_AS_ADVANCED(OMNIORB_DIR OMNIORB_INCLUDE_DIR)
+MARK_AS_ADVANCED(OMNIORB_LIBRARY_omniORB4 OMNIORB_LIBRARY_omnithread OMNIORB_LIBRARY_omniDynamic4)
+MARK_AS_ADVANCED(OMNIORB_IDL_COMPILER OMNIORB_NAMESERVER OMNIORB_VERSION)
+MARK_AS_ADVANCED(OMNIORB_LIBRARY_COS4 OMNIORB_LIBRARY_COSDynamic4 OMNIORB_PYTHON_BACKEND)
+
+SET(OMNIORB_LIBRARIES
+    ${OMNIORB_LIBRARY_omniORB4}
+    ${OMNIORB_LIBRARY_omnithread}
+    ${OMNIORB_LIBRARY_omniDynamic4})
+
+IF(OMNIORB_LIBRARY_COS4)
+    LIST(APPEND OMNIORB_LIBRARIES ${OMNIORB_LIBRARY_COS4})
+ENDIF()
+IF(OMNIORB_LIBRARY_COSDynamic4)
+    LIST(APPEND OMNIORB_LIBRARIES ${OMNIORB_LIBRARY_COSDynamic4})
+ENDIF()
+
+# Optionaly, extract the the version number from the acconfig.h file:
+# The version check is done at the very bottom of this file.
+IF( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+    FILE( READ ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h OMNIORB_ACCONFIG_H )
+    STRING( REGEX MATCH "#define[\t ]+PACKAGE_VERSION[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" OMNIORB_ACCONFIG_H "${OMNIORB_ACCONFIG_H}" )
+    STRING( REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" OMNIORB_VERSION "${OMNIORB_ACCONFIG_H}" )
+ELSE()
+    SET( OMNIORB_VERSION "NOT-FOUND" )
+ENDIF( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+  
+SET(OMNIORB_IDLCXXFLAGS -Wba -nf)
+SET(OMNIORB_IDLPYFLAGS -bpython)
+IF (OMNIORB_PYTHON_BACKEND) 
+  SET(OMNIORB_IDLPYFLAGS "-p ${OMNIORB_PYTHON_BACKEND} ${OMNIORB_IDLPYFLAGS}")
+ENDIF()
+SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
+SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS})
+SET(IDL_CLN_H .hh)
+SET(IDL_SRV_H .hh)
+SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
+IF(WIN32)
+  SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
+ENDIF()
+IF(APPLE)
+  SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...
+ENDIF()
+
+# Handle standard arguments:
+INCLUDE(FindPackageHandleStandardArgs)
+IF(OMNIORB_VERSION)
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS(OmniORB  
+        REQUIRED_VARS OMNIORB_INCLUDE_DIR OMNIORB_LIBRARY_omniORB4 OMNIORB_LIBRARY_omnithread 
+                      OMNIORB_LIBRARY_omniDynamic4 OMNIORB_IDL_COMPILER OMNIORB_PYTHON_BACKEND
+        VERSION_VAR OMNIORB_VERSION )
+ELSE()
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS(OmniORB  
+        REQUIRED_VARS OMNIORB_INCLUDE_DIR OMNIORB_LIBRARY_omniORB4 OMNIORB_LIBRARY_omnithread 
+                      OMNIORB_LIBRARY_omniDynamic4 OMNIORB_IDL_COMPILER OMNIORB_PYTHON_BACKEND)
+ENDIF()
diff --git a/salome_adm/cmake_files/FindPThread.cmake b/salome_adm/cmake_files/FindPThread.cmake
new file mode 100644 (file)
index 0000000..5df33ac
--- /dev/null
@@ -0,0 +1,68 @@
+# - Find PThread
+# This module finds an installed PThread using the variable PTHREAD_ROOT_DIR 
+# as a lookup path.
+# It sets the following variables:
+#  PTHREAD_FOUND       - set to true if PThread is found
+#  PTHREAD_INCLUDE_DIR - the directory where the include files are located
+#  PTHREAD_LIBRARIES   - the path to PThread library
+#
+# The file "pthread.h" is looked for PTHREAD_INCLUDE_DIR.
+# Libraries are searched with following names: 
+#    pthread
+# On Win32:
+#    pthreadVSE2 pthreadVC2
+# or in Debug mode:
+#    pthreadVSE2d pthreadVC2d
+#
+
+
+#############################################################
+#  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
+#
+#############################################################
+
+IF(NOT PThread_FIND_QUIETLY)
+    MESSAGE(STATUS "Looking for PThread...")
+ENDIF ()
+
+IF(WIN32)
+    SET(PTHREADS_INCLUDE_TO_FIND pthread.h)
+    FIND_PATH(PTHREAD_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND})
+    # Default build type is assumed to be Release:
+    IF(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
+        FIND_LIBRARY(PTHREAD_LIBRARIES pthreadVSE2 pthreadVC2)
+    ELSE()
+        FIND_LIBRARY(PTHREAD_LIBRARIES pthreadVSE2d pthreadVC2d)
+    ENDIF()
+ELSE(WIN32)
+    FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h)
+    FIND_LIBRARY(PTHREAD_LIBRARIES NAMES pthread)
+ENDIF(WIN32)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PThread REQUIRED_VARS PTHREAD_INCLUDE_DIR PTHREAD_LIBRARIES)
+
+IF(PTHREAD_FOUND)
+  IF(NOT PThread_FIND_QUIETLY)
+    MESSAGE(STATUS "PThread library: ${PTHREAD_LIBRARIES}")
+  ENDIF()
+ENDIF()
diff --git a/salome_adm/cmake_files/FindSalomeBoost.cmake b/salome_adm/cmake_files/FindSalomeBoost.cmake
new file mode 100644 (file)
index 0000000..fc191f9
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# Boost detection dor Salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+SET(Boost_USE_STATIC_LIBS        OFF)
+SET(Boost_USE_MULTITHREADED      ON )
+SET(Boost_USE_STATIC_RUNTIME     OFF)
+
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 1)
+#MARK_AS_ADVANCED()
diff --git a/salome_adm/cmake_files/FindSalomeCppUnit.cmake b/salome_adm/cmake_files/FindSalomeCppUnit.cmake
new file mode 100644 (file)
index 0000000..81a903e
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# CppUnit detection for Salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(CppUnit CPPUNIT_INCLUDE_DIR 1)
+MARK_AS_ADVANCED(CPPUNIT_INCLUDE_DIR CPPUNIT_LIBRARIES)
diff --git a/salome_adm/cmake_files/FindSalomeDoxygen.cmake b/salome_adm/cmake_files/FindSalomeDoxygen.cmake
new file mode 100644 (file)
index 0000000..430f1b4
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# Doxygen detection for salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Doxygen DOXYGEN_EXECUTABLE 2)
+#MARK_AS_ADVANCED()
diff --git a/salome_adm/cmake_files/FindSalomeGraphviz.cmake b/salome_adm/cmake_files/FindSalomeGraphviz.cmake
new file mode 100644 (file)
index 0000000..e9b02f7
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# Graphviz detection for salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Graphviz GRAPHVIZ_EXECUTABLE 2)
+MARK_AS_ADVANCED(GRAPHVIZ_EXECUTABLE)
index 3745a99b75f3050e732deb4b2643ff7be030373b..00e7301fd2d75486ef60e7781c61c5c03e15ff14 100644 (file)
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+# Author: Adrien Bruneton
+#
 
 # HDF5 detection for Salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+# 
+# --- HDF5 specificities ----
+#  MPI root directory used for HDF5 compilation is exposed into MPI_ROOT_DIR_EXP
+#
+
+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
+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
+  #  and in the native HDF5-config.cmake differ!)
+  SET(HDF5_IS_PARALLEL TRUE)
+
+  # HDF5 was compiled with MPI support
+  # Unfortunately HDF5 doesn't expose its MPI configuration easily ...
+  # We sniff the properties of the HDF5 target which should also be there:
+  GET_PROPERTY(_lib_lst TARGET hdf5 PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG)
+  FOREACH(s ${_lib_lst})
+    STRING(FIND "${s}" "mpi." _res)   # should cover WIN(?) and LINUX
+    IF(_res GREATER -1)
+      GET_FILENAME_COMPONENT(_tmp "${s}" PATH)     # go up to levels
+      GET_FILENAME_COMPONENT(MPI_ROOT_DIR_EXP "${_tmp}" PATH)
+      BREAK()
+    ENDIF()
+  ENDFOREACH()
+  IF(NOT SalomeHDF5_FIND_QUIETLY)
+    MESSAGE(STATUS "HDF5 was compiled with MPI: ${MPI_ROOT_DIR_EXP}")
+  ENDIF()  
+ENDIF()
 
-set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to Hdf5 directory")
-if(EXISTS ${HDF5_ROOT_DIR})
-  set(CMAKE_INCLUDE_PATH ${HDF5_ROOT_DIR}/include)
-  set(CMAKE_LIBRARY_PATH ${HDF5_ROOT_DIR}/lib)
-  set(CMAKE_PROGRAM_PATH ${HDF5_ROOT_DIR}/bin)
-endif(EXISTS ${HDF5_ROOT_DIR})
-find_package(HDF5 COMPONENTS C REQUIRED)
-if (HDF5_FOUND)
-  set(HDF5_DEFINITIONS "-DH5_USE_16_API ${HDF5_DEFINITIONS}" )
-  if(WINDOWS)
-    set(HDF5_DEFINITIONS "-D_HDF5USEDLL_ ${HDF5_DEFINITIONS}" )
-  endif(WINDOWS)
-endif(HDF5_FOUND)
diff --git a/salome_adm/cmake_files/FindSalomeLibBatch.cmake b/salome_adm/cmake_files/FindSalomeLibBatch.cmake
new file mode 100644 (file)
index 0000000..0c78aff
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# LibBatch detection dor Salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibBatch LIBBATCH_ROOT_DIR_EXP 0)
+#MARK_AS_ADVANCED()
diff --git a/salome_adm/cmake_files/FindSalomeLibXml2.cmake b/salome_adm/cmake_files/FindSalomeLibXml2.cmake
new file mode 100644 (file)
index 0000000..dfe4148
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# LibXml2 detection for SALOME
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibXml2 LIBXML2_INCLUDE_DIR 2)
+#MARK_AS_ADVANCED()
+
index 2b30623679e064913526f8cb683d2501add59e11..43824c99fb1e740516a6b0c36441bf0be8986021 100644 (file)
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+# Author: Adrien Bruneton
+#
 
 # MPI detection for Salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+# 
 
-set(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to Mpi directory")
-if(EXISTS ${MPI_ROOT_DIR})
-  set(CMAKE_INCLUDE_PATH ${MPI_ROOT_DIR}/include)
-  set(CMAKE_LIBRARY_PATH ${MPI_ROOT_DIR}/lib)
-  set(CMAKE_PROGRAM_PATH ${MPI_ROOT_DIR}/bin)
-endif(EXISTS ${MPI_ROOT_DIR})
-find_package(MPI REQUIRED)
-if(HDF5_IS_PARALLEL)
-  set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH} )
-  set(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
-endif(HDF5_IS_PARALLEL)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MPI MPIEXEC 2)
+MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY)
diff --git a/salome_adm/cmake_files/FindSalomeOmniORB.cmake b/salome_adm/cmake_files/FindSalomeOmniORB.cmake
new file mode 100644 (file)
index 0000000..3b7d582
--- /dev/null
@@ -0,0 +1,27 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# omniORB detection for SALOME
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORB OMNIORB_INCLUDE_DIR 1)
+#MARK_AS_ADVANCED()
diff --git a/salome_adm/cmake_files/FindSalomePThread.cmake b/salome_adm/cmake_files/FindSalomePThread.cmake
new file mode 100644 (file)
index 0000000..4d1353f
--- /dev/null
@@ -0,0 +1,27 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# PThread detection for SALOME
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PThread PTHREAD_INCLUDE_DIR 1)
+MARK_AS_ADVANCED(PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
diff --git a/salome_adm/cmake_files/FindSalomePython.cmake b/salome_adm/cmake_files/FindSalomePython.cmake
new file mode 100644 (file)
index 0000000..f200717
--- /dev/null
@@ -0,0 +1,138 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Adrien Bruneton
+#
+
+# Python libraries and interpreter detection for SALOME
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+# The interpreter is found first, and if OK, the corresponding libraries are searched.
+# We ensure the version of the libraries matches the one of the interpreter. 
+#
+
+# 1. Load environment or any previously detected Python
+IF(DEFINED ENV{PYTHON_ROOT_DIR})
+  FILE(TO_CMAKE_PATH "$ENV{PYTHON_ROOT_DIR}" _PYTHON_ROOT_DIR_ENV)
+  SET(_dflt_value "${_PYTHON_ROOT_DIR_ENV}")
+ELSE()
+  # will be blank if no Python was previously loaded
+  SET(_dflt_value "${PYTHON_ROOT_DIR_EXP}")
+ENDIF()
+
+#   Make cache entry 
+SET(PYTHON_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to Python directory (interpreter and libs)")
+
+# 2. Find package - config mode first (i.e. looking for XYZ-config.cmake)
+IF(EXISTS "${PYTHON_ROOT_DIR}")
+  # Hope to find direclty a CMake config file there
+  SET(_CONF_DIR "${PYTHON_ROOT_DIR}/share/cmake") 
+
+  # Try find_package in config mode with a hard-coded guess. This
+  # has the priority.
+  FIND_PACKAGE(Python CONFIG QUIET PATHS "${_CONF_DIR}")
+  MARK_AS_ADVANCED(Python_DIR)
+    
+  IF (NOT PYTHON_FOUND)  
+    LIST(APPEND CMAKE_PREFIX_PATH "${PYTHON_ROOT_DIR}")
+  ELSE()
+    MESSAGE(STATUS "Found Python in CONFIG mode!")
+  ENDIF()
+ENDIF()
+
+# Otherwise try the standard way (module mode, with the standard CMake Find*** macro):
+SALOME_FIND_PACKAGE(SalomePython PythonInterp MODULE)
+SET(_found1 ${PYTHONINTERP_FOUND})
+
+IF (PYTHONINTERP_FOUND)
+  # Now ensure we find the Python libraries matching the interpreter:
+  # This uses the variable PYTHON_EXECUTABLE
+  GET_FILENAME_COMPONENT(_python_dir "${PYTHON_EXECUTABLE}" PATH)
+  GET_FILENAME_COMPONENT(CMAKE_INCLUDE_PATH "${_python_dir}/../include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" ABSOLUTE)
+  GET_FILENAME_COMPONENT(CMAKE_LIBRARY_PATH "${_python_dir}/../lib" ABSOLUTE)
+  # For a Windows install, this might look more like this:
+  IF(WIN32)
+    LIST(APPEND CMAKE_LIBRARY_PATH "${_python_dir}/libs" ABSOLUTE)
+    LIST(APPEND CMAKE_INCLUDE_PATH "${_python_dir}/include" ABSOLUTE)
+  ENDIF()
+  # Override the EXACT and VERSION settings of the SalomePython module
+  # to force the next call to SALOME_FIND_PACKAGE() to find the exact matching
+  # version:
+  SET(_old_EXACT ${SalomePython_FIND_VERSION_EXACT})
+  SET(_old_VERSION "${SalomePython_FIND_VERSION}")
+  SET(SalomePython_FIND_VERSION_EXACT TRUE)
+  SET(SalomePython_FIND_VERSION "${PYTHON_VERSION_STRING}")
+  # Prepare call to FIND_PACKAGE(PythonLibs) and ensure priority is given to 
+  # the location found for the interpreter:
+  GET_FILENAME_COMPONENT(_tmp "${_python_dir}" PATH)
+#  SET(PYTHON_LIBRARY ${_tmp}/lib)
+#  SET(PYTHON_INCLUDE_DIR ${_tmp}/include)
+  SALOME_FIND_PACKAGE(SalomePython PythonLibs MODULE)
+  # Restore variables:
+  SET(SalomePython_FIND_VERSION_EXACT ${_old_EXACT})
+  SET(SalomePython_FIND_VERSION "${_old_VERSION}")
+ENDIF()
+
+# Set the FOUND flag for SalomePython:
+SET(SALOMEPYTHON_FOUND FALSE)
+IF (_found1 AND PYTHONLIBS_FOUND)
+  SET(SALOMEPYTHON_FOUND TRUE)
+ENDIF()
+
+IF (SALOMEPYTHON_FOUND)
+  MESSAGE(STATUS "Python interpreter and Python libraries found:")
+  MESSAGE(STATUS "Python libraries: ${PYTHON_LIBRARY}")
+  MESSAGE(STATUS "Python include dir: ${PYTHON_INCLUDE_DIR}")
+
+  # 3. Set the root dir which was finally retained 
+  # For Python this is the grand-parent of the
+  # include directory:
+  GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${PYTHON_INCLUDE_DIR}" PATH)
+  GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
+
+  # 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
+  IF(DEFINED ENV{PYTHON_ROOT_DIR})
+    SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${_PYTHON_ROOT_DIR_ENV}")
+    IF(NOT _res)
+      MESSAGE(WARNING "Python was found, but not a the path given by the "
+"environment PYTHON_ROOT_DIR! Is the variable correctly set?")
+    ELSE()
+      MESSAGE(STATUS "Python found directory matches what was specified in the PYTHON_ROOT_DIR, all good!")    
+    ENDIF()
+  ENDIF()
+
+  # 5. Conflict detection
+  # 5.1  From another prerequisite using Python
+  IF(PYTHON_ROOT_DIR_EXP)
+      SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${PYTHON_ROOT_DIR_EXP}") 
+      IF(NOT _res)
+         MESSAGE(WARNING "Warning: Python: detected version conflicts with a previously found Python!"
+                          "The two paths are " ${_tmp_ROOT_DIR} " vs " ${PYTHON_ROOT_DIR_EXP})
+      ELSE()
+          MESSAGE(STATUS "Python directory matches what was previously exposed by another prereq, all good!")
+      ENDIF()        
+  ENDIF()
+
+  # 6. Specifics
+  ## None here    
+ELSE()
+  MESSAGE(STATUS "Python was only partially (or not at all) found .")  
+ENDIF()
+
+
index 86549f63a8e4c9c7562bcf351a0e767c7abb1324..80c7b6595566e4a672eb0389bd13f8f155bd7973 100644 (file)
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+# Author: Adrien Bruneton
+#
 
-# Swig detection for Salome
-
-set(SWIG_ROOT_DIR $ENV{SWIG_ROOT_DIR} CACHE PATH "Path to Swig directory")
-if(EXISTS ${SWIG_ROOT_DIR})
-  set(CMAKE_INCLUDE_PATH ${SWIG_ROOT_DIR}/include)
-  set(CMAKE_LIBRARY_PATH ${SWIG_ROOT_DIR}/lib)
-  set(CMAKE_PROGRAM_PATH ${SWIG_ROOT_DIR}/bin)
-endif(EXISTS ${SWIG_ROOT_DIR})
-find_package(SWIG REQUIRED)
+# SWIG detection for SALOME
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2)
+MARK_AS_ADVANCED(SWIG_EXECUTABLE SWIG_VERSION)
diff --git a/salome_adm/cmake_files/FindSalomeSphinx.cmake b/salome_adm/cmake_files/FindSalomeSphinx.cmake
new file mode 100644 (file)
index 0000000..3aa6527
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Sphinx detection for Salome
+#
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Sphinx SPHINX_EXECUTABLE 2)
+MARK_AS_ADVANCED(SPHINX_EXECUTABLE)
diff --git a/salome_adm/cmake_files/FindSphinx.cmake b/salome_adm/cmake_files/FindSphinx.cmake
new file mode 100644 (file)
index 0000000..ac0c954
--- /dev/null
@@ -0,0 +1,37 @@
+# - Sphinx detection
+#
+# Output variable: SPHINX_EXECUTABLE
+# 
+# The executable 'sphinx-build' is looked for and returned in the above variable.
+#
+
+###########################################################################
+# 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
+#
+###########################################################################
+
+FIND_PROGRAM(SPHINX_EXECUTABLE sphinx-build)
+
+# Handle the standard arguments of the find_package() command:
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE)
+
diff --git a/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in b/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in
new file mode 100644 (file)
index 0000000..b9de343
--- /dev/null
@@ -0,0 +1,96 @@
+# - Config file for the @PROJECT_NAME@ package
+# It defines the following variables. 
+# Specific to the pacakge @PROJECT_NAME@ itself:
+#  @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. 
+
+###############################################################
+#  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
+###############################################################
+
+### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
+@PACKAGE_INIT@
+
+# 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)
+  INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE@/@PROJECT_NAME@Targets.cmake")
+ENDIF()   
+
+# Package root dir:
+SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
+
+#### Now the specificities
+
+# Options exported by the package:
+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@)
+
+# Prerequisites:
+IF(SALOME_BUILD_TESTS)
+  SET_AND_CHECK(CPPUNIT_ROOT_DIR_EXP  "@PACKAGE_CPPUNIT_ROOT_DIR@")
+ENDIF()
+IF(SALOME_BUILD_DOC)
+  SET_AND_CHECK(GRAPHVIZ_ROOT_DIR_EXP "@PACKAGE_GRAPHVIZ_ROOT_DIR@")
+  SET_AND_CHECK(DOXYGEN_ROOT_DIR_EXP  "@PACKAGE_DOXYGEN_ROOT_DIR@")
+  SET_AND_CHECK(SPHINX_ROOT_DIR_EXP   "@PACKAGE_SPHINX_ROOT_DIR@")
+ENDIF()
+IF(SALOME_USE_MPI)
+  SET_AND_CHECK(MPI_ROOT_DIR_EXP      "@PACKAGE_MPI_ROOT_DIR@")
+ENDIF()
+IF(NOT SALOME_LIGHT_ONLY)
+  SET_AND_CHECK(OMNIORB_ROOT_DIR_EXP  "@PACKAGE_OMNIORB_ROOT_DIR@")
+ENDIF()
+IF(SALOME_USE_LIBBATCH)
+  SET_AND_CHECK(LIBBATCH_ROOT_DIR_EXP "@PACKAGE_LIBBATCH_ROOT_DIR@")
+ENDIF()
+
+SET_AND_CHECK(PTHREAD_ROOT_DIR_EXP  "@PACKAGE_PTHREAD_ROOT_DIR@")
+SET_AND_CHECK(BOOST_ROOT_DIR_EXP    "@PACKAGE_BOOST_ROOT_DIR@")
+SET_AND_CHECK(HDF5_ROOT_DIR_EXP     "@PACKAGE_HDF5_ROOT_DIR@")
+SET_AND_CHECK(LIBXML2_ROOT_DIR_EXP  "@PACKAGE_LIBXML2_ROOT_DIR@")
+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@")
index 377d5c723c4a3246f9ea8bea8015a8bf72af2ca9..ea4337aeca954ce6075ccae104356d14e2412704 100755 (executable)
@@ -16,6 +16,8 @@
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+# Author: A.Geay, V. Sandler, A. Bruneton
+#
 
 #----------------------------------------------------------------------------
 # LIST_CONTAINS is a macro useful for determining whether a list has a 
@@ -160,4 +162,207 @@ MACRO(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE)
   IF(SALOME_CONFIGURE_FILE_INSTALL)
     INSTALL(FILES ${OUT_FILE} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
   ENDIF(SALOME_CONFIGURE_FILE_INSTALL)
-ENDMACRO(SALOME_CONFIGURE_FILE)
\ No newline at end of file
+ENDMACRO(SALOME_CONFIGURE_FILE)
+
+
+#######################################################################################
+# Useful macros for SALOME own package detection system
+#
+
+###
+# SALOME_CHECK_EQUAL_PATHS(result path1 path2)
+#  Check if two paths are identical, resolving links. If the paths do not exist a simple
+#  text comparison is performed.
+#  result is a boolean.
+###
+MACRO(SALOME_CHECK_EQUAL_PATHS varRes path1 path2)  
+  SET("${varRes}" OFF)
+  IF(EXISTS "${path1}")
+    GET_FILENAME_COMPONENT(_tmp1 "${path1}" REALPATH)
+  ELSE()
+    SET(_tmp1 "${path1}")
+  ENDIF() 
+
+  IF(EXISTS "${path2}")
+    GET_FILENAME_COMPONENT(_tmp2 "${path2}" REALPATH)
+  ELSE()
+    SET(_tmp2 "${path2}")
+  ENDIF() 
+
+  IF("${_tmp1}" STREQUAL "${_tmp2}")
+    SET("${varRes}" ON)
+  ENDIF()
+#  MESSAGE(${${varRes}})
+ENDMACRO()
+
+
+####
+# SALOME_FIND_PACKAGE(englobingPackageName standardPackageName modus)
+# Encapsulate the call to the standard FIND_PACKAGE(standardPackageName) passing all the options
+# given when calling the command FIND_PACKAGE(customPackageName)
+# Modus is either MODULE or CONFIG (cf standard FIND_PACKAGE() documentation).
+# This macro is to be called from within the FindCustomPackage.cmake file.
+####
+MACRO(SALOME_FIND_PACKAGE englobPkg stdPkg mode)
+  # 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)
+      SET(_tmp_quiet "QUIET")
+    ELSE()
+      SET(_tmp_quiet)
+    ENDIF()  
+    IF(${englobPkg}_FIND_REQUIRED)
+      SET(_tmp_req "REQUIRED")
+    ELSE()
+      SET(_tmp_req)
+    ENDIF()  
+    IF(${englobPkg}_FIND_VERSION_EXACT)
+      SET(_tmp_exact "EXACT")
+    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():
+    IF(_tmp_compo)
+      FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} ${mode} ${_tmp_quiet} ${_tmp_req} COMPONENTS ${_tmp_compo})
+    ELSE()
+      FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} ${mode} ${_tmp_quiet} ${_tmp_req})
+    ENDIF()
+  ENDIF()
+ENDMACRO()
+
+
+####################################################################"
+# 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 <referenceVariable>
+# to obtain the package root directory.  
+#   
+# For example:  SALOME_FIND_PACKAGE_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2) 
+#
+# Generic detection (and conflict check) procedure for package XYZ:
+# 1. Load a potential env variable XYZ_ROOT_DIR as a default choice for the cache entry XYZ_ROOT_DIR
+#    If empty, load a potential XYZ_ROOT_DIR_EXP as default value (path exposed by another package depending
+# directly on XYZ)
+# 2. Invoke FIND_PACKAGE() in this order:
+#    * in CONFIG mode first (if possible): priority is given to a potential 
+#    "XYZ-config.cmake" file
+#    * then switch to the standard MODULE mode, appending on CMAKE_PREFIX_PATH 
+# the above XYZ_ROOT_DIR variable
+# 3. Extract the path actually found into a temp variable _XYZ_TMP_DIR
+# 4. Warn if XYZ_ROOT_DIR is set and doesn't match what was found (e.g. when CMake found the system installation
+#    instead of what is pointed to by XYZ_ROOT_DIR - happens when a typo in the content of XYZ_ROOT_DIR).
+# 5. Conflict detection:
+#    * check the temp variable against a potentially existing XYZ_ROOT_DIR_EXP
+# 6. Finally expose what was *actually* found in XYZ_ROOT_DIR.  
+# 7. Specific stuff: for example exposing a prerequisite of XYZ to the rest of the world for future 
+# conflict detection. This is added after the call to the macro by the callee.
+#
+MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
+  STRING(TOUPPER ${pkg} pkg_UC)
+
+  # 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
+    SET(_dflt_value "${${pkg_UC}_ROOT_DIR_EXP}")
+  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))  
+      LIST(APPEND CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
+    ELSE()
+      MESSAGE(STATUS "Found ${pkg} in CONFIG mode!")
+    ENDIF()
+  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)
+  ELSE()
+    SET(SALOME${pkg_UC}_FOUND FALSE)
+  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)
+    IF(_tmp_len)
+       LIST(GET "${${referenceVariable}}" 0 _tmp_ROOT_DIR)
+    ELSE()
+       SET(_tmp_ROOT_DIR "${${referenceVariable}}")
+    ENDIF()
+    IF(${upCount})
+      MATH(EXPR _rge "${upCount}-1") 
+      FOREACH(_unused RANGE ${_rge})        
+        GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
+      ENDFOREACH()
+    ENDIF()
+
+    # 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
+    IF(DEFINED ENV{${pkg_UC}_ROOT_DIR})
+      SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${_${pkg_UC}_ROOT_DIR_ENV}")
+      IF(NOT _res)
+        MESSAGE(WARNING "${pkg} was found, but not at the path given by the "
+            "environment ${pkg_UC}_ROOT_DIR! Is the variable correctly set? "
+            "The two paths are: ${_tmp_ROOT_DIR} and: ${_${pkg_UC}_ROOT_DIR_ENV}")
+        
+      ELSE()
+        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.")
+    ENDIF()
+
+    # 5. Conflict detection
+    # 5.1  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})
+        ELSE()
+            MESSAGE(STATUS "${pkg} directory matches what was previously exposed by another prereq, all good!")
+        ENDIF()        
+    ENDIF()
+    
+    # 6. Save the found installation
+    #
+    SET(${pkg_UC}_ROOT_DIR "${_tmp_ROOT_DIR}")
+     
+  ELSE()
+    MESSAGE(STATUS "${pkg} was not found.")  
+  ENDIF()
+ENDMACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS)
+
diff --git a/salome_adm/cmake_files/SalomeSetupPlatform.cmake b/salome_adm/cmake_files/SalomeSetupPlatform.cmake
new file mode 100644 (file)
index 0000000..7c511fa
--- /dev/null
@@ -0,0 +1,107 @@
+# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+## Detect architecture
+IF(WIN32)
+  SET(MACHINE WINDOWS)
+ELSE()
+  SET(MACHINE PCLINUX)
+ENDIF()
+
+## Test for 64 bits
+IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  SET(MACHINE_IS_64 TRUE)
+ELSE()
+  SET(MACHINE_IS_64 FALSE)
+ENDIF()
+
+## Force CMAKE_BUILD_TYPE to Release if not set
+IF(NOT CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE})
+ENDIF(NOT CMAKE_BUILD_TYPE)
+IF(NOT CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE Release)
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
+## Make all warnings errors on non-windows platforms
+#  CURRENTLY DISABLED
+IF(NOT (WIN32 OR APPLE))
+  SET(ADD_WERROR ON)
+  SET(NAMES ACCEPT_SALOME_WARNINGS ACCEPT_${MODULE}_WARNINGS I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS)
+  FOREACH(name ${NAMES})
+    SET(VAL $ENV{${name}})
+    IF("${VAL}" STREQUAL "0")
+      SET(ADD_WERROR ON)
+    ENDIF()
+    IF("${VAL}" STREQUAL "1")
+      SET(ADD_WERROR OFF)
+    ENDIF()
+  ENDFOREACH()
+  
+  IF(ADD_WERROR)
+#    SET(CMAKE_C_FLAGS "-Werror")
+#    SET(CMAKE_CXX_FLAGS "-Werror")
+  ENDIF()
+ENDIF()
+
+## TODO: remove this ?
+#IF(WIN32)
+#    MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES)
+#    SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE)
+#ELSE()
+#    IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+#      SET(CMAKE_C_FLAGS_DEBUG "-g")
+#      SET(CMAKE_CXX_FLAGS_DEBUG "-g")
+#    ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
+#    IF(CMAKE_BUILD_TYPE STREQUAL Release)
+#      SET(CMAKE_C_FLAGS_RELEASE "-O1 -DNDEBUG")
+#      SET(CMAKE_CXX_FLAGS_RELEASE "-O1 -DNDEBUG")
+#    ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
+#ENDIF()
+
+
+IF(WIN32)
+  ## Windows specific:  
+  ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)  # To disable windows warnings for strcpy, fopen, ...
+  ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)  # To disable windows warnings std::copy, std::transform, ...
+  ADD_DEFINITIONS(-DWNT -DWIN32)
+  ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500)      # Windows 2000 or later API is required
+  ADD_DEFINITIONS(-DPPRO_NT)                  # For medfile
+  #ADD_DEFINITIONS(-D_USE_MATH_DEFINES)        # for MEDMEM
+    
+  SET(PLATFORM_LIBS Ws2_32.lib)
+  LIST(APPEND PLATFORM_LIBS Userenv.lib)      # At least for GEOM suit
+  
+  IF(MACHINE_IS_64)      
+    ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
+    ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators
+    SET(SIZE_OF_LONG "4")                        # set sizeof(long) to 4 byte 
+  ENDIF()
+ELSE()
+  ## Linux specific:
+  SET(PLATFORM_LIBS dl)    # Dynamic loading (dlopen, dlsym)
+ENDIF()
+
+## Apple specific:
+IF(APPLE)
+  SET(CMAKE_C_COMPILER gcc)
+  SET(CMAKE_CXX_COMPILER g++)
+  # because default is clang(llvm) with mountain lion at least
+ENDIF()
+
diff --git a/salome_adm/cmake_files/UseOmniORB.cmake b/salome_adm/cmake_files/UseOmniORB.cmake
new file mode 100644 (file)
index 0000000..1efa8b2
--- /dev/null
@@ -0,0 +1,92 @@
+# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+INSTALL( CODE "
+SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome) # R1 CHECK
+IF(WINDOWS)
+  SET(INSTALL_PYIDL_DIR bin/salome) # R1 CHECK
+ENDIF(WINDOWS)
+
+MACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL MYOMNIORBIDLPYTHON MYIDLPYFLAGS MYIDLFILE MYFULLDIR)
+  FILE(MAKE_DIRECTORY \${MYFULLDIR})
+  STRING(REPLACE \" \" \";\" MYIDLPYFLAGS2 \${MYIDLPYFLAGS})
+  MESSAGE(STATUS \"Compiling \${MYIDLFILE} into \${MYFULLDIR}\")
+  EXECUTE_PROCESS(COMMAND \${MYOMNIORBIDLPYTHON} \${MYIDLPYFLAGS2} -C\${MYFULLDIR} \${MYIDLFILE})
+ENDMACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL)
+")
+
+# This MACRO uses the following vars
+# - OMNIORB_IDL : the idl tool (given by default by FindOMNIORB.cmake)
+# - OMNIORB_IDLCXXFLAGS : the options (include excluded) to give to omniidl generator (given by default by FindOMNIORB.cmake)
+#
+# MYMODULE is a string that will be used to create a target with sources containing *.cc coming from the compilation of ${MYIDLFILES}
+# MYIDLFILES containing all idl files to be compiled.
+# MYIDLCXXFLAGS containing all directories (only directories) where to find *.idl which depend ${MYIDLFILES}.
+# TYPE contains type of the library 
+MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS TYPE)
+  SET(MYSOURCES)
+  FOREACH(input ${MYIDLFILES})
+    GET_FILENAME_COMPONENT(base ${input} NAME_WE)
+#    STRING(REGEX REPLACE ".idl" "" base ${input})
+    SET(OMNIORB_IDLCXXFLAGS2 "${OMNIORB_IDLCXXFLAGS}")
+    SET(src ${CMAKE_CURRENT_BINARY_DIR}/${base}SK.cc)
+    SET(MYSOURCES ${MYSOURCES} ${src})
+    SET(outputs ${src})
+    SET(dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}DynSK.cc)
+    SET(MYSOURCES ${MYSOURCES} ${dynsrc})
+    SET(outputs ${outputs} ${dynsrc})
+    SET(inc ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh)
+    SET(outputs ${outputs} ${inc})
+    GET_FILENAME_COMPONENT(path ${input} PATH)
+    IF(NOT path)
+      SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
+    ENDIF(NOT path)
+    SET(flags ${OMNIORB_IDLCXXFLAGS2})
+    STRING(REGEX MATCH "-bcxx" ISBCXX ${flags})
+    IF(NOT ISBCXX)
+      SET(flags -bcxx ${flags})
+    ENDIF(NOT ISBCXX)
+    FOREACH(f ${MYIDLCXXFLAGS})
+      SET(flags ${flags} "-I${f}")
+    ENDFOREACH(f ${MYIDLCXXFLAGS})
+    ADD_CUSTOM_COMMAND(OUTPUT ${outputs}
+      COMMAND ${OMNIORB_IDL_COMPILER} ${flags} ${input}
+      MAIN_DEPENDENCY ${input})
+    SET(IDLPYFLAGS ${flags})
+    INSTALL(FILES ${input} DESTINATION idl/salome)
+    SET(IDL_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh)
+    INSTALL(FILES ${IDL_HEADER} DESTINATION include/salome)
+    SET(flags)
+    FOREACH(f ${MYIDLCXXFLAGS})
+      SET(flags "${flags} -I${f}")
+    ENDFOREACH(f ${MYIDLCXXFLAGS})
+    STRING(REGEX MATCH "-bpython" ISBPYTHON ${flags})
+    IF(NOT ISBPYTHON)
+      SET(flags "-bpython ${flags}")
+    ENDIF(NOT ISBPYTHON)
+    SET(IDLPYFLAGS ${flags})
+    STRING(REPLACE "\\" "/" IDLPYFLAGS ${IDLPYFLAGS})
+    IF(OMNIORB_PYTHON_BACKEND)
+      SET(IDLPYFLAGS "${IDLPYFLAGS} -p${OMNIORB_PYTHON_BACKEND}")
+      INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_COMPILER}\" \"${IDLPYFLAGS}\" \"${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )")
+    ENDIF(OMNIORB_PYTHON_BACKEND)
+  ENDFOREACH(input ${MYIDLFILES})
+  ADD_LIBRARY(${MYMODULE} ${TYPE} ${MYSOURCES})
+
+ENDMACRO(OMNIORB_ADD_MODULE)
index 64f94d31dec0d2e4aeb9554bd46c7bb350687591..7bc826014034495120562dd1cbcde601d7edab69 100755 (executable)
@@ -39,4 +39,4 @@ SET(DATA
   install_python_from_idl.cmake
   install_and_compile_python_file.cmake
 )
-INSTALL(FILES ${DATA} DESTINATION ${KERNEL_salomeadmcmake}/deprecated)
+INSTALL(FILES ${DATA} DESTINATION ${SALOME_INSTALL_CMAKE}/deprecated)
index cf6ec1cc66a46aa985a76f9f0ddc6e81c4502f46..362eb787445cd4987de56bc72f6cde9205417a49 100755 (executable)
@@ -28,9 +28,9 @@ SET(SALOMEBasics_SOURCES
 )
 
 ADD_LIBRARY(SALOMEBasics ${SALOMEBasics_SOURCES})
-INSTALL(TARGETS SALOMEBasics DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SALOMEBasics EXPORT salomeKernelTargets DESTINATION ${SALOME_INSTALL_LIBS})
 
-TARGET_LINK_LIBRARIES(SALOMEBasics ${CMAKE_THREAD_LIBS_INIT} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEBasics ${PLATFORM_LIBS})
 
 FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 56306f4b2c28fc1ce712244ef31b19d24d5a1f0e..e69cfaf8c735437871ae98ecb8a3653b36197c90 100755 (executable)
@@ -18,4 +18,4 @@
 #
 
 FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 3b355f8186be12810a68f4d55aa7e5ef3b14b939..15d7bcadd8b30559478974d4b1ec9d092349406f 100755 (executable)
@@ -52,11 +52,14 @@ SET(SUBDIR_CORBA
   DSC
 )
 
+SET(SUBDIR_MPI MPIContainer TestMPIContainer)
+SET(SUBDIR_PARALLEL ParallelContainer)
+
+# CppUnit directories:
 SET(SUBDIR_CPPUNIT_BASE
   Basics/Test
   SALOMELocalTrace/Test
 )
-
 SET(SUBDIR_CPPUNIT_CORBA
   Logger/Test
   SALOMETraceCollector/Test
@@ -68,52 +71,32 @@ SET(SUBDIR_CPPUNIT_CORBA
   SALOMEDS/Test
   KernelHelpers/Test
 )
-
 SET(SUBDIR_CPPUNIT_GENERAL UnitTests)
-SET(SUBDIR_MPI MPIContainer TestMPIContainer)
-SET(SUBDIR_PARALLEL ParallelContainer)
 
-IF(WITHONLYLAUNCHER)
+IF(SALOME_LAUNCHER_ONLY)
   SET(SUBDIRS Basics ResourcesManager Launcher)
-ELSE(WITHONLYLAUNCHER)
+ELSE()
   SET(SUBDIRS ${SUBDIR_BASE})
-ENDIF(WITHONLYLAUNCHER)
-
-IF(SALOME_USE_CORBA)
-  SET(SUBDIRS ${SUBDIRS} ${SUBDIR_CORBA})
-ENDIF(SALOME_USE_CORBA)
+  IF(NOT SALOME_LIGHT_ONLY)
+    LIST(APPEND SUBDIRS ${SUBDIR_CORBA})
+  ENDIF()
 
-IF(SALOME_USE_MPI)
-  SET(SUBDIRS
-    ${SUBDIRS}
-    ${SUBDIR_MPI}
-  )
+  IF(SALOME_USE_MPI)
+    LIST(APPEND SUBDIRS ${SUBDIR_MPI})
 ENDIF(SALOME_USE_MPI)
 
-IF(CPPUNIT_IS_OK)
-  IF(SALOME_USE_CORBA)
-    SET(SUBDIRS
-      ${SUBDIRS}
-      ${SUBDIR_CPPUNIT_BASE}
-      ${SUBDIR_CPPUNIT_CORBA}
-      ${SUBDIR_CPPUNIT_GENERAL}
-    )
-  ELSE(SALOME_USE_CORBA)
-    SET(SUBDIRS
-      ${SUBDIRS}
-      ${SUBDIR_CPPUNIT_BASE}
-      ${SUBDIR_CPPUNIT_GENERAL}
-    )
-  ENDIF(SALOME_USE_CORBA)
-ENDIF(CPPUNIT_IS_OK)
+IF(SALOME_BUILD_TESTS)
+  LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_BASE} ${SUBDIR_CPPUNIT_GENERAL})
+  IF(NOT SALOME_LIGHT_ONLY)
+    LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_CORBA})
+    ENDIF()
+  ENDIF()
 
-IF(WITH_PACO_PARALLEL)
-  SET(SUBDIRS
-    ${SUBDIRS}
-    ${SUBDIR_PARALLEL}
-  )
-ENDIF(WITH_PACO_PARALLEL)
+  IF(SALOME_PACO_PARALLEL)
+    LIST(APPEND SUBDIRS  ${SUBDIR_PARALLEL})
+  ENDIF()
+ENDIF()
 
-FOREACH(DIR ${SUBDIRS})
-  ADD_SUBDIRECTORY(${DIR})
-ENDFOREACH(DIR ${SUBDIRS})
+FOREACH(_dir ${SUBDIRS})
+  ADD_SUBDIRECTORY(${_dir})
+ENDFOREACH()
index 766720401063fe55eedeb88611ebb325e7c90c9f..3cf617e7179f3f8413350f5ebffde2bac0fbbf71 100755 (executable)
@@ -18,7 +18,6 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${PTHREAD_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
   ${MPI_CXX_INCLUDE_PATH}
   ${PYTHON_INCLUDE_DIRS}
@@ -51,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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeCommunication DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET(COMMON_HEADERS_HXX
   MatrixClient.hxx
@@ -66,4 +65,4 @@ SET(COMMON_HEADERS_HXX
   SenderFactory.hxx
 )
 
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 82f2f5df8b4965afb37a5331eccede2b043fa743..eb35c76bdb43e739ff5e63798dea58ec21f46cef 100755 (executable)
@@ -59,5 +59,5 @@ ENDIF(${MACHINE} STREQUAL WINDOWS)
 
 ADD_DEPENDENCIES(_libSALOME_Comm SalomeIDLKernel)
 
-INSTALL(TARGETS _libSALOME_Comm DESTINATION ${KERNEL_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${KERNEL_salomepythondir})
+INSTALL(TARGETS _libSALOME_Comm DESTINATION ${SALOME_INSTALL_PYTHON})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${SALOME_INSTALL_PYTHON})
index 3c5107c9b153574be7d84113b05374e3a81f368e..924b65a076f2d82778af175f25fa06561648ba71 100644 (file)
@@ -32,7 +32,7 @@
   #include "SenderFactory.hxx"
 %}
 
-%typemap(python,in) SALOME::SenderDouble_ptr
+%typemap(in) SALOME::SenderDouble_ptr
 {
   PyObject* pdict = PyDict_New();
   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
@@ -62,7 +62,7 @@
   $1 = t;
 }
 
-%typemap(python,in) SALOME::SenderInt_ptr
+%typemap(in) SALOME::SenderInt_ptr
 {
   PyObject* pdict = PyDict_New();
   PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
@@ -92,7 +92,7 @@
   $1 = t;
 }
 
-%typemap(python,out) SALOME::SenderDouble_ptr
+%typemap(out) SALOME::SenderDouble_ptr
 {  
    PyObject* pdict = PyDict_New();
    PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
    $result = PyObject_CallMethod(orb, (char*)"string_to_object", (char*)"O", tmp);
 }
 
-%typemap(python,out) SALOME::SenderInt_ptr
+%typemap(out) SALOME::SenderInt_ptr
 {  
    PyObject* pdict = PyDict_New();
    PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins());
index 5847e3732c11a6e833fea5831f86a4f22bbd4c09..9a3c6f477cb19df8961f3ccd36d9f3f678e6e62f 100755 (executable)
@@ -18,8 +18,8 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${PTHREAD_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
+  ${PTHREAD_INCLUDE_DIR}
   ${HDF5_INCLUDE_DIRS}
   ${LIBXML2_INCLUDE_DIR}
   ${PYTHON_INCLUDE_DIRS}
@@ -67,13 +67,13 @@ IF(WITH_MPI_SEQ_CONTAINER)
   )
 ENDIF(WITH_MPI_SEQ_CONTAINER)
 
-IF(WITH_PACO_PARALLEL)
+IF(SALOME_PACO_PARALLEL)
   ADD_DEFINITIONS(-DWITH_PACO_PARALLEL ${PACO_DEFINITIONS})
   SET(COMMON_LIBS
     ${COMMON_LIBS}
     ${PACO_LIBS}
   )
-ENDIF(WITH_PACO_PARALLEL)
+ENDIF()
 
 SET(SalomeContainer_SOURCES
   Component_i.cxx
@@ -86,26 +86,27 @@ SET(SalomeContainer_SOURCES
 )
 
 ADD_LIBRARY(SalomeContainer ${SalomeContainer_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeContainer ${COMMON_LIBS})
-INSTALL(TARGETS SalomeContainer DESTINATION ${KERNEL_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(SalomeContainer ${COMMON_LIBS} ${PTHREAD_LIBRARIES})
+INSTALL(TARGETS SalomeContainer DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET(SALOME_Container_LIBS
   SalomeContainer
   SALOMEBasics
   ${COMMON_LIBS}
   ${HDF5_LIBRARIES}
+  ${MPI_LIBRARIES}
 )
 
 ADD_EXECUTABLE(SALOME_Container SALOME_Container.cxx SALOME_Container_SignalsHandler.cxx)
 TARGET_LINK_LIBRARIES(SALOME_Container ${SALOME_Container_LIBS})
 
-IF(SALOME_USE_TEST)
+IF(SALOME_BUILD_TESTS)
   ADD_EXECUTABLE(TestSalome_file TestSalome_file.cxx)
   TARGET_LINK_LIBRARIES(TestSalome_file SALOMETraceCollectorTest ${SALOME_Container_LIBS})
-ENDIF(SALOME_USE_TEST)
-INSTALL(TARGETS SALOME_Container DESTINATION ${KERNEL_salomebin_BINS})
+ENDIF()
+INSTALL(TARGETS SALOME_Container DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 14090dad83f37d77530c92af985393c28dcfa878..2ddd3a6eb1706fd89f2970aad49044870ec9d686 100755 (executable)
@@ -32,11 +32,11 @@ SET(DF_SOURCES
 )
 
 ADD_LIBRARY(DF ${DF_SOURCES})
-INSTALL(TARGETS DF DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS DF DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(testDF testDF.cxx)
 TARGET_LINK_LIBRARIES(testDF DF)
-INSTALL(TARGETS testDF DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS testDF DESTINATION ${SALOME_INSTALL_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 0dfb61338926174402f96428c01a472e0794dcc7..1dfb7dbe7221d50cd05edac16cae9eaa9b2d799b 100755 (executable)
@@ -28,11 +28,11 @@ IF(NOT WINDOWS)
   )
 ENDIF(NOT WINDOWS)
 
-IF(WITH_PACO_PARALLEL)
+IF(SALOME_PACO_PARALLEL)
   SET(SUBDIR_PAR
     ParallelDSC
   )
-ENDIF(WITH_PACO_PARALLEL)
+ENDIF()
 
 SET(SUBDIRS
   ${SUBDIRS_COMMON}
index 87c9437d76d5c6b92a775d71263a78ab3b5dd514..ae453c04d95b99e2db87beb9a4914b6a4cd0604d 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeDSCContainer 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 ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS SALOME_ConnectionManagerServer DESTINATION ${SALOME_INSTALL_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index c394e817a68410cd7ca0734c4d60b09122e462b0..7030cb9c261a24bbc635419fce9da3648198c514 100755 (executable)
@@ -57,10 +57,10 @@ SET(_calcium_LIBS
 
 SWIG_ADD_MODULE(calcium python calcium.i)
 SWIG_LINK_LIBRARIES(calcium ${_calcium_LIBS})
-INSTALL(TARGETS _calcium DESTINATION ${KERNEL_salomepythondir})
+INSTALL(TARGETS _calcium DESTINATION ${SALOME_INSTALL_PYTHON})
 
 SET(SCRIPTS
   dsccalcium.py
 )
-SALOME_INSTALL_SCRIPTS( ${SCRIPTS} ${KERNEL_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/calcium.py DESTINATION ${KERNEL_salomepythondir})
+SALOME_INSTALL_SCRIPTS( ${SCRIPTS} ${SALOME_INSTALL_PYTHON})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/calcium.py DESTINATION ${SALOME_INSTALL_PYTHON})
index 5fff9e825a900c491c11ac5c37aefdf941f64b47..4c44968b99d0526b0362f3fdea6eabc8ab14e37b 100755 (executable)
@@ -19,6 +19,7 @@
 
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR}
+  ${PTHREAD_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/idl
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
@@ -39,7 +40,7 @@ SET(SalomeDSCSupervBasic_SOURCES
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 ADD_LIBRARY(SalomeDSCSupervBasic ${SalomeDSCSupervBasic_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeDSCSupervBasic SalomeDSCSuperv)
-INSTALL(TARGETS SalomeDSCSupervBasic DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeDSCSupervBasic DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 247743b1202eff13661637551fd24e58121e373d..6811ab425e710164cbab87f9327539696c31d457 100755 (executable)
@@ -45,10 +45,11 @@ SET(SalomeDSCSuperv_SOURCES
 
 ADD_LIBRARY(SalomeDSCSuperv ${SalomeDSCSuperv_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeDSCSuperv SalomeDSCContainer ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeDSCSuperv DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeDSCSuperv DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(test_DSC_Exception test_DSC_Exception.cxx)
-TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace 
+    ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS} ${PTHREAD_LIBRARIES})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 30e6916e6b5684f18d69e641220440e4b1e44797..4087321ad07fea1e46d7428ee932ebf2ca543853 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeDatastream DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET(COMMON_HEADERS_HXX
   AdjacentFunctor.hxx
@@ -56,4 +56,4 @@ SET(COMMON_HEADERS_HXX
   IteratorTraits.hxx
 )
 
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index a991ca8fc6d3e87ba603dfeab357f729c6a6a943..94c2baa4edeed9534d8d01432bbf25f9f5e014a0 100755 (executable)
@@ -56,9 +56,9 @@ SET(SalomeCalcium_SOURCES
 ADD_DEFINITIONS(${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
 ADD_LIBRARY(SalomeCalcium ${SalomeCalcium_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeCalcium SalomeDSCSuperv SalomeContainer ${CMAKE_THREAD_LIBS_INIT} ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SalomeCalcium SalomeDSCSuperv SalomeContainer ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
 
-INSTALL(TARGETS SalomeCalcium DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeCalcium 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS CalciumC 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})
@@ -114,4 +114,4 @@ SET(COMMON_HEADERS
   ${CMAKE_CURRENT_BINARY_DIR}/CalciumProvidesPort.hxx
   ${CMAKE_CURRENT_BINARY_DIR}/calcium_integer_port_uses.hxx
 )
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
index e3c93eaaee1cda7d0de1f522a8cc04fe9a1e0399..72c04e20d55fccdf1f216d88021846f892ba140c 100644 (file)
@@ -24,6 +24,7 @@
 #include "calciumf.h"
 #include "CalciumFortranInt.h"
 #include <stdio.h>
+#include <omniconfig.h>   // to get SIZEOF_LONG
 
 #ifdef __cplusplus
 extern "C" {
index 887784f3d605b61c0e54bdeaf00a96903424e61f..d5abec22f30b45fe9106f1c2ca9ce32dcaf9ea53 100755 (executable)
@@ -38,12 +38,12 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 ADD_LIBRARY(SalomePalm palm_port_factory.cxx)
 TARGET_LINK_LIBRARIES(SalomePalm SalomeDSCSuperv ${OMNIORB_LIBRARIES})
 
-INSTALL(TARGETS SalomePalm DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomePalm DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(test_DataIdContainer_Palm test_DataIdContainer.cxx)
 ADD_DEPENDENCIES(test_DataIdContainer_Palm SalomeIDLKernel)
 TARGET_LINK_LIBRARIES(test_DataIdContainer_Palm ${OMNIORB_LIBRARIES})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
 
index 41b58b4d3fd617bce2e44c20dcabc04c9ecfa922..1bd293567a0b5e458edb841aa542f253a8bcb4aa 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeParallelDSCContainer DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 5fa40f80c06a8505c732a7b54fffdfaa581beabf..ee80444e9c017ce320765afb9f90c0171b61b7c4 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeGenericObj DESTINATION ${SALOME_INSTALL_LIBS})
 
-INSTALL(FILES SALOME_GenericObj_i.hh SALOME_GenericObj_wrap.hxx DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES SALOME_GenericObj_i.hh SALOME_GenericObj_wrap.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
 
index b6dee8df2d6a3b21e39709159a6b5013ed1f8bc6..2bb89502576521b00aa3a9d4d8d92eafcef4fdb5 100755 (executable)
 
 INCLUDE_DIRECTORIES(
   ${HDF5_INCLUDE_DIRS}
+  ${MPI_INCLUDE_DIRS}
 )
 
-
 FILE(GLOB SalomeHDFPersist_SOURCES_C "${CMAKE_CURRENT_SOURCE_DIR}/HDF*.c")
 FILE(GLOB SalomeHDFPersist_SOURCES_CC "${CMAKE_CURRENT_SOURCE_DIR}/HDF*.cc")
 SET(SalomeHDFPersist_SOURCES ${SalomeHDFPersist_SOURCES_C} ${SalomeHDFPersist_SOURCES_CC})
 ADD_DEFINITIONS(${HDF5_DEFINITIONS})
 
 ADD_LIBRARY(SalomeHDFPersist ${SalomeHDFPersist_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBRARIES} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeHDFPersist DESTINATION ${KERNEL_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${PLATFORM_LIBS})
+INSTALL(TARGETS SalomeHDFPersist DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
@@ -37,4 +37,4 @@ SET(COMMON_HEADERS
   ${COMMON_HEADERS_HXX}
   ${COMMON_HEADERS_H}
 )
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
index b3d4ca39e14feca6d54d8c5c74d70b2da82292f4..760e322039c7c5022bf0712927c97db9b6cda15b 100755 (executable)
@@ -25,8 +25,7 @@ SET(salomepython_PYTHON
   omnipatch.py
 )
 
-IF(SALOME_USE_CORBA)
-  SET(salomepython_PYTHON
+SET(salomepython_PYTHON
     ${salomepython_PYTHON}
     Help.py
     PyInterp.py
@@ -42,8 +41,7 @@ IF(SALOME_USE_CORBA)
     salome_pynode.py
     salome_genericobj.py
   )
-ENDIF(SALOME_USE_CORBA)
 
-SALOME_INSTALL_SCRIPTS("${salomepython_PYTHON}" ${KERNEL_salomepythondir})
-SALOME_INSTALL_SCRIPTS(kernel_shared_modules.py ${KERNEL_sharedpkgpython_PYTHON})
-SALOME_INSTALL_SCRIPTS(__init__.py ${KERNEL_salomepythondir}/salome)
+SALOME_INSTALL_SCRIPTS("${salomepython_PYTHON}" ${SALOME_INSTALL_PYTHON})
+SALOME_INSTALL_SCRIPTS(kernel_shared_modules.py ${SALOME_INSTALL_PYTHON_SHARED})
+SALOME_INSTALL_SCRIPTS(__init__.py ${SALOME_INSTALL_PYTHON}/salome)
index bad4e662c856f3be6df4d3acebe23e3b38d27c8e..8689aa9b9bfeae7dabd3dbf4041e2449c388e2a8 100755 (executable)
@@ -45,5 +45,5 @@ SET(mypkgpython_PYTHON
     studyedit.py
     services.py
 )
-SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${KERNEL_salomepythondir}/salome/kernel)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/logconfig.py DESTINATION ${KERNEL_salomepythondir}/salome/kernel)
\ No newline at end of file
+SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/kernel)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/logconfig.py DESTINATION ${SALOME_INSTALL_PYTHON}/salome/kernel)
\ No newline at end of file
index 39cdba399296caf2c6ed312a77a71a632d2be0f6..aea3fd4eeeb14f1090efa006a5cdc539ef1332bf 100755 (executable)
@@ -25,4 +25,4 @@ SET(mypkgpython_PYTHON
 )
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${KERNEL_salomepythondir}/salome/kernel/parametric)
+SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/kernel/parametric)
index 17003030c541d092ac5b56c7858beaee3331beeb..20e8550e7a558fdd6dbd2e0667be725bda3df4a6 100755 (executable)
@@ -55,11 +55,11 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
 ADD_LIBRARY(SalomeKernelHelpers ${SalomeKernelHelpers_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
-INSTALL(TARGETS SalomeKernelHelpers DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeKernelHelpers DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(KernelHelpersUseCases KernelHelpersUseCases.cxx)
 TARGET_LINK_LIBRARIES(KernelHelpersUseCases SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
-INSTALL(TARGETS KernelHelpersUseCases DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS KernelHelpersUseCases DESTINATION ${SALOME_INSTALL_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index ade92585bc36384d2360ce460503ec63ad100265..bf348765ab399689790dfd1af787187d5a785f85 100755 (executable)
@@ -35,7 +35,7 @@ INCLUDE_DIRECTORIES(
 )
 
 SET(SalomeKernelHelpersTest_LIBS
-  ${CPPUNIT_LIBS}
+  ${CPPUNIT_LIBRARIES}
   SalomeKernelHelpers
   ${OMNIORB_LIBRARIES}
   SalomeNS
@@ -53,15 +53,15 @@ ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
 ADD_LIBRARY(SalomeKernelHelpersTest KernelHelpersUnitTests.cxx)
 TARGET_LINK_LIBRARIES(SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
-INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(TestKernelHelpers TestKernelHelpers.cxx)
 TARGET_LINK_LIBRARIES(TestKernelHelpers SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
 ADD_TEST(TestKernelHelpers TestKernelHelpers)
-INSTALL(TARGETS TestKernelHelpers DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestKernelHelpers DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestKernelHelpers.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestKernelHelpers.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 5d74e2dc30d42527e73a64b01b55631c700487be..55c3399c2d287de95701acd779661f25c357aca4 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS Launcher DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET(TestLauncher_LIBS
   ${LIBXML2_LIBRARIES}
@@ -84,12 +84,12 @@ SET(TestLauncher_LIBS
 
 ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
 TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS})
-INSTALL(TARGETS TestLauncher DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestLauncher DESTINATION ${SALOME_INSTALL_BINS})
 
-IF(NOT WITHONLYLAUNCHER)
+IF(NOT SALOME_LAUNCHER_ONLY)
   ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx)
   TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
-  INSTALL(TARGETS SalomeLauncher DESTINATION ${KERNEL_salomelib_LIBS})
+  INSTALL(TARGETS SalomeLauncher DESTINATION ${SALOME_INSTALL_LIBS})
   
   SET(SALOME_LauncherServer_LIBS
     Launcher
@@ -103,12 +103,10 @@ IF(NOT WITHONLYLAUNCHER)
     ${PYTHON_LIBRARIES}
   )
 
-  
-
   ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
   TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
-  INSTALL(TARGETS SALOME_LauncherServer DESTINATION ${KERNEL_salomebin_BINS})
-ENDIF(NOT WITHONLYLAUNCHER)
+  INSTALL(TARGETS SALOME_LauncherServer DESTINATION ${SALOME_INSTALL_BINS})
+ENDIF()
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 3c607d4768f82a1aa4ca85ab4918deb1cfc1ec3e..e3c545cb48d0a072b7f12f5f7ae6ec492a4df55e 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeLifeCycleCORBA DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(Test_LifeCycleCORBA Test_LifeCycleCORBA.cxx)
 TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
@@ -60,7 +60,7 @@ TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNo
 ADD_EXECUTABLE(TestContainerManager TestContainerManager.cxx)
 TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 
-INSTALL(TARGETS Test_LifeCycleCORBA TestContainerManager DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS Test_LifeCycleCORBA TestContainerManager DESTINATION ${SALOME_INSTALL_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 5ab47b61eb9920a5e58d1d634ed9c5fee361434d..032d133de126c2649b08f318d15e6a30b703c414 100755 (executable)
@@ -38,7 +38,7 @@ INCLUDE_DIRECTORIES(
 )
 
 SET(COMMON_LIBS
-  ${CPPUNIT_LIBS}
+  ${CPPUNIT_LIBRARIES}
   SALOMEBasics
   SalomeResourcesManager
   SalomeContainer
@@ -59,14 +59,14 @@ ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
 ADD_LIBRARY(LifeCycleCORBATest LifeCycleCORBATest.cxx)
 TARGET_LINK_LIBRARIES(LifeCycleCORBATest ${COMMON_LIBS})
-INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(TestLifeCycleCORBA TestLifeCycleCORBA.cxx)
 TARGET_LINK_LIBRARIES(TestLifeCycleCORBA LifeCycleCORBATest NamingServiceTest SalomeLifeCycleCORBA ${COMMON_LIBS})
-INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestLifeCycleCORBA.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestLifeCycleCORBA.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 5507ccd76534fec87cd2b7cb59f1e2738e086050..b66c7396f78e780f2d4ddb78986da35af3cf2000 100755 (executable)
@@ -46,10 +46,10 @@ IF(${MACHINE} STREQUAL WINDOWS)
   SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_LifeCycleCORBA_d)
 ENDIF(${MACHINE} STREQUAL WINDOWS)
 
-INSTALL(TARGETS _libSALOME_LifeCycleCORBA DESTINATION ${KERNEL_salomepythondir})
+INSTALL(TARGETS _libSALOME_LifeCycleCORBA DESTINATION ${SALOME_INSTALL_PYTHON})
 SET(SCRIPTS
   LifeCycleCORBA.py 
   TestLifeCycleCORBA.py 
 )
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_LifeCycleCORBA.py DESTINATION ${KERNEL_salomepythondir})
+SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_LifeCycleCORBA.py DESTINATION ${SALOME_INSTALL_PYTHON})
index 7e1daaabd68190579ec8797db8861caf8297c8bf..8ab7ed9bf0b4ac7803ba9912b2ed9e61f265b766 100755 (executable)
@@ -25,4 +25,4 @@ SET(SCRIPTS
   TestLifeCycleCORBA_SWIG.py
 )
 
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
index e1a97e984d20a69fb7dc7595ee7ed3cf94fb0e4a..d2c9d8c7ffa733fc43781abaffe800cc41c9c35c 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeLoggerServer DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET(SALOME_Logger_Server_SOURCES
   SALOME_Logger_Server_main.cxx
@@ -43,9 +43,9 @@ 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 ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS SALOME_Logger_Server DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(SALOME_Trace.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(SALOME_Trace.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
-INSTALL(FILES SALOME_Trace.hxx DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES SALOME_Trace.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
index e1434ba7cb930dc27ee208836d21ce8806dea816..53dbbfbe928e809f9d0d561d1a21dedfa6f91e39 100755 (executable)
@@ -18,4 +18,4 @@
 #
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestKiller.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestKiller.py ${SALOME_INSTALL_SCRIPT_PYTHON})
index aa3c2547922ba42f9c282e479e37a3b1c790bba7..01ec296b4d58ea07ccf709dfa358b82705e15c85 100755 (executable)
@@ -19,6 +19,7 @@
 
 INCLUDE_DIRECTORIES(
   ${MPI_CXX_INCLUDE_PATH}
+  ${PTHREAD_INCLUDE_DIR}
   ${PYTHON_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
@@ -52,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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeMPIContainer DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(SALOME_MPIContainer SALOME_MPIContainer.cxx)
 TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES})
@@ -60,9 +61,9 @@ 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 ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS SALOME_MPIContainer testMPI2 DESTINATION ${SALOME_INSTALL_BINS})
 
-INSTALL(FILES launch_testMPI2.csh DESTINATION ${KERNEL_salomescript_SCRIPTS})
+INSTALL(FILES launch_testMPI2.csh DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 5d0bce9f2b668c7111a8253e98cd06912f976f40..187d3a076a1c3d63ca8052387e271037d8853d6a 100755 (executable)
@@ -37,6 +37,7 @@ SET(COMMON_LIBS
   SALOMEBasics
   SalomeIDLKernel
   ${LIBXML2_LIBRARIES}
+  ${PTHREAD_LIBRARIES}
 )
 
 SET(SalomeCatalog_SOURCES
@@ -49,7 +50,7 @@ ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
 ADD_LIBRARY(SalomeCatalog ${SalomeCatalog_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeCatalog ${COMMON_LIBS})
-INSTALL(TARGETS SalomeCatalog DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeCatalog DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Server.cxx)
 TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
@@ -57,10 +58,10 @@ 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 ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestModuleCatalog.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestModuleCatalog.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 1724b4eaac2dafdd7e34f9e8fc3ed29c99ebe5d6..d8813bd3002787bac9c4cdc5157593b89e323c21 100755 (executable)
@@ -22,4 +22,4 @@ CONFIGURE_FILE(testIDLparser.in testIDLparser @ONLY)
 # ===============================================================
 # Files to be installed
 # ===============================================================
-SALOME_INSTALL_SCRIPTS(IDLparser.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(IDLparser.py ${SALOME_INSTALL_SCRIPT_PYTHON})
index 22f237d9915e6e1cbf8ab428269f14bdda1a056e..d3dd28d9bd3f7f3fda4ea9f72271e7368f11c762 100755 (executable)
@@ -34,6 +34,9 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
   )
 
+# SWIG module name differs from file name - avoid unnecessary rebuild: 
+SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_MODULE_NAME libNOTIFICATION)
+
 SWIG_ADD_MODULE(libNOTIFICATION python NOTIFICATION.i NOTIFICATION_Swig.cxx)
 SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBRARIES} SalomeNotification)
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
@@ -42,8 +45,8 @@ IF(${MACHINE} STREQUAL WINDOWS)
   SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES DEBUG_OUTPUT_NAME _libNOTIFICATION_d)
 ENDIF(${MACHINE} STREQUAL WINDOWS)
 
-INSTALL(TARGETS _libNOTIFICATION DESTINATION ${KERNEL_salomepythondir})
+INSTALL(TARGETS _libNOTIFICATION DESTINATION ${SALOME_INSTALL_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${COMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libNOTIFICATION.py DESTINATION ${KERNEL_salomepythondir})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libNOTIFICATION.py DESTINATION ${SALOME_INSTALL_PYTHON})
index 8f2dd10c8259108446d21d5fdbc00542aed876bf..9c949bfdd28f8225612850b8187f49f0b4dc0d75 100755 (executable)
@@ -39,10 +39,10 @@ ADD_LIBRARY(SalomeNS ${SalomeNS_SOURCES})
 ADD_DEPENDENCIES(SalomeNS SalomeIDLKernel)
 TARGET_LINK_LIBRARIES(SalomeNS OpUtil)
 
-INSTALL(TARGETS SalomeNS DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeNS DESTINATION ${SALOME_INSTALL_LIBS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(SALOME_NamingServicePy.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(SALOME_NamingServicePy.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 09d4d869e5fe81972b0522bbbf5cb1b33937cb1b..63a009fcb73adc83be053509277412dd70bb547b 100755 (executable)
@@ -36,7 +36,7 @@ INCLUDE_DIRECTORIES(
 
 # This local variable defines the list of dependant libraries common to all target in this package.
 SET(COMMON_LIBS
-    ${CPPUNIT_LIBS}
+    ${CPPUNIT_LIBRARIES}
     SalomeNS
     SalomeLifeCycleCORBA
     ${OMNIORB_LIBRARIES}
@@ -47,7 +47,7 @@ ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
 ADD_LIBRARY(NamingServiceTest NamingServiceTest.cxx)
 TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS})
-INSTALL(TARGETS NamingServiceTest DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS NamingServiceTest DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET(TestNamingService_LIBS
   NamingServiceTest
@@ -64,10 +64,10 @@ SET(TestNamingService_LIBS
 
 ADD_EXECUTABLE(TestNamingService TestNamingService.cxx)
 TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS})
-INSTALL(TARGETS TestNamingService DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestNamingService DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestNamingService.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestNamingService.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index cbf472e9db3609ca444dc38a56a2c30380334814..165b00feea42601d5c271566eaeb41043fb8bd30 100755 (executable)
@@ -43,8 +43,8 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
 
 ADD_LIBRARY(SalomeNotification ${SalomeNotification_SOURCES}) 
 TARGET_LINK_LIBRARIES(SalomeNotification ${COMMON_LIBS})
-INSTALL(TARGETS SalomeNotification DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeNotification DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 SET(COMMON_HEADERS ${COMMON_HEADERS_HXX} CosNotifyShorthands.h)
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
index e81da59cb5697cbc8b8cf0a9c8163ac76e5df31a..b411598ab8acef70430e625637ee7acc64c38bb8 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS Registry DESTINATION ${SALOME_INSTALL_LIBS})
 
 IF(SALOME_USE_MPI)
   SET(SALOME_ParallelContainerProxyMpi_LIBS
@@ -80,7 +80,7 @@ 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 ${KERNEL_salomebin_BINS})
+  INSTALL(TARGETS SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerNodeMpi DESTINATION ${SALOME_INSTALL_BINS})
 ENDIF(SALOME_USE_MPI)
 
 SET(SALOME_ParallelContainerProxyDummy_LIBS
@@ -96,8 +96,8 @@ TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyDummy ${SALOME_ParallelContai
 ADD_EXECUTABLE(SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerNodeDummy.cxx)
 TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
 
-INSTALL(TARGETS SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerProxyDummy DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerProxyDummy DESTINATION ${SALOME_INSTALL_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
 
index 53395b6f881c1027f93bb4745548e868641e97d2..3423d916894167c3eafb6cd0189e384617918a9b 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS Registry DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET(SALOME_Registry_Server_LIBS
  SalomeIDLKernel
@@ -41,11 +41,12 @@ SET(SALOME_Registry_Server_LIBS
  SALOMELocalTrace
  SALOMEBasics
  ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
 )
 
 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 ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS SALOME_Registry_Server DESTINATION ${SALOME_INSTALL_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 29261cf9f23e89d9fade036499adc899c802cd89..90c542519eb5e455e850696d8deae5371b7c48c3 100755 (executable)
@@ -50,13 +50,13 @@ 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS ResourcesManager DESTINATION ${SALOME_INSTALL_LIBS})
 
-IF(NOT WITHONLYLAUNCHER)
+IF(NOT SALOME_LAUNCHER_ONLY)
   ADD_LIBRARY(SalomeResourcesManager SALOME_ResourcesManager.cxx)
   TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS})
-  INSTALL(TARGETS SalomeResourcesManager DESTINATION ${KERNEL_salomelib_LIBS})
-ENDIF(NOT WITHONLYLAUNCHER)
+  INSTALL(TARGETS SalomeResourcesManager DESTINATION ${SALOME_INSTALL_LIBS})
+ENDIF()
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 018ca842a9496ace4b0ac39022ec8d545afcebea..43b9c7722c9c9799f87630609d7d70cf7d97a9bb 100755 (executable)
@@ -146,7 +146,7 @@ SET(SalomeDS_SOURCES
 
 ADD_LIBRARY(SalomeDS ${SalomeDS_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeDS ${COMMON_LIBS})
-INSTALL(TARGETS SalomeDS DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeDS DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(SALOMEDS_Server SALOMEDS_Server.cxx)
 TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
@@ -154,10 +154,10 @@ 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 ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS SALOMEDS_Server SALOMEDS_Client DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(SALOME_DriverPy.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(SALOME_DriverPy.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 SET(COMMON_HEADERS_HXX 
   SALOMEDS_StudyManager_i.hxx
@@ -176,4 +176,4 @@ SET(COMMON_HEADERS_HXX
   SALOMEDS_wrap.hxx
   SALOMEDS_Attributes_wrap.hxx
 )
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 8d89af412de47dd71e8bb9c7cfa59f0754935da0..79b0ae8c18b24bb50c788a97585af6c2fb8e195a 100755 (executable)
@@ -44,7 +44,7 @@ INCLUDE_DIRECTORIES(
 
 # This local variable defines the list of dependant libraries common to all target in this package.
 SET(COMMON_LIBS
- ${CPPUNIT_LIBS}
+ ${CPPUNIT_LIBRARIES}
  SALOMEBasics
  SalomeResourcesManager
  SalomeContainer
@@ -72,14 +72,14 @@ ENDIF(WINDOWS)
 
 ADD_LIBRARY(SALOMEDSTest SALOMEDSTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMEDSTest DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SALOMEDSTest DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(TestSALOMEDS TestSALOMEDS.cxx)
 TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS TestSALOMEDS DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestSALOMEDS DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMEDS.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestSALOMEDS.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 15700b0ba80bba56d46304b7415a5e5d7e63ec36..08f44c0f45799da388ce1120082b7f780a79bc5c 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeDSClient DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 805a1c0367d209db6df7c12e27e37d34b4a1d843..9a22e8c43f6784ea6f5e4ee005a3acf67b20173b 100755 (executable)
@@ -94,11 +94,11 @@ SET(SalomeDSImpl_SOURCES
 
 ADD_LIBRARY(SalomeDSImpl ${SalomeDSImpl_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeDSImpl DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeDSImpl DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(testDS testDS.cxx)
 TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS testDS DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS testDS DESTINATION ${SALOME_INSTALL_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 SET(NOINST_HEADERS_HXX
@@ -108,4 +108,4 @@ SET(NOINST_HEADERS_HXX
 FOREACH(HEADER ${NOINST_HEADERS_HXX})
   LIST(REMOVE_ITEM COMMON_HEADERS_HXX ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER})
 ENDFOREACH(HEADER ${NOINST_HEADERS_HXX})
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index c91f5aeb5d8da97730d98b00b70151eac87087a8..521526e41d26fa87b8eb4a16a84386e55e51cb56 100644 (file)
@@ -50,7 +50,7 @@
 #endif
 
 
-bool Exists(const std::string thePath) 
+bool SALOMEDS_Exists(const std::string thePath)
 {
 #ifdef WIN32 
   if (  GetFileAttributes (  thePath.c_str()  ) == 0xFFFFFFFF  ) { 
@@ -106,8 +106,8 @@ std::string SALOMEDSImpl_Tool::GetTmpDir()
 
   std::string aDir = aTmpDir;
   
-  if(Exists(aDir)) {
-    for(aRND = 0; Exists(aDir); aRND++) {
+  if(SALOMEDS_Exists(aDir)) {
+    for(aRND = 0; SALOMEDS_Exists(aDir); aRND++) {
       sprintf(buffer, "%d", aRND);
       aDir = aTmpDir+buffer;  //Build a unique directory name
     }
@@ -143,7 +143,7 @@ void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const std::string& theDirectory,
   for(i=1; i<=aLength; i++) {
     std::string aFile(aDirName);
     aFile += theFiles[i-1];
-    if(!Exists(aFile)) continue;
+    if(!SALOMEDS_Exists(aFile)) continue;
 
 #ifdef WIN32
     DeleteFile(aFile.c_str());
@@ -153,7 +153,7 @@ void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const std::string& theDirectory,
   }
 
   if(IsDirDeleted) {
-    if(Exists(aDirName)) {
+    if(SALOMEDS_Exists(aDirName)) {
 #ifdef WIN32
       RemoveDirectory(aDirName.c_str());
 #else
index 110833dff8d19c524a093e0265edd6a348942712..2d4c1e7baae4272c0b9dbd75955d2d78d8c3505f 100755 (executable)
@@ -40,7 +40,7 @@ INCLUDE_DIRECTORIES(
 
 # This local variable defines the list of dependant libraries common to all target in this package.
 SET(COMMON_LIBS
-  ${CPPUNIT_LIBS}
+  ${CPPUNIT_LIBRARIES}
   SALOMEBasics
   SalomeResourcesManager
   SalomeContainer
@@ -62,14 +62,14 @@ ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITION
 
 ADD_LIBRARY(SALOMEDSImplTest SALOMEDSImplTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMEDSImplTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(TestSALOMEDSImpl TestSALOMEDSImpl.cxx)
 TARGET_LINK_LIBRARIES(TestSALOMEDSImpl SALOMEDSImplTest SalomeDSImpl NamingServiceTest ${COMMON_LIBS})
-INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMEDSImpl.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestSALOMEDSImpl.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 4a7259b1f0b6acc4ccf4113001cd92f02e2525bc..b061b3db22d8d8c2d98bf28bdda037fac7a4be67 100755 (executable)
@@ -18,6 +18,7 @@
 #
 
 INCLUDE_DIRECTORIES(
+  ${PTHREAD_INCLUDE_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
 )
 
@@ -41,7 +42,7 @@ SET(SALOMELocalTrace_SOURCES
 )
 
 ADD_LIBRARY(SALOMELocalTrace ${SALOMELocalTrace_SOURCES})
-TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${CMAKE_THREAD_LIBS_INIT})
-INSTALL(TARGETS SALOMELocalTrace DESTINATION ${KERNEL_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBRARIES})
+INSTALL(TARGETS SALOMELocalTrace DESTINATION ${SALOME_INSTALL_LIBS})
 
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
index da5197d6a8e2cd311622ebd8b6a375080b34e41c..32da764270abbac395837eb290dc0b4ff5880644 100755 (executable)
@@ -27,15 +27,15 @@ INCLUDE_DIRECTORIES(
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
 
 ADD_LIBRARY(SALOMELocalTraceTest SALOMELocalTraceTest.cxx)
-TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${PLATFORM_LIBS})
-INSTALL(TARGETS SALOMELocalTraceTest DESTINATION ${KERNEL_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBRARIES} ${PTHREAD_LIBRARIES} ${PLATFORM_LIBS})
+INSTALL(TARGETS SALOMELocalTraceTest DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(TestSALOMELocalTrace TestSALOMELocalTrace.cxx)
-TARGET_LINK_LIBRARIES(TestSALOMELocalTrace SALOMELocalTraceTest SALOMELocalTrace SALOMEBasics ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${KERNEL_salomebin_BINS})
+TARGET_LINK_LIBRARIES(TestSALOMELocalTrace SALOMELocalTraceTest SALOMELocalTrace SALOMEBasics ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
+INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMELocalTrace.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestSALOMELocalTrace.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 986cb7428670a27e4c9e7774bd2c53f2c9aa826a..7f83b5dc9bbf82d2be620dcaff5a8adfdfa1a0bd 100755 (executable)
@@ -29,8 +29,8 @@ INCLUDE_DIRECTORIES(
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
 ADD_LIBRARY(with_loggerTraceCollector SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
 
-TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
-INSTALL(TARGETS with_loggerTraceCollector DESTINATION ${KERNEL_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PTHREAD_LIBRARIES})
+INSTALL(TARGETS with_loggerTraceCollector DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 8d90228dd9743ede24414405c985b1cafcd9a10b..aab133700c744b5979639e1d6c7696a82212e02b 100755 (executable)
@@ -30,22 +30,23 @@ SET(COMMON_LIBS
   SALOMELocalTraceTest
   SALOMELocalTrace
   SALOMEBasics
-  ${CMAKE_THREAD_LIBS_INIT}
+  ${PTHREAD_LIBRARIES}
   ${PLATFORM_LIBS}
+  ${CPPUNIT_LIBRARIES}
 )
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS})
 
 ADD_LIBRARY(SALOMETraceCollectorTest SALOMETraceCollectorTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMETraceCollectorTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(TestSALOMETraceCollector TestSALOMETraceCollector.cxx)
 TARGET_LINK_LIBRARIES(TestSALOMETraceCollector SALOMETraceCollectorTest ${COMMON_LIBS})
-INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMETraceCollector.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestSALOMETraceCollector.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 222a0ac60ed9b812f9d441c3bcd16b8d3996c6b4..3fddefd3ef8459dba4f7b1fc37f0ee696b4c763a 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS TOOLSDS DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 8afb7a0457d965fa2ae6ebeab54016cc6657b0d1..3e9dcd73c5a1ec48e40b9743a9e7011934e11796 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 ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeTestComponentEngine 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 ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestLogger TestContainer DESTINATION ${SALOME_INSTALL_BINS})
 
 # Executable scripts to be installed
 SET(SCRIPTS
@@ -72,4 +72,4 @@ SET(SCRIPTS
   TestComponentPy.py 
   TestLogger.py
 )
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
index 3b0e4cb3d8bb1a41398281f4a658864a3148364a..73651166413a80cfb6194c616d9a2e489360926d 100755 (executable)
@@ -53,11 +53,11 @@ SET(COMMON_LIBS
 
 ADD_LIBRARY(SalomeTestMPIComponentEngine TestMPIComponentEngine.cxx)
 TARGET_LINK_LIBRARIES(SalomeTestMPIComponentEngine ${COMMON_LIBS})
-INSTALL(TARGETS SalomeTestMPIComponentEngine DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS SalomeTestMPIComponentEngine DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(TestMPIContainer TestMPIContainer.cxx)
 TARGET_LINK_LIBRARIES(TestMPIContainer SalomeTestMPIComponentEngine ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
-INSTALL(TARGETS TestMPIContainer DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestMPIContainer DESTINATION ${SALOME_INSTALL_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 5d537822b1393f8a43a5577532ebc984cd956f16..f01aae5686d291e0fbf04fbbb91a73bd8f4c68fe 100755 (executable)
@@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES(
 # ===============================================================
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(UnitTests.py ${KERNEL_salomescript_SCRIPTS})
+SALOME_INSTALL_SCRIPTS(UnitTests.py ${SALOME_INSTALL_SCRIPT_SCRIPTS})
 
 # ===============================================================
 # Executables targets
@@ -40,14 +40,13 @@ SALOME_INSTALL_SCRIPTS(UnitTests.py ${KERNEL_salomescript_SCRIPTS})
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
 
 SET(COMMON_LIBS
-  ${CPPUNIT_LIBS}
+  ${CPPUNIT_LIBRARIES}
   SALOMEBasics
   SALOMELocalTrace
   SALOMELocalTraceTest
 )
 
-IF(SALOME_USE_CORBA)
-  INCLUDE_DIRECTORIES(
+INCLUDE_DIRECTORIES(
     ${OMNIORB_INCLUDE_DIR}
     ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector
     ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector/Test
@@ -88,8 +87,7 @@ IF(SALOME_USE_CORBA)
     SalomeIDLKernel
     ${OMNIORB_LIBRARIES}
   )
-ENDIF(SALOME_USE_CORBA)
 
 ADD_EXECUTABLE(UnitTests UnitTests.cxx)
 TARGET_LINK_LIBRARIES(UnitTests ${COMMON_LIBS})
-INSTALL(TARGETS UnitTests DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS UnitTests DESTINATION ${SALOME_INSTALL_BINS})
index 5503b5d158c75c43fa5554550a6c90cc76f63b71..fa670120bd2e342cd823843e8709be3cdf5e2053 100755 (executable)
@@ -40,14 +40,14 @@ SET(OpUtil_SOURCES
 
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
 ADD_LIBRARY(OpUtil ${OpUtil_SOURCES})
-TARGET_LINK_LIBRARIES(OpUtil SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
-INSTALL(TARGETS OpUtil DESTINATION ${KERNEL_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(OpUtil SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PTHREAD_LIBRARIES})
+INSTALL(TARGETS OpUtil DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET(COMMON_SCRIPTS
   Utils_Identity.py 
   SALOME_utilities.py
 )
-SALOME_INSTALL_SCRIPTS("${COMMON_SCRIPTS}" ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS("${COMMON_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
index 4462a4bf45834a9e8cf531019becaa2c954e4edf..5c1c9a61231145817a691df9cfabf0c6d45c5837 100755 (executable)
@@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES(
 )
 
 SET(COMMON_LIBS
-  ${CPPUNIT_LIBS}
+  ${CPPUNIT_LIBRARIES}
   OpUtil
   SALOMELocalTraceTest
   SALOMELocalTrace
@@ -44,14 +44,14 @@ ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
 
 ADD_LIBRARY(UtilsTest UtilsTest.cxx)
 TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} )
-INSTALL(TARGETS UtilsTest DESTINATION ${KERNEL_salomelib_LIBS})
+INSTALL(TARGETS UtilsTest DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(TestUtils TestUtils.cxx)
 SET_TARGET_PROPERTIES(TestUtils PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(TestUtils ${COMMON_LIBS} UtilsTest ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS TestUtils DESTINATION ${KERNEL_salomebin_BINS})
+INSTALL(TARGETS TestUtils DESTINATION ${SALOME_INSTALL_BINS})
 
-SALOME_INSTALL_SCRIPTS(TestUtils.py ${KERNEL_salomescript_PYTHON})
+SALOME_INSTALL_SCRIPTS(TestUtils.py ${SALOME_INSTALL_SCRIPT_PYTHON})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})