Documentatuion from A. Geay will be updated by N. Geimer soon.
cmake_policy(SET CMP0003 NEW)
ENDIF(COMMAND cmake_policy)
+INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
+
+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(VERSION "6.6.0")
SET(VERSION_DEV "1")
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPYTHON.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindMPI.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindHDF5.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindBOOST.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
+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" OFF)
+
+
+# Threads
+SET(CMAKE_THREAD_PREFER_PTHREAD)
+find_package(Threads REQUIRED)
+
+
+# Python
+find_package(PythonInterp REQUIRED)
+find_package(PythonLibs REQUIRED)
+set(PYLOGLEVEL WARNING)
+
+# Swig
+find_package(SWIG REQUIRED)
+
+# LIBXML2
+find_package(LibXml2 REQUIRED)
+
+
+# HDF5
+find_package(HDF5 COMPONENTS C REQUIRED)
+if (HDF5_FOUND)
+ set(HDF5_DEFINITIONS "-DH5_USE_16_API -D_HDF5USEDLL_ ${HDF5_DEFINITIONS}" )
+endif(HDF5_FOUND)
+
+# MPI
+if(SALOME_USE_MPI OR HDF5_IS_PARALLEL)
+ 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)
+endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL)
+
+# Omniorb
+if(SALOME_USE_CORBA)
+ INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
+endif(SALOME_USE_CORBA)
+
+# Boost
+set(Boost_USE_STATIC_LIBS OFF)
+set(Boost_USE_MULTITHREADED ON)
+set(Boost_USE_STATIC_RUNTIME OFF)
+#find_package( Boost 1.49 REQUIRED )#COMPONENTS thread date_time signals filesystem system)
+find_package( Boost REQUIRED )#COMPONENTS thread date_time signals filesystem system)
+if(WINDOWS)
+ set(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS)
+endif(WINDOWS)
+
+# CPPUNIT
+if(SALOME_USE_TEST)
+ INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
+endif(SALOME_USE_TEST)
+
+# Doxygen
+if(SALOME_USE_DOC)
+ find_package(Doxygen)
+endif(SALOME_USE_DOC)
+
+# Libbatch
+if(SALOME_USE_LIBBATCH)
+ INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake)
+endif(SALOME_USE_LIBBATCH)
+
+# Sphinx
+if(SALOME_USE_DOC)
+ INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
+endif(SALOME_USE_DOC)
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${VERSION}
- OUTPUT_VARIABLE XVERSION)
+INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
SET(KERNEL_salomebin_BINS bin/salome)
SET(KERNEL_appliskel_PYTHON bin/salome/appliskel)
-SET(KERNEL_pythondir lib/python${PYTHON_VERSION}/site-packages)
+SET(KERNEL_pythondir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
SET(KERNEL_salomepythondir ${KERNEL_pythondir}/salome)
SET(KERNEL_salomeadmcmake salome_adm/cmake_files)
-IF(CORBA_GEN)
+IF(SALOME_USE_CORBA)
ADD_SUBDIRECTORY(idl)
-ENDIF(CORBA_GEN)
+ENDIF(SALOME_USE_CORBA)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(resources)
IF(NOT WITHONLYLAUNCHER)
ADD_SUBDIRECTORY(bin)
ADD_SUBDIRECTORY(salome_adm)
- ADD_SUBDIRECTORY(doc)
ENDIF(NOT WITHONLYLAUNCHER)
+IF(SALOME_USE_DOC)
+ ADD_SUBDIRECTORY(doc)
+ENDIF(SALOME_USE_DOC)
+
SET(input ${CMAKE_CURRENT_SOURCE_DIR}/KERNEL_version.h.in)
SET(output ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h)
MESSAGE(STATUS "Creation of ${output}")
INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake)
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
${CMAKE_CURRENT_BINARY_DIR}/Calcium_Ports.idl
)
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
SET(SalomeIDLKernel_IDLSOURCES ${SalomeIDLKernel_IDLSOURCES} SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl)
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
SET(IDL_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+SET(COMMON_FLAGS ${OMNIORB_DEFINITIONS})
SET(TYPE)
IF(WINDOWS)
SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
ENDIF(WINDOWS)
OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE})
-TARGET_LINK_LIBRARIES(SalomeIDLKernel ${CORBA_LIBS})
-SET_TARGET_PROPERTIES(SalomeIDLKernel PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_DEFINITIONS(${COMMON_FLAGS})
+TARGET_LINK_LIBRARIES(SalomeIDLKernel ${OMNIORB_LIBRARIES})
INSTALL(TARGETS SalomeIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
SALOME_GenericObjPaCO.idl
)
OMNIORB_ADD_MODULE(SalomeParallelIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
- TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${CORBA_LIBS})
- SET_TARGET_PROPERTIES(SalomeParallelIDLKernel PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+ TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${OMNIORB_LIBRARIES})
INSTALL(TARGETS SalomeParallelIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
ENDIF(WITH_PACO_PARALLEL)
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+# Find OmniORB4 cmake module
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# 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)
#
-# 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.
+# optional variables:
+# OMNIORB_DIR - OmniORB4 local installation path
#
-# 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
+# This module could use OMNIORB_DIR environment variable is set
+# WARNING: The precedence order is the following:
+# 1. OMNIORB_DIR cmake variable
+# 2. OMNIORB_DIR environment variable
+# 3. default cmake search paths
+# NOTE: this goes against cmake default behavior for Find* macros,
+# more on this issue:
+# http://www.mail-archive.com/kde-buildsystem@kde.org/msg00589.html
#
-# ------
-
-MESSAGE(STATUS "Check for omniorb ...")
-
-# ------
-
-IF(OMNIORB_IS_MANDATORY STREQUAL 0)
- SET(OMNIORB_IS_MANDATORY 0)
- SET(OMNIORB_IS_OPTIONAL 1)
-ENDIF(OMNIORB_IS_MANDATORY STREQUAL 0)
-IF(OMNIORB_IS_OPTIONAL STREQUAL 0)
- SET(OMNIORB_IS_MANDATORY 1)
- SET(OMNIORB_IS_OPTIONAL 0)
-ENDIF(OMNIORB_IS_OPTIONAL STREQUAL 0)
-IF(NOT OMNIORB_IS_MANDATORY AND NOT OMNIORB_IS_OPTIONAL)
- SET(OMNIORB_IS_MANDATORY 1)
- SET(OMNIORB_IS_OPTIONAL 0)
-ENDIF(NOT OMNIORB_IS_MANDATORY AND NOT OMNIORB_IS_OPTIONAL)
-
-# ------
-
-SET(OMNIORB_STATUS 1)
-IF(WITHOUT_OMNIORB OR WITH_OMNIORB STREQUAL 0)
- SET(OMNIORB_STATUS 0)
- MESSAGE(STATUS "omniorb disabled from command line.")
-ENDIF(WITHOUT_OMNIORB OR WITH_OMNIORB STREQUAL 0)
-
-# ------
-
-IF(OMNIORB_STATUS)
- IF(WITH_OMNIORB)
- SET(OMNIORB_ROOT_USER ${WITH_OMNIORB})
- ENDIF(WITH_OMNIORB)
- IF(NOT OMNIORB_ROOT_USER)
- SET(OMNIORB_ROOT_USER $ENV{OMNIORB_ROOT})
- ENDIF(NOT OMNIORB_ROOT_USER)
- IF(NOT OMNIORB_ROOT_USER)
- SET(OMNIORB_ROOT_USER $ENV{OMNIORBHOME})
- ENDIF(NOT OMNIORB_ROOT_USER)
-ENDIF(OMNIORB_STATUS)
-
-# ------
-
-IF(OMNIORB_STATUS)
- SET(OMNIIDL_EXECUTABLE_TO_FIND omniidl)
- IF(OMNIORB_ROOT_USER)
- FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND} PATHS ${OMNIORB_ROOT_USER}/bin)
- ELSE(OMNIORB_ROOT_USER)
- FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND})
- ENDIF(OMNIORB_ROOT_USER)
- IF(OMNIIDL_EXECUTABLE)
- MESSAGE(STATUS "${OMNIIDL_EXECUTABLE_TO_FIND} found: ${OMNIIDL_EXECUTABLE}")
- IF(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND})
- ELSE(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND})
- SET(OMNIORB_ROOT_USER ${OMNIIDL_EXECUTABLE})
- GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH)
- IF(WINDOWS)
- GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH)
- ENDIF(WINDOWS)
- GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH)
- ENDIF(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND})
- ELSE(OMNIIDL_EXECUTABLE)
- MESSAGE(STATUS "${OMNIIDL_EXECUTABLE_TO_FIND} not found, try to use WITH_OMNIORB option or OMNIORBHOME environment variable")
- SET(OMNIORB_STATUS 0)
- ENDIF(OMNIIDL_EXECUTABLE)
-ENDIF(OMNIORB_STATUS)
-
-# ------
-
-IF(OMNIORB_STATUS)
- IF(OMNIORB_ROOT_USER)
- SET(OMNIORB_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(OMNIORB_ROOT_USER)
- SET(OMNIORB_FIND_PATHS_OPTION)
- ENDIF(OMNIORB_ROOT_USER)
-ENDIF(OMNIORB_STATUS)
-
-# ------
-
-IF(OMNIORB_STATUS)
- SET(OMNIORB_INCLUDES) # to be removed
- SET(OMNIORB_INCLUDE_DIRS)
-ENDIF(OMNIORB_STATUS)
-IF(OMNIORB_STATUS)
- IF(OMNIORB_ROOT_USER)
- SET(OMNIORB_INCLUDE_PATHS ${OMNIORB_ROOT_USER}/include)
- ELSE(OMNIORB_ROOT_USER)
- SET(OMNIORB_INCLUDE_PATHS)
- ENDIF(OMNIORB_ROOT_USER)
- SET(OMNIORB_INCLUDE_TO_FIND omniORB4/CORBA.h)
- FIND_PATH(OMNIORB_INCLUDE_DIR1 ${OMNIORB_INCLUDE_TO_FIND} PATHS ${OMNIORB_INCLUDE_PATHS} ${OMNIORB_FIND_PATHS_OPTION})
- IF(OMNIORB_INCLUDE_DIR1)
- SET(OMNIORB_INCLUDES ${OMNIORB_INCLUDES} -I${OMNIORB_INCLUDE_DIR1}) # to be removed
- SET(OMNIORB_INCLUDE_DIRS ${OMNIORB_INCLUDE_DIR1})
- MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} found in ${OMNIORB_INCLUDE_DIR1}")
- ELSE(OMNIORB_INCLUDE_DIR1)
- SET(OMNIORB_STATUS 0)
- IF(OMNIORB_ROOT_USER)
- MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found in ${OMNIORB_INCLUDE_PATHS}, check your OMNIORB installation.")
- ELSE(OMNIORB_ROOT_USER)
- MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found on system, try to use WITH_OMNIORB option or OMNIORB_ROOT environment variable.")
- ENDIF(OMNIORB_ROOT_USER)
- ENDIF(OMNIORB_INCLUDE_DIR1)
-ENDIF(OMNIORB_STATUS)
-IF(OMNIORB_STATUS)
- IF(OMNIORB_ROOT_USER)
- SET(OMNIORB_INCLUDE_PATHS ${OMNIORB_ROOT_USER}/include/omniORB4)
- ELSE(OMNIORB_ROOT_USER)
- SET(OMNIORB_INCLUDE_PATHS /usr/include/omniORB4)
- ENDIF(OMNIORB_ROOT_USER)
- SET(OMNIORB_INCLUDE_TO_FIND CORBA.h)
- FIND_PATH(OMNIORB_INCLUDE_DIR2 ${OMNIORB_INCLUDE_TO_FIND} PATHS ${OMNIORB_INCLUDE_PATHS} ${OMNIORB_FIND_PATHS_OPTION})
- IF(OMNIORB_INCLUDE_DIR2)
- SET(OMNIORB_INCLUDES ${OMNIORB_INCLUDES} -I${OMNIORB_INCLUDE_DIR2}) # to be removed
- SET(OMNIORB_INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR2})
- MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} found in ${OMNIORB_INCLUDE_DIR2}")
- ELSE(OMNIORB_INCLUDE_DIR2)
- SET(OMNIORB_STATUS 0)
- MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found in ${OMNIORB_INCLUDE_PATHS}, check your OMNIORB installation.")
- ENDIF(OMNIORB_INCLUDE_DIR2)
-ENDIF(OMNIORB_STATUS)
-
-# ------
-
-IF(OMNIORB_STATUS)
- SET(OMNIORB_CXXFLAGS) # to be removed
- # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DOMNIORB_VERSION=4)
- SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__x86__) # to be removed
- SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DCOMP_CORBA_DOUBLE) # to be removed
- SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DCOMP_CORBA_LONG) # to be removed
- SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
- IF(WINDOWS)
- SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__WIN32__) # to be removed
- SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
- # # # # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D_WIN32_WINNT=0x0400)
- # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__NT__)
- # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__OSVERSION__=4)
- # ELSE(WINDOWS)
- # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__linux__)
- ENDIF(WINDOWS)
- # IF(WINDOWS)
- # SET(OMNIORB_LIBS ws2_32.lib mswsock.lib advapi32.lib ${OMNIORB_LIBS})
- # ENDIF(WINDOWS)
-ENDIF(OMNIORB_STATUS)
-
-# ----
-
-IF(OMNIORB_STATUS)
- IF(OMNIORB_ROOT_USER)
- IF(WINDOWS)
- SET(OMNIORB_LIB_PATHS ${OMNIORB_ROOT_USER}/lib/x86_win32)
- ELSE(WINDOWS)
- SET(OMNIORB_LIB_PATHS ${OMNIORB_ROOT_USER}/lib)
- ENDIF(WINDOWS)
- ELSE(OMNIORB_ROOT_USER)
- SET(OMNIORB_LIB_PATHS)
- ENDIF(OMNIORB_ROOT_USER)
-ENDIF(OMNIORB_STATUS)
-
-IF(OMNIORB_STATUS)
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- SET(OMNIORB_LIB_SUFFIX _rt)
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- SET(OMNIORB_LIB_SUFFIX _rtd)
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(WINDOWS)
- SET(OMNIORB_LIB_SUFFIX)
- ENDIF(WINDOWS)
-ENDIF(OMNIORB_STATUS)
-
-SET(OMNIORB_LIBS)
-FOREACH(lib omniORB4 omniDynamic4 COS4 COSDynamic4 omnithread)
- IF(OMNIORB_STATUS)
- FIND_LIBRARY(${lib}${OMNIORB_LIB_SUFFIX} ${lib}${OMNIORB_LIB_SUFFIX} PATHS ${OMNIORB_LIB_PATHS} ${OMNIORB_FIND_PATHS_OPTION})
- IF(${lib}${OMNIORB_LIB_SUFFIX})
- SET(OMNIORB_LIBS ${OMNIORB_LIBS} ${${lib}${OMNIORB_LIB_SUFFIX}})
- MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib found: ${${lib}${OMNIORB_LIB_SUFFIX}}")
- ELSE(${lib}${OMNIORB_LIB_SUFFIX})
- SET(OMNIORB_STATUS 0)
- IF(OMNIORB_ROOT_USER)
- MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib not found in ${OMNIORB_LIB_PATHS}, check your OMNIORB installation.")
- ELSE(OMNIORB_ROOT_USER)
- MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib not found on system, try to use WITH_OMNIORB option or OMNIORB_ROOT environment variable.")
- ENDIF(OMNIORB_ROOT_USER)
- ENDIF(${lib}${OMNIORB_LIB_SUFFIX})
- ENDIF(OMNIORB_STATUS)
-ENDFOREACH(lib omniORB4 omniDynamic4 COS4 COSDynamic4 omnithread)
-
-# ----------------
-
-IF(OMNIORB_STATUS)
- SET(OMNIORB_IDL_PYTHON $ENV{OMNIIDL_PYTHON})
- IF(NOT OMNIORB_IDL_PYTHON)
- SET(OMNIORB_IDL_PYTHON ${OMNIIDL_EXECUTABLE})
- ENDIF(NOT OMNIORB_IDL_PYTHON)
-ENDIF(OMNIORB_STATUS)
-
-# ----
-
-IF(OMNIORB_STATUS)
- SET(CORBA_GEN 1)
- SET(OMNIORB_IDL ${OMNIIDL_EXECUTABLE})
- SET(CORBA_INCLUDES ${OMNIORB_INCLUDES})
- SET(CORBA_CXXFLAGS ${OMNIORB_CXXFLAGS})# to be removed
- SET(CORBA_DEFINITIONS ${OMNIORB_DEFINITIONS})
- SET(CORBA_LIBS ${OMNIORB_LIBS})
+# minimum OmniORB4 supported version
+# 4.0.6 has known bug float/double marshalling using CORBA::Any
+set(OMNIORB_MINIMUM_VERSION "4.1.2")
+set(OMNIORB_DIR $ENV{OMNIORB_DIR} CACHE PATH "Path to OmniORB directory")
+
+##############################################################################
+# find headers
+##############################################################################
+find_path(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h
+ PATHS "${OMNIORB_DIR}/include" "$ENV{OMNIORB_DIR}/include"
+ NO_DEFAULT_PATH)
+
+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 ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+ NO_DEFAULT_PATH
+ )
+ find_library(OMNIORB_LIBRARY_omniORB4 NAMES
+ ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4${CMAKE_STATIC_LIBRARY_SUFFIX}
+ )
+else (WIN32)
+ find_library(OMNIORB_LIBRARY_omniORB4
+ NAMES omniORB4
+ PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+ NO_DEFAULT_PATH)
+
+ find_library(OMNIORB_LIBRARY_omniORB4
+ NAMES omniORB4)
+endif (WIN32)
+
+if (WIN32)
+ FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
+ NAMES
+ ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread${CMAKE_STATIC_LIBRARY_SUFFIX}
+ PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+ NO_DEFAULT_PATH
+ )
+
+ FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
+ NAMES
+ ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread${CMAKE_STATIC_LIBRARY_SUFFIX}
+ )
+else (WIN32)
+ find_library(OMNIORB_LIBRARY_omnithread
+ NAMES omnithread
+ PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+ NO_DEFAULT_PATH)
+
+ find_library(OMNIORB_LIBRARY_omnithread
+ NAMES omnithread)
+endif (WIN32)
+
+
+if (WIN32)
+ FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
+ NAMES
+ ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+ PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+ NO_DEFAULT_PATH
+ )
+
+ FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
+ NAMES
+ ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+ )
+else (WIN32)
+ find_library(OMNIORB_LIBRARY_omniDynamic4
+ NAMES omniDynamic4
+ PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+ NO_DEFAULT_PATH)
+
+ 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 ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+ NO_DEFAULT_PATH
+ )
+
+ FIND_LIBRARY( OMNIORB_LIBRARY_COS4
+ NAMES
+ ${CMAKE_STATIC_LIBRARY_PREFIX}COS4${CMAKE_STATIC_LIBRARY_SUFFIX}
+ )
+else (WIN32)
+ find_library(OMNIORB_LIBRARY_COS4
+ NAMES COS4
+ PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+ NO_DEFAULT_PATH)
+
+ find_library(OMNIORB_LIBRARY_COS4
+ NAMES COS4)
+endif (WIN32)
+
+if (WIN32)
+ FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
+ NAMES
+ ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+ PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+ NO_DEFAULT_PATH
+ )
+
+ FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
+ NAMES
+ ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+ )
+
+else (WIN32)
+ find_library(OMNIORB_LIBRARY_COSDynamic4
+ NAMES COSDynamic4
+ PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+ NO_DEFAULT_PATH)
+
+ find_library(OMNIORB_LIBRARY_COSDynamic4
+ NAMES COSDynamic4)
+endif (WIN32)
+##############################################################################
+# find command line tools
+##############################################################################
+IF (WIN32)
+FIND_PROGRAM( OMNIORB_IDL_COMPILER
+ NAMES omniidl
+ PATHS ${OMNIORB_DIR}/bin/x86_win32 $ENV{OMNIORB_DIR}/bin/x86_win32
+ DOC "What is the path where omniidl (the idl compiler) can be found"
+ NO_DEFAULT_PATH
+)
+FIND_PROGRAM( OMNIORB_IDL_COMPILER
+ NAMES omniidl
+ DOC "What is the path where omniidl (the idl compiler) can be found"
+)
+
+FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
+ NAMES omniNames
+ PATHS ${OMNIORB_DIR}/bin/x86_win32 $ENV{OMNIORB_DIR}/bin/x86_win32
+ DOC "What is the path where omniNames (the ORB server) can be found"
+ NO_DEFAULT_PATH
+)
+FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
+ NAMES omniNames
+ DOC "What is the path where omniNames (the ORB server) can be found"
+)
+ELSE(WIN32)
+ find_program(OMNIORB_IDL_COMPILER
+ NAMES omniidl
+ PATHS "${OMNIORB_DIR}/bin" "$ENV{OMNIORB_DIR}/bin"
+ NO_DEFAULT_PATH)
+
+ find_program(OMNIORB_IDL_COMPILER
+ NAMES omniidl)
+
+ find_program(OMNIORB_NAMESERVER
+ NAMES omniNames
+ PATHS "${OMNIORB_DIR}/bin" "$ENV{OMNIORB_DIR}/bin"
+ NO_DEFAULT_PATH)
+
+ find_program(OMNIORB_NAMESERVER
+ NAMES omniNames)
+ENDIF (WIN32)
+
+##############################################################################
+# find python back-end
+##############################################################################
+FIND_PATH( OMNIORB_PYTHON_BACKEND
+ NAMES python.py
+ PATHS ${OMNIORB_DIR} ${OMNIORBPY_DIR}
+ DOC "Path to python-backend directory (omniidl_be) including python.py file"
+ NO_DEFAULT_PATH )
+
+##############################################################################
+# cook our stuff
+##############################################################################
+set(OMNIORB_FOUND "FALSE")
+
+if(OMNIORB_INCLUDE_DIR AND
+ OMNIORB_LIBRARY_omniORB4 AND
+ OMNIORB_LIBRARY_omnithread AND
+ OMNIORB_LIBRARY_omniDynamic4 AND
+
+ OMNIORB_IDL_COMPILER)
+ set(OMNIORB_FOUND "TRUE")
+ mark_as_advanced(OMNIORB_DIR)
+ mark_as_advanced(OMNIORB_INCLUDE_DIR)
+ mark_as_advanced(OMNIORB_LIBRARY_omniORB4)
+ mark_as_advanced(OMNIORB_LIBRARY_omnithread)
+ mark_as_advanced(OMNIORB_LIBRARY_omniDynamic4)
+ mark_as_advanced(OMNIORB_IDL_COMPILER)
+ mark_as_advanced(OMNIORB_NAMESERVER)
+ mark_as_advanced(OMNIORB_VERSION)
+ mark_as_advanced(OMNIORB_LIBRARY_COS4)
+ mark_as_advanced(OMNIORB_LIBRARY_COSDynamic4)
+
+ set(OMNIORB_LIBRARIES
+ ${OMNIORB_LIBRARY_omniORB4}
+ ${OMNIORB_LIBRARY_omnithread}
+ ${OMNIORB_LIBRARY_omniDynamic4})
+
+ if(OMNIORB_LIBRARY_COS4)
+ set(OMNIORB_LIBRARIES ${OMNIORB_LIBRARIES} ${OMNIORB_LIBRARY_COS4})
+ endif()
+ if(OMNIORB_LIBRARY_COSDynamic4)
+ set(OMNIORB_LIBRARIES ${OMNIORB_LIBRARIES} ${OMNIORB_LIBRARY_COSDynamic4})
+ endif()
+
+ # Optionaly, extract the the version number from the acconfig.h 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}" )
+
+ if( ${OMNIORB_VERSION} VERSION_LESS ${OMNIORB_MINIMUM_VERSION} )
+ message( "WARNING: your version of omniORB is older than the minimum required one (${OMNIORB_MINIMUM_VERSION}), using DIET with this version may result in undetermined behaviors." )
+ endif()
+
+
+ else( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+ set( OMNIORB_VERSION "NOT-FOUND" )
+ endif( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+ set( OMNIORB_VERSION ${OMNIORB_VERSION}
+ CACHE STRING "OmniORB version number." )
+
SET(OMNIORB_IDLCXXFLAGS -Wba -nf)
SET(OMNIORB_IDLPYFLAGS -bpython)
+ IF (OMNIORB_PYTHON_BACKEND)
+ SET(OMNIORB_IDLPYFLAGS "-p ${OMNIORB_PYTHON_BACKEND} ${OMNIORB_IDLPYFLAGS}")
+ MESSAGE("Backend python for omniidl :" ${OMNIORB_IDLPYFLAGS})
+ ENDIF(OMNIORB_PYTHON_BACKEND)
SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS})
SET(IDL_CLN_H .hh)
SET(IDL_SRV_H .hh)
-ELSE(OMNIORB_STATUS)
- SET(CORBA_GEN 0)
- IF(OMNIORB_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "omniorb not found ... mandatory ... abort")
- ELSE(OMNIORB_IS_MANDATORY)
- MESSAGE(STATUS "omniorb not found ... optional ... disabled")
- ENDIF(OMNIORB_IS_MANDATORY)
-ENDIF(OMNIORB_STATUS)
-
-# ----
+ SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
+ IF(WINDOWS)
+ SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
+ ENDIF(WINDOWS)
+ IF(APPLE)
+ SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...
+ ENDIF(APPLE)
+
+else()
+ message(FATAL_ERROR "OmniORB is required, please define OMNIORB_DIR as environment or cmake variable")
+endif()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-MARK_AS_ADVANCED(ISSUE)
-FIND_FILE(ISSUE issue /etc)
-IF(ISSUE)
- SET(WINDOWS 0)
-ELSE()
- SET(WINDOWS 1)
-ENDIF(ISSUE)
-
IF(WINDOWS)
SET(MACHINE WINDOWS)
ELSE(WINDOWS)
SET(MACHINE PCLINUX)
ENDIF(WINDOWS)
-SET(CMAKE_INSTALL_PREFIX_ENV $ENV{CMAKE_INSTALL_PREFIX})
-IF(CMAKE_INSTALL_PREFIX_ENV)
- SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_ENV} CACHE PATH "installation prefix" FORCE)
-ENDIF(CMAKE_INSTALL_PREFIX_ENV)
-
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE})
ENDIF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
ENDIF(NOT CMAKE_BUILD_TYPE)
-IF(WINDOWS)
-ELSE(WINDOWS)
+IF(WINDOWS OR APPLE)
+ELSE(WINDOWS 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})
ENDIF(X${VAL} STREQUAL X1)
ENDFOREACH(name ${NAMES})
IF(ADD_WERROR)
- SET(CMAKE_C_FLAGS "-Werror")
- SET(CMAKE_CXX_FLAGS "-Werror")
+# SET(CMAKE_C_FLAGS "-Werror")
+# SET(CMAKE_CXX_FLAGS "-Werror")
ENDIF(ADD_WERROR)
-ENDIF(WINDOWS)
+ENDIF(WINDOWS OR APPLE)
IF(CMAKE_BUILD_TYPE)
IF(WINDOWS)
ENDIF(WINDOWS)
ENDIF(CMAKE_BUILD_TYPE)
-SET(PLATFORM_CPPFLAGS) # to be removed
-SET(PLATFORM_LDFLAGS) # to be removed
-SET(PLATFORM_LIBADD) # to be removed
-
SET(PLATFORM_LIBS)
SET(PLATFORM_DEFINITIONS)
IF(WINDOWS)
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0) # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ... # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT) # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) # For medfile # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_USE_MATH_DEFINES) # At least for MEDMEM # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required # to be removed
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib) # to be removed
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit # to be removed
-
SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} /W0")
SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS") # To disable windows warnings for strcpy, fopen, ...
SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SCL_SECURE_NO_WARNINGS") # To disable windows warnings std::copy, std::transform, ...
SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators
ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ELSE(WINDOWS)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wparentheses)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wreturn-type)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wmissing-declarations)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wunused)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wall)
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) # to be removed
SET(PLATFORM_LIBS ${PLATFORM_LIBS} -ldl)
ENDIF(WINDOWS)
SET(SIZE_OF_LONG "4") # set sizeof(long) to 4 byte
ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8" AND WINDOWS)
-SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${SIZE_OF_LONG} -DSIZEOF_INT=4") # to be removed
SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${SIZE_OF_LONG} -DSIZEOF_INT=4")
-
+ADD_DEFINITIONS(${PLATFORM_DEFINITIONS})
SET(COMPILATION_WITH_CMAKE ON)
-
-# SET(PLATFORM_CPPFLAGS)
-# # # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT -D_CRT_SECURE_NO_WARNINGS)
-# # SET(RM del)
-#ELSE(WINDOWS)
-# # SET(RM /bin/rm)
-#ENDIF(WINDOWS)
-
-### SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_DEBUG_)
-
-##SET(RCP rcp)
-##SET(RSH rsh)
-##SET(RCP rcp)
-
-## MESSAGE(FATAL_ERROR "ZZZZZZZ")
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INSTALL(CODE "SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION}/site-packages/salome)") # R1 CHECK
- IF(WINDOWS)
- INSTALL(CODE "SET(INSTALL_PYIDL_DIR bin/salome)") # R1 CHECK
- ENDIF(WINDOWS)
+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)
-INSTALL(CODE "MACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL MYOMNIORBIDLPYTHON MYIDLPYFLAGS MYIDLFILE MYFULLDIR)
+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)")
+ENDMACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL)
+")
# This MACRO uses the following vars
# - OMNIORB_IDL : the idl tool (given by default by FindOMNIORB.cmake)
SET(flags ${flags} "-I${f}")
ENDFOREACH(f ${MYIDLCXXFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT ${outputs}
- COMMAND ${OMNIORB_IDL} ${flags} ${input}
+ COMMAND ${OMNIORB_IDL_COMPILER} ${flags} ${input}
MAIN_DEPENDENCY ${input})
SET(IDLPYFLAGS ${flags})
INSTALL(FILES ${input} DESTINATION idl/salome)
ENDIF(NOT ISBPYTHON)
SET(IDLPYFLAGS ${flags})
STRING(REPLACE "\\" "/" IDLPYFLAGS ${IDLPYFLAGS})
- INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_PYTHON}\" \"${IDLPYFLAGS}\" \"${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )")
+ 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})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
-)
-
SET(SALOMEBasics_SOURCES
BasicsGenericDestructor.cxx
Basics_Utils.cxx
Basics_DirUtils.hxx
)
-ADD_LIBRARY(SALOMEBasics SHARED ${SALOMEBasics_SOURCES})
+ADD_LIBRARY(SALOMEBasics ${SALOMEBasics_SOURCES})
INSTALL(TARGETS SALOMEBasics DESTINATION ${KERNEL_salomelib_LIBS})
-SET_TARGET_PROPERTIES(SALOMEBasics PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMEBasics ${PTHREAD_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEBasics ${CMAKE_THREAD_LIBS_INIT} ${PLATFORM_LIBS})
FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
\ No newline at end of file
+INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
SET(SUBDIRS ${SUBDIR_BASE})
ENDIF(WITHONLYLAUNCHER)
-IF(CORBA_GEN)
+IF(SALOME_USE_CORBA)
SET(SUBDIRS ${SUBDIRS} ${SUBDIR_CORBA})
-ENDIF(CORBA_GEN)
+ENDIF(SALOME_USE_CORBA)
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
SET(SUBDIRS
${SUBDIRS}
${SUBDIR_MPI}
)
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
IF(CPPUNIT_IS_OK)
- IF(CORBA_GEN)
+ IF(SALOME_USE_CORBA)
SET(SUBDIRS
${SUBDIRS}
${SUBDIR_CPPUNIT_BASE}
${SUBDIR_CPPUNIT_CORBA}
${SUBDIR_CPPUNIT_GENERAL}
)
- ELSE(CORBA_GEN)
+ ELSE(SALOME_USE_CORBA)
SET(SUBDIRS
${SUBDIRS}
${SUBDIR_CPPUNIT_BASE}
${SUBDIR_CPPUNIT_GENERAL}
)
- ENDIF(CORBA_GEN)
+ ENDIF(SALOME_USE_CORBA)
ENDIF(CPPUNIT_IS_OK)
IF(WITH_PACO_PARALLEL)
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${MPI_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
+ ${MPI_CXX_INCLUDE_PATH}
${PYTHON_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
OpUtil
SALOMELocalTrace
SalomeIDLKernel
+ ${PYTHON_LIBRARIES}
+ ${MPI_CXX_LIBRARIES}
)
SET(SalomeCommunication_SOURCES
Receiver.hxx
)
-ADD_LIBRARY(SalomeCommunication SHARED ${SalomeCommunication_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCommunication PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeCommunication ${COMMON_LIBS} ${PYTHON_LIBS} ${MPI_LIBS})
+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})
SET(COMMON_HEADERS_HXX
#include "SALOME_Comm_i.hxx"
#ifndef WIN32
+#ifndef __APPLE__
#include <rpc/xdr.h>
#endif
+#endif
#include "omniORB4/poa.h"
#include "omnithread.h"
#include "Utils_SINGLETON.hxx"
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES CPLUSPLUS ON)
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../Communication
${CMAKE_CURRENT_SOURCE_DIR}/../Utils
${CMAKE_BINARY_DIR}/idl
)
-SET(_libSALOME_Comm_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
SET(_libSALOME_Comm_LIBS
SalomeCommunication
- ${PYTHON_LIBS}
+ ${PYTHON_LIBRARIES}
)
-IF(MPI_IS_OK)
- INCLUDE_DIRECTORIES(${MPI_INCLUDE_DIRS})
+IF(SALOME_USE_MPI)
+ INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
- SET(_libSALOME_Comm_FLAGS "${_libSALOME_Comm_FLAGS} ${MPI_DEFINITIONS}")
+ ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS})
SET(_libSALOME_Comm_LIBS
${_libSALOME_Comm_LIBS}
- ${MPI_LIBS}
+ ${MPI_CXX_LIBRARIES}
)
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
SWIG_ADD_MODULE(libSALOME_Comm python libSALOME_Comm.i)
SWIG_LINK_LIBRARIES(libSALOME_Comm ${_libSALOME_Comm_LIBS})
-SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES COMPILE_FLAGS "${_libSALOME_Comm_FLAGS}")
IF(${MACHINE} STREQUAL WINDOWS)
SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Comm_d)
ENDIF(${MACHINE} STREQUAL WINDOWS)
INSTALL(TARGETS _libSALOME_Comm DESTINATION ${KERNEL_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${KERNEL_salomepythondir})
\ No newline at end of file
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${KERNEL_salomepythondir})
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${HDF5_INCLUDE_DIRS}
- ${LIBXML_INCLUDE_DIRS}
+ ${LIBXML2_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
SALOME_ContainerPy.py
)
-SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
SET(COMMON_LIBS
Registry
SalomeNotification
SalomeHDFPersist
SalomeGenericObj
SalomeIDLKernel
- ${CORBA_LIBS}
- ${PYTHON_LIBS}
+ ${OMNIORB_LIBRARIES}
+ ${PYTHON_LIBRARIES}
)
IF(WITH_MPI_SEQ_CONTAINER)
- SET(COMMON_FLAGS
- ${COMMON_FLAGS}
- ${MPI_DEFINITIONS}
- )
+ ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS})
SET(COMMON_LIBS
- ${COMMON_LIBS}
- ${MPI_LIBS}
+ ${MPI_CXX_LIBRARIES}
)
ENDIF(WITH_MPI_SEQ_CONTAINER)
IF(WITH_PACO_PARALLEL)
- SET(COMMON_FLAGS
- ${COMMON_FLAGS}
- -DWITH_PACO_PARALLEL
- ${PACO_DEFINITIONS}
- )
+ ADD_DEFINITIONS(-DWITH_PACO_PARALLEL ${PACO_DEFINITIONS})
SET(COMMON_LIBS
${COMMON_LIBS}
${PACO_LIBS}
Salome_file_i.cxx
)
-ADD_LIBRARY(SalomeContainer SHARED ${SalomeContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SalomeContainer ${SalomeContainer_SOURCES})
TARGET_LINK_LIBRARIES(SalomeContainer ${COMMON_LIBS})
INSTALL(TARGETS SalomeContainer DESTINATION ${KERNEL_salomelib_LIBS})
SalomeContainer
SALOMEBasics
${COMMON_LIBS}
- ${HDF5_LIBS}
+ ${HDF5_LIBRARIES}
)
ADD_EXECUTABLE(SALOME_Container SALOME_Container.cxx SALOME_Container_SignalsHandler.cxx)
-SET_TARGET_PROPERTIES(SALOME_Container PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
TARGET_LINK_LIBRARIES(SALOME_Container ${SALOME_Container_LIBS})
-ADD_EXECUTABLE(TestSalome_file TestSalome_file.cxx)
-SET_TARGET_PROPERTIES(TestSalome_file PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(TestSalome_file SALOMETraceCollectorTest ${SALOME_Container_LIBS})
-
+IF(SALOME_USE_TEST)
+ 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})
# Executable scripts to be installed
#
INCLUDE_DIRECTORIES(
- ${BOOST_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
)
+ADD_DEFINITIONS(${BOOST_DEFINITIONS})
SET(DF_SOURCES
DF_Attribute.cxx
DF_definitions.hxx
)
-ADD_LIBRARY(DF SHARED ${DF_SOURCES})
-SET_TARGET_PROPERTIES(DF PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
+ADD_LIBRARY(DF ${DF_SOURCES})
INSTALL(TARGETS DF DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(testDF testDF.cxx)
-SET_TARGET_PROPERTIES(testDF PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
TARGET_LINK_LIBRARIES(testDF DF)
INSTALL(TARGETS testDF DESTINATION ${KERNEL_salomebin_BINS})
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_SOURCE_DIR}/src/Container
${CMAKE_SOURCE_DIR}/src/GenericObj
PortProperties_i.cxx
)
-ADD_LIBRARY(SalomeDSCContainer SHARED ${SalomeDSCContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeDSCContainer SalomeContainer ${OMNIORB_LIBS})
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeDSCContainer ${SalomeDSCContainer_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeDSCContainer SalomeContainer ${OMNIORB_LIBRARIES})
INSTALL(TARGETS SalomeDSCContainer DESTINATION ${KERNEL_salomelib_LIBS})
SET(SALOME_ConnectionManagerServer_SOURCES
SalomeNS
SALOMELocalTrace
SalomeContainer
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
)
ADD_EXECUTABLE(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_SOURCES})
-SET_TARGET_PROPERTIES(SALOME_ConnectionManagerServer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_LIBS})
INSTALL(TARGETS SALOME_ConnectionManagerServer DESTINATION ${KERNEL_salomebin_BINS})
SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES CPLUSPLUS ON)
SET(CMAKE_SWIG_FLAGS "-noexcept")
-SET_SOURCE_FILES_PROPERTIES(calciumPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
SalomeDSCSuperv
SalomeDSCContainer
SalomeContainer
- ${CORBA_LIBS}
+ ${OMNIORB_LIBRARIES}
)
SWIG_ADD_MODULE(calcium python calcium.i)
SWIG_LINK_LIBRARIES(calcium ${_calcium_LIBS})
-SET_TARGET_PROPERTIES(_calcium PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}")
INSTALL(TARGETS _calcium DESTINATION ${KERNEL_salomepythondir})
SET(SCRIPTS
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/idl
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
data_short_port_provides.cxx
)
-ADD_LIBRARY(SalomeDSCSupervBasic SHARED ${SalomeDSCSupervBasic_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCSupervBasic PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+ADD_LIBRARY(SalomeDSCSupervBasic ${SalomeDSCSupervBasic_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDSCSupervBasic SalomeDSCSuperv)
INSTALL(TARGETS SalomeDSCSupervBasic DESTINATION ${KERNEL_salomelib_LIBS})
ADD_SUBDIRECTORY(Datastream)
INCLUDE_DIRECTORIES(
- ${BOOST_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_SOURCE_DIR}/src/Container
${CMAKE_SOURCE_DIR}/src/GenericObj
${CMAKE_BINARY_DIR}/idl
)
-SET(COMMON_FLAGS
- ${OMNIORB_DEFINITIONS}
- ${BOOST_DEFINITIONS}
-)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+
SET(SalomeDSCSuperv_SOURCES
base_port.cxx
uses_port.cxx
Superv_Component_i.cxx
)
-ADD_LIBRARY(SalomeDSCSuperv SHARED ${SalomeDSCSuperv_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCSuperv PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS} ${PLATFORM_DEFINITIONS}")
+ADD_LIBRARY(SalomeDSCSuperv ${SalomeDSCSuperv_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDSCSuperv SalomeDSCContainer ${PLATFORM_LIBS})
INSTALL(TARGETS SalomeDSCSuperv DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(test_DSC_Exception test_DSC_Exception.cxx)
-SET_TARGET_PROPERTIES(test_DSC_Exception PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace ${OMNIORB_FLAGS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
ADD_SUBDIRECTORY(Calcium)
INCLUDE_DIRECTORIES(
- ${BOOST_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Palm
SalomeDSCSuperv
)
-ADD_LIBRARY(SalomeDatastream SHARED fake.cc)
-SET_TARGET_PROPERTIES(SalomeDatastream PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
+ADD_DEFINITIONS(${BOOST_DEFINITIONS})
+
+ADD_LIBRARY(SalomeDatastream fake.cc)
TARGET_LINK_LIBRARIES(SalomeDatastream ${COMMON_LIBS})
INSTALL(TARGETS SalomeDatastream DESTINATION ${KERNEL_salomelib_LIBS})
#
INCLUDE_DIRECTORIES(
- ${BOOST_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIR}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
Calcium.cxx
calcium_destructors_port_uses.cxx
)
-ADD_LIBRARY(SalomeCalcium SHARED ${SalomeCalcium_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCalcium PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeCalcium ${PTHREAD_LIBS} ${CORBA_LIBS} ${PLATFORM_LIBS})
+
+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})
SET(CalciumC_SOURCES
CalciumC.c
Calcium.cxx
calciumf.c
)
-ADD_LIBRARY(CalciumC SHARED ${CalciumC_SOURCES})
-SET_TARGET_PROPERTIES(CalciumC PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_LIBRARY(CalciumC ${CalciumC_SOURCES})
INSTALL(TARGETS CalciumC DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(test_DataIdContainer test_DataIdContainer.cxx)
-SET_TARGET_PROPERTIES(test_DataIdContainer PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DataIdContainer SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${CORBA_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(test_DataIdContainer SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
CONFIGURE_FILE(calcium_integer_port_uses.hxx.in calcium_integer_port_uses.hxx @ONLY)
CONFIGURE_FILE(CalciumProvidesPort.hxx.in CalciumProvidesPort.hxx @ONLY)
#include <iostream>
#include <cstring>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
//#define MYDEBUG
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
${CMAKE_BINARY_DIR}/idl
)
-ADD_LIBRARY(SalomePalm SHARED palm_port_factory.cxx)
-SET_TARGET_PROPERTIES(SalomePalm PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomePalm palm_port_factory.cxx)
ADD_EXECUTABLE(test_DataIdContainer test_DataIdContainer.cxx)
-SET_TARGET_PROPERTIES(test_DataIdContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DataIdContainer ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(test_DataIdContainer ${OMNIORB_LIBRARIES})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
#include <SALOMEconfig.h>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
#include <vector>
#include "DataIdFilter.hxx"
#include "DisplayPair.hxx"
#
INCLUDE_DIRECTORIES(
- ${MPI_INCLUDE_DIRS}
+ ${MPI_CXX_INCLUDE_PATH}
${PACO_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/src/Container
${CMAKE_SOURCE_DIR}/src/ParallelContainer
${CMAKE_SOURCE_DIR}/src/Notification
SET(COMMON_FLAGS
${OMNIORB_DEFINITIONS}
- ${MPI_DEFINITIONS}
+ ${MPI_CXX_COMPILE_FLAGS}
${PACO_DEFINITIONS}
)
SET(SalomeParallelDSCContainer_SOURCES
Param_Double_Port_uses_i.cxx
)
-ADD_LIBRARY(SalomeParallelDSCContainer SHARED ${SalomeParallelDSCContainer_SOURCES})
+ADD_LIBRARY(SalomeParallelDSCContainer ${SalomeParallelDSCContainer_SOURCES})
SET_TARGET_PROPERTIES(SalomeParallelDSCContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
INSTALL(TARGETS SalomeParallelDSCContainer DESTINATION ${KERNEL_salomelib_LIBS})
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_BINARY_DIR}/idl
)
-ADD_LIBRARY(SalomeGenericObj SHARED SALOME_GenericObj_i.cc)
-SET_TARGET_PROPERTIES(SalomeGenericObj PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+ADD_LIBRARY(SalomeGenericObj SALOME_GenericObj_i.cc)
TARGET_LINK_LIBRARIES(SalomeGenericObj SALOMELocalTrace SalomeIDLKernel)
INSTALL(TARGETS SalomeGenericObj DESTINATION ${KERNEL_salomelib_LIBS})
${HDF5_INCLUDE_DIRS}
)
-SET(SalomeHDFPersist_SOURCES
- HDFfileCreate.c
- HDFfileClose.c
- HDFfileOpen.c
- HDFfileMount.c
- HDFfileUmount.c
- HDFgroupCreate.c
- HDFgroupOpen.c
- HDFgroupClose.c
- HDFdatasetOpen.c
- HDFdatasetClose.c
- HDFdatasetCreate.c
- HDFdatasetWrite.c
- HDFdatasetRead.c
- HDFdatasetGetDim.c
- HDFdatasetGetSize.c
- HDFdatasetGetType.c
- HDFdatasetGetnDim.c
- HDFdatasetGetOrder.c
- HDFarrayGetType.c
- HDFarrayGetTypeId.c
- HDFarrayCreate.c
- HDFarrayClose.c
- HDFarrayGetnDim.c
- HDFarrayGetDim.c
- HDFattrOpen.c
- HDFattrClose.c
- HDFattrWrite.c
- HDFattrCreate.c
- HDFattrRead.c
- HDFattrGetType.c
- HDFattrGetSize.c
- HDFerrorModeLock.c
- HDFnObjects.c
- HDFobjectIdentify.c
- HDFobjectType.c
- HDFobject.cc
- HDFarray.cc
- HDFinternalObject.cc
- HDFattribute.cc
- HDFcontainerObject.cc
- HDFdataset.cc
- HDFfile.cc
- HDFgroup.cc
- HDFexplorer.cc
- HDFconvert.cc
- HDFascii.cc
-)
-ADD_LIBRARY(SalomeHDFPersist SHARED ${SalomeHDFPersist_SOURCES})
-SET_TARGET_PROPERTIES(SalomeHDFPersist PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBS} ${PLATFORM_LIBS})
+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})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
omnipatch.py
)
-IF(CORBA_GEN)
+IF(SALOME_USE_CORBA)
SET(salomepython_PYTHON
${salomepython_PYTHON}
Help.py
salome_pynode.py
salome_genericobj.py
)
-ENDIF(CORBA_GEN)
+ENDIF(SALOME_USE_CORBA)
SALOME_INSTALL_SCRIPTS("${salomepython_PYTHON}" ${KERNEL_salomepythondir})
SALOME_INSTALL_SCRIPTS(kernel_shared_modules.py ${KERNEL_sharedpkgpython_PYTHON})
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
)
SET(SalomeKernelHelpers_LIBS
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
SalomeNS
SALOMELocalTrace
SALOMEBasics
SALOMEDS_DriverDefaultImpl.cxx
)
-ADD_LIBRARY(SalomeKernelHelpers SHARED ${SalomeKernelHelpers_SOURCES})
-SET_TARGET_PROPERTIES(SalomeKernelHelpers PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeKernelHelpers ${SalomeKernelHelpers_SOURCES})
TARGET_LINK_LIBRARIES(SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
INSTALL(TARGETS SalomeKernelHelpers DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(KernelHelpersUseCases KernelHelpersUseCases.cxx)
-SET_TARGET_PROPERTIES(KernelHelpersUseCases PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(KernelHelpersUseCases SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
INSTALL(TARGETS KernelHelpersUseCases DESTINATION ${KERNEL_salomebin_BINS})
INCLUDE_DIRECTORIES(
${CPPUNIT_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_SOURCE_DIR}/src/Basics/Test
${CMAKE_CURRENT_SOURCE_DIR}/..
SET(SalomeKernelHelpersTest_LIBS
${CPPUNIT_LIBS}
SalomeKernelHelpers
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
SalomeNS
SALOMELocalTrace
SALOMEBasics
SalomeIDLKernel
)
-ADD_LIBRARY(SalomeKernelHelpersTest SHARED KernelHelpersUnitTests.cxx)
-SET_TARGET_PROPERTIES(SalomeKernelHelpersTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeKernelHelpersTest KernelHelpersUnitTests.cxx)
TARGET_LINK_LIBRARIES(SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(TestKernelHelpers TestKernelHelpers.cxx)
-SET_TARGET_PROPERTIES(TestKernelHelpers PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(TestKernelHelpers SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
ADD_TEST(TestKernelHelpers TestKernelHelpers)
INSTALL(TARGETS TestKernelHelpers DESTINATION ${KERNEL_salomebin_BINS})
#
INCLUDE_DIRECTORIES(
- ${LIBXML_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${LIBXML2_INCLUDE_DIR}
+ ${OMNIORB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
- ${MPI_INCLUDE_DIRS}
- ${LIBBATCH_INCLUDE_DIRS}
+ ${MPI_CXX_INCLUDE_PATH}
+ ${LIBBATCH_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
${CMAKE_BINARY_DIR}/idl
)
-SET(WITH_LIBBATCH_FLAG)
-IF(WITH_LIBBATCH)
- SET(WITH_LIBBATCH_FLAG "-DWITH_LIBBATCH")
-ENDIF(WITH_LIBBATCH)
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${MPI_DEFINITIONS} ${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+IF(SALOME_USE_LIBBATCH)
+ ADD_DEFINITIONS(-DWITH_LIBBATCH)
+ENDIF(SALOME_USE_LIBBATCH)
# This local variable defines the list of dependant libraries common to all target in this package.
SET(COMMON_LIBS
SALOMEBasics
SalomeIDLKernel
${LIBBATCH_LIBS}
- ${MPI_LIBS}
- ${OMNIORB_LIBS}
- ${LIBXML_LIBS}
- ${PYTHON_LIBS}
+ ${MPI_CXX_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${PYTHON_LIBRARIES}
)
SET(Launcher_SOURCES
Launcher_Job_YACSFile.cxx
Launcher.cxx
)
-SET(Launcher_FLAGS "${MPI_DEFINITIONS} ${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
-ADD_LIBRARY(Launcher SHARED ${Launcher_SOURCES})
-SET_TARGET_PROPERTIES(Launcher PROPERTIES COMPILE_FLAGS "${Launcher_FLAGS}")
-TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBS} ${MPI_LIBS} ${LIBXML_LIBS})
+ADD_LIBRARY(Launcher ${Launcher_SOURCES})
+TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBS} ${MPI_CXX_LIBRARIES} ${LIBXML2_LIBS})
INSTALL(TARGETS Launcher DESTINATION ${KERNEL_salomelib_LIBS})
SET(TestLauncher_LIBS
- ${LIBXML_LIBS}
+ ${LIBXML2_LIBRARIES}
ResourcesManager
Launcher
OpUtil
)
ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
-SET_TARGET_PROPERTIES(TestLauncher PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS})
INSTALL(TARGETS TestLauncher DESTINATION ${KERNEL_salomebin_BINS})
IF(NOT WITHONLYLAUNCHER)
- ADD_LIBRARY(SalomeLauncher SHARED BatchTest.cxx SALOME_Launcher.cxx)
- SET_TARGET_PROPERTIES(SalomeLauncher PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx)
TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
INSTALL(TARGETS SalomeLauncher DESTINATION ${KERNEL_salomelib_LIBS})
SALOMEBasics
SALOMELocalTrace
${LIBBATCH_LIBS}
- ${MPI_LIBS}
- ${OMNIORB_LIBS}
- ${LIBXML_LIBS}
- ${PYTHON_LIBS}
+ ${MPI_CXX_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${PYTHON_LIBRARIES}
)
ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
- SET_TARGET_PROPERTIES(SALOME_LauncherServer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
INSTALL(TARGETS SALOME_LauncherServer DESTINATION ${KERNEL_salomebin_BINS})
ENDIF(NOT WITHONLYLAUNCHER)
#
INCLUDE_DIRECTORIES(
- ${LIBXML_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${LIBXML2_INCLUDE_DIR}
+ ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
SalomeIDLKernel
)
-ADD_LIBRARY(SalomeLifeCycleCORBA SHARED SALOME_LifeCycleCORBA.cxx SALOME_FileTransferCORBA.cxx)
-SET_TARGET_PROPERTIES(SalomeLifeCycleCORBA PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+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})
ADD_EXECUTABLE(Test_LifeCycleCORBA Test_LifeCycleCORBA.cxx)
-SET_TARGET_PROPERTIES(Test_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
ADD_EXECUTABLE(TestContainerManager TestContainerManager.cxx)
-SET_TARGET_PROPERTIES(TestContainerManager PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
INSTALL(TARGETS Test_LifeCycleCORBA TestContainerManager DESTINATION ${KERNEL_salomebin_BINS})
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
SALOMETraceCollectorTest
SalomeIDLKernel
SalomeLifeCycleCORBA
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
)
-ADD_LIBRARY(LifeCycleCORBATest SHARED LifeCycleCORBATest.cxx)
-SET_TARGET_PROPERTIES(LifeCycleCORBATest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(LifeCycleCORBATest LifeCycleCORBATest.cxx)
TARGET_LINK_LIBRARIES(LifeCycleCORBATest ${COMMON_LIBS})
INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(TestLifeCycleCORBA TestLifeCycleCORBA.cxx)
-SET_TARGET_PROPERTIES(TestLifeCycleCORBA PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(TestLifeCycleCORBA LifeCycleCORBATest NamingServiceTest SalomeLifeCycleCORBA ${COMMON_LIBS})
INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${KERNEL_salomebin_BINS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBAPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
SWIG_ADD_MODULE(libSALOME_LifeCycleCORBA python libSALOME_LifeCycleCORBA.i)
-SWIG_LINK_LIBRARIES(libSALOME_LifeCycleCORBA ${PYTHON_LIBS} SalomeLifeCycleCORBA)
-SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${PLATFORM_LIBS}")
-SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(libSALOME_LifeCycleCORBA ${PYTHON_LIBRARIES} SalomeLifeCycleCORBA)
+TARGET_LINK_LIBRARIES(_libSALOME_LifeCycleCORBA ${PLATFORM_LIBS})
IF(${MACHINE} STREQUAL WINDOWS)
SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_LifeCycleCORBA_d)
#
INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
${CMAKE_BINARY_DIR}/idl
)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-ADD_LIBRARY(SalomeLoggerServer SHARED SALOME_Trace.cxx SALOME_Logger_Server.cxx)
-SET_TARGET_PROPERTIES(SalomeLoggerServer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeLoggerServer SalomeIDLKernel ${OMNIORB_LIBS} ${PLATFORM_LIBS})
+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})
SET(SALOME_Logger_Server_SOURCES
SET(SALOME_Logger_Server_LIBS
SalomeLoggerServer
SalomeIDLKernel
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
)
ADD_EXECUTABLE(SALOME_Logger_Server ${SALOME_Logger_Server_SOURCES})
-SET_TARGET_PROPERTIES(SALOME_Logger_Server PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(SALOME_Logger_Server ${SALOME_Logger_Server_LIBS})
INSTALL(TARGETS SALOME_Logger_Server DESTINATION ${KERNEL_salomebin_BINS})
#
INCLUDE_DIRECTORIES(
- ${MPI_INCLUDE_DIRS}
+ ${MPI_CXX_INCLUDE_PATH}
${PYTHON_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
SalomeContainer
SalomeGenericObj
SalomeIDLKernel
- ${CORBA_LIBS}
+ ${OMNIORB_LIBRARIES}
)
-ADD_LIBRARY(SalomeMPIContainer SHARED MPIObject_i.cxx MPIContainer_i.cxx)
-SET_TARGET_PROPERTIES(SalomeMPIContainer PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+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})
ADD_EXECUTABLE(SALOME_MPIContainer SALOME_MPIContainer.cxx)
-SET_TARGET_PROPERTIES(SALOME_MPIContainer PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBS} ${MPI_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES})
ADD_EXECUTABLE(testMPI2 testMPI2.cxx)
-SET_TARGET_PROPERTIES(testMPI2 PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(testMPI2 ${MPI_LIBS})
+TARGET_LINK_LIBRARIES(testMPI2 ${MPI_CXX_LIBRARIES})
INSTALL(TARGETS SALOME_MPIContainer testMPI2 DESTINATION ${KERNEL_salomebin_BINS})
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${LIBXML_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
+ ${LIBXML2_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
SALOMELocalTrace
SALOMEBasics
SalomeIDLKernel
- ${LIBXML_LIBS}
+ ${LIBXML2_LIBRARIES}
)
SET(SalomeCatalog_SOURCES
SALOME_ModuleCatalog_impl.cxx
SALOME_ModuleCatalog_Acomponent_impl.cxx
)
+ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-ADD_LIBRARY(SalomeCatalog SHARED ${SalomeCatalog_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCatalog PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_LIBRARY(SalomeCatalog ${SalomeCatalog_SOURCES})
TARGET_LINK_LIBRARIES(SalomeCatalog ${COMMON_LIBS})
INSTALL(TARGETS SalomeCatalog DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Server.cxx)
-SET_TARGET_PROPERTIES(SALOME_ModuleCatalog_Server PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
ADD_EXECUTABLE(SALOME_ModuleCatalog_Client SALOME_ModuleCatalog_Client.cxx)
-SET_TARGET_PROPERTIES(SALOME_ModuleCatalog_Client PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
INSTALL(TARGETS SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client DESTINATION ${KERNEL_salomebin_BINS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES CPLUSPLUS ON)
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Notification
)
SWIG_ADD_MODULE(libNOTIFICATION python NOTIFICATION.i NOTIFICATION_Swig.cxx)
-SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBS} SalomeNotification)
-SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBRARIES} SalomeNotification)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
IF(${MACHINE} STREQUAL WINDOWS)
SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES DEBUG_OUTPUT_NAME _libNOTIFICATION_d)
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})
\ No newline at end of file
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libNOTIFICATION.py DESTINATION ${KERNEL_salomepythondir})
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
NamingService_WaitForServerReadiness.cxx
)
-ADD_LIBRARY(SalomeNS SHARED ${SalomeNS_SOURCES})
-SET_TARGET_PROPERTIES(SalomeNS PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+ADD_LIBRARY(SalomeNS ${SalomeNS_SOURCES})
TARGET_LINK_LIBRARIES(SalomeNS OpUtil)
INSTALL(TARGETS SalomeNS DESTINATION ${KERNEL_salomelib_LIBS})
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
SET(COMMON_LIBS
${CPPUNIT_LIBS}
SalomeNS
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
+ ${PLATFORM_LIBS}
)
-ADD_LIBRARY(NamingServiceTest SHARED NamingServiceTest.cxx)
-SET_TARGET_PROPERTIES(NamingServiceTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS} ${PLATFORM_LIBS})
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(NamingServiceTest NamingServiceTest.cxx)
+TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS})
INSTALL(TARGETS NamingServiceTest DESTINATION ${KERNEL_salomelib_LIBS})
SET(TestNamingService_LIBS
)
ADD_EXECUTABLE(TestNamingService TestNamingService.cxx)
-SET_TARGET_PROPERTIES(TestNamingService PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS})
INSTALL(TARGETS TestNamingService DESTINATION ${KERNEL_salomebin_BINS})
# Executable scripts to be installed
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
OpUtil
SALOMELocalTrace
SALOMEBasics
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
)
SET(SalomeNotification_SOURCES
NOTIFICATION_Consumer.cxx
)
-ADD_LIBRARY(SalomeNotification SHARED ${SalomeNotification_SOURCES})
-SET_TARGET_PROPERTIES(SalomeNotification PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
+ADD_LIBRARY(SalomeNotification ${SalomeNotification_SOURCES})
TARGET_LINK_LIBRARIES(SalomeNotification ${COMMON_LIBS})
INSTALL(TARGETS SalomeNotification DESTINATION ${KERNEL_salomelib_LIBS})
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${MPI_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
+ ${MPI_CXX_INCLUDE_PATH}
${PYTHON_INCLUDE_DIRS}
${PACO_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
SalomeHDFPersist
SalomeParallelIDLKernel
SalomeIDLKernel
- ${CORBA_LIBS}
+ ${OMNIORB_LIBRARIES}
${PACO_LIBS}
- ${PYTHON_LIBS}
+ ${PYTHON_LIBRARIES}
)
SET(SalomeParallelContainer_SOURCES
SALOME_ParallelGlobalProcessVar_i.cxx
)
-ADD_LIBRARY(SalomeParallelContainer SHARED ${SalomeParallelContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeParallelContainer PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_LIBS})
+ADD_DEFINITIONS(${ONMIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS} ${PACO_DEFINITIONS})
+
+ADD_LIBRARY(SalomeParallelContainer ${SalomeParallelContainer_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
INSTALL(TARGETS Registry DESTINATION ${KERNEL_salomelib_LIBS})
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
SET(SALOME_ParallelContainerProxyMpi_LIBS
SalomeParallelContainer
${PaCO_dummy}
${PaCO_mpi}
${PaCO_omnithread}
- ${MPI_LIBS}
+ ${MPI_CXX_LIBRARIES}
${COMMON_LIBS}
)
ADD_EXECUTABLE(SALOME_ParallelContainerProxyMpi SALOME_Registry_Server.cxx)
- SET_TARGET_PROPERTIES(SALOME_ParallelContainerProxyMpi PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
ADD_EXECUTABLE(SALOME_ParallelContainerNodeMpi SALOME_ParallelContainerNodeMpi.cxx)
- SET_TARGET_PROPERTIES(SALOME_ParallelContainerNodeMpi PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
INSTALL(TARGETS SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerNodeMpi DESTINATION ${KERNEL_salomebin_BINS})
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
SET(SALOME_ParallelContainerProxyDummy_LIBS
SalomeParallelContainer
)
ADD_EXECUTABLE(SALOME_ParallelContainerProxyDummy SALOME_ParallelContainerProxyDummy.cxx)
-SET_TARGET_PROPERTIES(SALOME_ParallelContainerProxyDummy PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
ADD_EXECUTABLE(SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerNodeDummy.cxx)
-SET_TARGET_PROPERTIES(SALOME_ParallelContainerNodeDummy PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
INSTALL(TARGETS SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerProxyDummy DESTINATION ${KERNEL_salomebin_BINS})
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
${CMAKE_BINARY_DIR}/idl
)
-ADD_LIBRARY(Registry SHARED RegistryConnexion.cxx RegistryService.cxx)
-SET_TARGET_PROPERTIES(Registry PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+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})
OpUtil
SALOMELocalTrace
SALOMEBasics
- ${OMNIORB_LIBS}
${PLATFORM_LIBS}
)
ADD_EXECUTABLE(SALOME_Registry_Server SALOME_Registry_Server.cxx)
-SET_TARGET_PROPERTIES(SALOME_Registry_Server PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(SALOME_Registry_Server ${SALOME_Registry_Server_LIBS})
INSTALL(TARGETS SALOME_Registry_Server DESTINATION ${KERNEL_salomebin_BINS})
#
INCLUDE_DIRECTORIES(
- ${LIBXML_INCLUDE_DIRS}
+ ${LIBXML2_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
${CMAKE_BINARY_DIR}/idl
)
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${LIBXML_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
# This local variable defines the list of dependant libraries common to all target in this package.
SET(COMMON_LIBS
OpUtil
SALOMEBasics
SalomeIDLKernel
- ${LIBXML_LIBS}
+ ${LIBXML2_LIBRARIES}
)
SET(ResourcesManager_SOURCES
ResourcesManager.cxx
)
-ADD_LIBRARY(ResourcesManager SHARED ${ResourcesManager_SOURCES})
-SET_TARGET_PROPERTIES(ResourcesManager PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics OpUtil ${LIBXML_LIBS})
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
+ADD_LIBRARY(ResourcesManager ${ResourcesManager_SOURCES})
+TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics OpUtil ${LIBXML2_LIBRARIES})
INSTALL(TARGETS ResourcesManager DESTINATION ${KERNEL_salomelib_LIBS})
IF(NOT WITHONLYLAUNCHER)
- ADD_LIBRARY(SalomeResourcesManager SHARED SALOME_ResourcesManager.cxx)
- SET_TARGET_PROPERTIES(SalomeResourcesManager PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ ADD_LIBRARY(SalomeResourcesManager SALOME_ResourcesManager.cxx)
TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS})
INSTALL(TARGETS SalomeResourcesManager DESTINATION ${KERNEL_salomelib_LIBS})
ENDIF(NOT WITHONLYLAUNCHER)
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${HDF5_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_BINARY_DIR}/idl
)
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
+IF(WINDOWS)
+ ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WINDOWS)
+
SET(COMMON_LIBS
TOOLSDS
SalomeNS
SalomeGenericObj
SalomeLifeCycleCORBA
SalomeIDLKernel
- ${HDF5_LIBS}
+ ${HDF5_C_LIBRARIES}
)
SET(SalomeDS_SOURCES
SALOMEDS_AttributeParameter.cxx
SALOMEDS_AttributeString.cxx
SALOMEDS_IParameters.cxx
- SALOMEDS_AttLong_i.hxx
- SALOMEDS_AttReal_i.hxx
- SALOMEDS_AttributeComment.hxx
- SALOMEDS_AttributeComment_i.hxx
- SALOMEDS_AttributeDrawable.hxx
- SALOMEDS_AttributeDrawable_i.hxx
- SALOMEDS_AttributeExpandable.hxx
- SALOMEDS_AttributeExpandable_i.hxx
- SALOMEDS_AttributeExternalFileDef.hxx
- SALOMEDS_AttributeExternalFileDef_i.hxx
- SALOMEDS_AttributeFileType.hxx
- SALOMEDS_AttributeFileType_i.hxx
- SALOMEDS_AttributeFlags.hxx
- SALOMEDS_AttributeFlags_i.hxx
- SALOMEDS_AttributeGraphic.hxx
- SALOMEDS_AttributeGraphic_i.hxx
- SALOMEDS_AttributeInteger.hxx
- SALOMEDS_AttributeInteger_i.hxx
- SALOMEDS_AttributeIOR.hxx
- SALOMEDS_AttributeIOR_i.hxx
- SALOMEDS_AttributeLocalID.hxx
- SALOMEDS_AttributeLocalID_i.hxx
- SALOMEDS_AttributeName.hxx
- SALOMEDS_AttributeName_i.hxx
- SALOMEDS_AttributeOpened.hxx
- SALOMEDS_AttributeOpened_i.hxx
- SALOMEDS_AttributePersistentRef.hxx
- SALOMEDS_AttributePersistentRef_i.hxx
- SALOMEDS_AttributePixMap.hxx
- SALOMEDS_AttributePixMap_i.hxx
- SALOMEDS_AttributePythonObject.hxx
- SALOMEDS_AttributePythonObject_i.hxx
- SALOMEDS_AttributeReal.hxx
- SALOMEDS_AttributeReal_i.hxx
- SALOMEDS_AttributeSelectable.hxx
- SALOMEDS_AttributeSelectable_i.hxx
- SALOMEDS_AttributeSequenceOfInteger.hxx
- SALOMEDS_AttributeSequenceOfInteger_i.hxx
- SALOMEDS_AttributeSequenceOfReal.hxx
- SALOMEDS_AttributeSequenceOfReal_i.hxx
- SALOMEDS_Attributes.hxx
- SALOMEDS_AttributeStudyProperties.hxx
- SALOMEDS_AttributeStudyProperties_i.hxx
- SALOMEDS_AttributeTableOfInteger.hxx
- SALOMEDS_AttributeTableOfInteger_i.hxx
- SALOMEDS_AttributeTableOfReal.hxx
- SALOMEDS_AttributeTableOfReal_i.hxx
- SALOMEDS_AttributeTableOfString.hxx
- SALOMEDS_AttributeTableOfString_i.hxx
- SALOMEDS_AttributeTarget.hxx
- SALOMEDS_AttributeTarget_i.hxx
- SALOMEDS_AttributeTextColor.hxx
- SALOMEDS_AttributeTextColor_i.hxx
- SALOMEDS_AttributeTextHighlightColor.hxx
- SALOMEDS_AttributeTextHighlightColor_i.hxx
- SALOMEDS_AttributeTreeNode.hxx
- SALOMEDS_AttributeTreeNode_i.hxx
- SALOMEDS_AttributeUserID.hxx
- SALOMEDS_AttributeUserID_i.hxx
- SALOMEDS_BasicAttributeFactory.hxx
- SALOMEDS_BasicAttribute_i.hxx
- SALOMEDS_Callback_i.hxx
- SALOMEDS_ChildIterator.hxx
- SALOMEDS_ChildIterator_i.hxx
- SALOMEDS_ClientAttributes.hxx
- SALOMEDS_Driver_i.hxx
- SALOMEDS_GenericAttribute.hxx
- SALOMEDS_GenericAttribute_i.hxx
- SALOMEDS.hxx
- SALOMEDS_SComponent.hxx
- SALOMEDS_SComponent_i.hxx
- SALOMEDS_SComponentIterator.hxx
- SALOMEDS_SComponentIterator_i.hxx
- SALOMEDS_SObject.hxx
- SALOMEDS_SObject_i.hxx
- SALOMEDS_StudyBuilder.hxx
- SALOMEDS_StudyBuilder_i.hxx
- SALOMEDS_Study.hxx
- SALOMEDS_Study_i.hxx
- SALOMEDS_StudyManager.hxx
- SALOMEDS_StudyManager_i.hxx
- SALOMEDS_UseCaseBuilder.hxx
- SALOMEDS_UseCaseBuilder_i.hxx
- SALOMEDS_UseCaseIterator.hxx
- SALOMEDS_UseCaseIterator_i.hxx
- SALOMEDS_AttributeParameter.hxx
- SALOMEDS_AttributeParameter_i.hxx
- SALOMEDS_AttributeString.hxx
- SALOMEDS_AttributeString_i.hxx
- SALOMEDS_TMPFile_i.hxx
)
-IF(WINDOWS)
- SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
-ENDIF(WINDOWS)
-ADD_LIBRARY(SalomeDS SHARED ${SalomeDS_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SalomeDS ${SalomeDS_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDS ${COMMON_LIBS})
INSTALL(TARGETS SalomeDS DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(SALOMEDS_Server SALOMEDS_Server.cxx)
-SET_TARGET_PROPERTIES(SALOMEDS_Server PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
ADD_EXECUTABLE(SALOMEDS_Client SALOMEDS_Client.cxx)
-SET_TARGET_PROPERTIES(SALOMEDS_Client PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
INSTALL(TARGETS SALOMEDS_Server SALOMEDS_Client DESTINATION ${KERNEL_salomebin_BINS})
#
INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${BOOST_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
SalomeIDLKernel
)
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+
IF(WINDOWS)
- SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
+ ADD_DEFINITIONS(-DNOGDI)
ENDIF(WINDOWS)
-ADD_LIBRARY(SALOMEDSTest SHARED SALOMEDSTest.cxx)
-SET_TARGET_PROPERTIES(SALOMEDSTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SALOMEDSTest SALOMEDSTest.cxx)
TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS})
INSTALL(TARGETS SALOMEDSTest DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(TestSALOMEDS TestSALOMEDS.cxx)
-SET_TARGET_PROPERTIES(TestSALOMEDS PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
INSTALL(TARGETS TestSALOMEDS DESTINATION ${KERNEL_salomebin_BINS})
# Executable scripts to be installed
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
+ ${Boost_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_BINARY_DIR}/idl
)
-ADD_LIBRARY(SalomeDSClient SHARED SALOMEDSClient_ClientFactory.cxx)
-SET_TARGET_PROPERTIES(SalomeDSClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeDSClient SALOMEDSClient_ClientFactory.cxx)
TARGET_LINK_LIBRARIES(SalomeDSClient SalomeIDLKernel)
INSTALL(TARGETS SalomeDSClient DESTINATION ${KERNEL_salomelib_LIBS})
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
)
# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
# This local variable defines the list of dependant libraries common to all target in this package.
SET(COMMON_LIBS
SALOMEBasics
SalomeHDFPersist
DF
- ${HDF5_LIBS}
+ ${HDF5_C_LIBRARIES}
)
SET(SalomeDSImpl_SOURCES
SALOMEDSImpl_ScalarVariable.hxx
)
-ADD_LIBRARY(SalomeDSImpl SHARED ${SalomeDSImpl_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SalomeDSImpl ${SalomeDSImpl_SOURCES})
TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${PLATFORM_LIBS})
INSTALL(TARGETS SalomeDSImpl DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(testDS testDS.cxx)
-SET_TARGET_PROPERTIES(testDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${PLATFORM_LIBS})
INSTALL(TARGETS testDS DESTINATION ${KERNEL_salomebin_BINS})
#
INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${BOOST_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
${CMAKE_BINARY_DIR}/idl
)
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-
# This local variable defines the list of dependant libraries common to all target in this package.
SET(COMMON_LIBS
${CPPUNIT_LIBS}
SalomeIDLKernel
)
-ADD_LIBRARY(SALOMEDSImplTest SHARED SALOMEDSImplTest.cxx)
-SET_TARGET_PROPERTIES(SALOMEDSImplTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+
+ADD_LIBRARY(SALOMEDSImplTest SALOMEDSImplTest.cxx)
TARGET_LINK_LIBRARIES(SALOMEDSImplTest ${COMMON_LIBS})
INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(TestSALOMEDSImpl TestSALOMEDSImpl.cxx)
-SET_TARGET_PROPERTIES(TestSALOMEDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
TARGET_LINK_LIBRARIES(TestSALOMEDSImpl SALOMEDSImplTest SalomeDSImpl NamingServiceTest ${COMMON_LIBS})
INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${KERNEL_salomebin_BINS})
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${PTHREAD_INCLUDE_DIRS}
)
SET(COMMON_HEADERS
SALOME_LocalTrace.hxx
)
-ADD_LIBRARY(SALOMELocalTrace SHARED ${SALOMELocalTrace_SOURCES})
-SET_TARGET_PROPERTIES(SALOMELocalTrace PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBS})
+ADD_LIBRARY(SALOMELocalTrace ${SALOMELocalTrace_SOURCES})
+TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${CMAKE_THREAD_LIBS_INIT})
INSTALL(TARGETS SALOMELocalTrace DESTINATION ${KERNEL_salomelib_LIBS})
INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
INCLUDE_DIRECTORIES(
${CPPUNIT_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
)
-ADD_LIBRARY(SALOMELocalTraceTest SHARED SALOMELocalTraceTest.cxx)
-SET_TARGET_PROPERTIES(SALOMELocalTraceTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBS} ${PTHREAD_LIBS} ${PLATFORM_LIBS})
+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})
ADD_EXECUTABLE(TestSALOMELocalTrace TestSALOMELocalTrace.cxx)
-SET_TARGET_PROPERTIES(TestSALOMELocalTrace PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(TestSALOMELocalTrace SALOMELocalTraceTest SALOMELocalTrace SALOMEBasics ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${KERNEL_salomebin_BINS})
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_BINARY_DIR}/idl
)
-ADD_LIBRARY(with_loggerTraceCollector SHARED SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
-SET_TARGET_PROPERTIES(with_loggerTraceCollector PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
+ADD_LIBRARY(with_loggerTraceCollector SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
-TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBS} ${PTHREAD_LIBS})
+TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
INSTALL(TARGETS with_loggerTraceCollector DESTINATION ${KERNEL_salomelib_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INCLUDE_DIRECTORIES(
${CPPUNIT_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
SALOMELocalTraceTest
SALOMELocalTrace
SALOMEBasics
- ${PTHREAD_LIBS}
+ ${CMAKE_THREAD_LIBS_INIT}
${PLATFORM_LIBS}
)
-ADD_LIBRARY(SALOMETraceCollectorTest SHARED SALOMETraceCollectorTest.cxx)
-SET_TARGET_PROPERTIES(SALOMETraceCollectorTest PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
+ADD_LIBRARY(SALOMETraceCollectorTest SALOMETraceCollectorTest.cxx)
TARGET_LINK_LIBRARIES(SALOMETraceCollectorTest ${COMMON_LIBS})
INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(TestSALOMETraceCollector TestSALOMETraceCollector.cxx)
-SET_TARGET_PROPERTIES(TestSALOMETraceCollector PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(TestSALOMETraceCollector SALOMETraceCollectorTest ${COMMON_LIBS})
INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${KERNEL_salomebin_BINS})
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${HDF5_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_BINARY_DIR}/idl
)
-ADD_LIBRARY(TOOLSDS SHARED SALOMEDS_Tool.cxx)
-SET_TARGET_PROPERTIES(TOOLSDS PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBS})
+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})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
SalomeIDLKernel
)
-ADD_LIBRARY(SalomeTestComponentEngine SHARED ${SalomeTestComponentEngine_SOURCES})
-SET_TARGET_PROPERTIES(SalomeTestComponentEngine PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeTestComponentEngine ${SalomeTestComponentEngine_SOURCES})
TARGET_LINK_LIBRARIES(SalomeTestComponentEngine ${COMMON_LIBS})
+
INSTALL(TARGETS SalomeTestComponentEngine DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(TestLogger TestLogger.cxx)
-SET_TARGET_PROPERTIES(TestLogger PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
ADD_EXECUTABLE(TestContainer TestContainer.cxx)
-SET_TARGET_PROPERTIES(TestContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestContainer SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(TestContainer SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+
INSTALL(TARGETS TestLogger TestContainer DESTINATION ${KERNEL_salomebin_BINS})
# Executable scripts to be installed
#
INCLUDE_DIRECTORIES(
- ${MPI_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
+ ${MPI_CXX_INCLUDE_PATH}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
${CMAKE_BINARY_DIR}/idl
)
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS})
SET(COMMON_LIBS
Registry
SalomeMPIContainer
SalomeGenericObj
SalomeIDLKernel
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
)
-ADD_LIBRARY(SalomeTestMPIComponentEngine SHARED TestMPIComponentEngine.cxx)
-SET_TARGET_PROPERTIES(SalomeTestMPIComponentEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SalomeTestMPIComponentEngine TestMPIComponentEngine.cxx)
TARGET_LINK_LIBRARIES(SalomeTestMPIComponentEngine ${COMMON_LIBS})
INSTALL(TARGETS SalomeTestMPIComponentEngine DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(TestMPIContainer TestMPIContainer.cxx)
-SET_TARGET_PROPERTIES(TestMPIContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(TestMPIContainer SalomeTestMPIComponentEngine ${COMMON_LIBS} ${MPI_LIBS})
+TARGET_LINK_LIBRARIES(TestMPIContainer SalomeTestMPIComponentEngine ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
INSTALL(TARGETS TestMPIContainer DESTINATION ${KERNEL_salomebin_BINS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
#
INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
# Executables targets
# ===============================================================
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
SET(COMMON_LIBS
${CPPUNIT_LIBS}
SALOMEBasics
SALOMELocalTraceTest
)
-IF(CORBA_GEN)
+IF(SALOME_USE_CORBA)
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector/Test
${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
${CMAKE_CURRENT_SOURCE_DIR}/../Notification
${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
)
- SET(COMMON_FLAGS "${COMMON_FLAGS} -DWITH_CORBA ${OMNIORB_DEFINITIONS}")
+ ADD_DEFINITIONS(-DWITH_CORBA ${OMNIORB_DEFINITIONS})
SET(COMMON_LIBS
${COMMON_LIBS}
SalomeDS
SALOMEDSTest
SalomeIDLKernel
- ${OMNIORB_LIBS}
+ ${OMNIORB_LIBRARIES}
)
-ENDIF(CORBA_GEN)
+ENDIF(SALOME_USE_CORBA)
ADD_EXECUTABLE(UnitTests UnitTests.cxx)
-SET_TARGET_PROPERTIES(UnitTests PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
TARGET_LINK_LIBRARIES(UnitTests ${COMMON_LIBS})
INSTALL(TARGETS UnitTests DESTINATION ${KERNEL_salomebin_BINS})
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
+ ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}
Utils_Mutex.cxx
)
-ADD_LIBRARY(OpUtil SHARED ${OpUtil_SOURCES})
-SET_TARGET_PROPERTIES(OpUtil PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(OpUtil SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBS} ${PTHREAD_LIBS})
+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})
SET(COMMON_SCRIPTS
SALOMELocalTrace
SALOMETraceCollectorTest
SALOMEBasics
+ ${PLATFORM_LIBS}
)
-ADD_LIBRARY(UtilsTest SHARED UtilsTest.cxx)
-SET_TARGET_PROPERTIES(UtilsTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} ${PLATFORM_LIBS})
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
+ADD_LIBRARY(UtilsTest UtilsTest.cxx)
+TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} )
INSTALL(TARGETS UtilsTest DESTINATION ${KERNEL_salomelib_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_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestUtils ${COMMON_LIBS} UtilsTest ${OMNIORB_LIBRARIES})
INSTALL(TARGETS TestUtils DESTINATION ${KERNEL_salomebin_BINS})
SALOME_INSTALL_SCRIPTS(TestUtils.py ${KERNEL_salomescript_PYTHON})