Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
22778: [CEA 1298] Python file compilation should be done at build time, not install...
[modules/kernel.git]
/
salome_adm
/
cmake_files
/
FindOmniORB.cmake
diff --git
a/salome_adm/cmake_files/FindOmniORB.cmake
b/salome_adm/cmake_files/FindOmniORB.cmake
index 501ca5e96858be699c08016c566ce586e5d34f7d..0bdb3040277f3cfca25c51c1fcf52808e2d5fc62 100644
(file)
--- a/
salome_adm/cmake_files/FindOmniORB.cmake
+++ b/
salome_adm/cmake_files/FindOmniORB.cmake
@@
-7,7
+7,7
@@
# OMNIORB_VERSION - OmniORB4 version
# OMNIORB_IDL_COMPILER - OmniORB4 idl compiler command (omniidl)
# OMNIORB_NAMESERVER - OmniORB4 CORBA naming service (omniNames)
# OMNIORB_VERSION - OmniORB4 version
# OMNIORB_IDL_COMPILER - OmniORB4 idl compiler command (omniidl)
# OMNIORB_NAMESERVER - OmniORB4 CORBA naming service (omniNames)
-# OMNIORB_PYTHON
_BACKEND
+# OMNIORB_PYTHON
PATH - path to the OmniORB Python modules
# and many other mainly used in UseOmniORB.cmake
#
# Detection is made through calls to
# and many other mainly used in UseOmniORB.cmake
#
# Detection is made through calls to
@@
-18,12
+18,12
@@
#
################################################################
#
################################################################
-# Copyright (C) 2007-201
3
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
#
# 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.
+# version 2.1 of the License
, or (at your option) any later version
.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-36,7
+36,6
@@
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-################################################################
# minimum OmniORB4 supported version
# 4.0.6 has known bug float/double marshalling using CORBA::Any
# minimum OmniORB4 supported version
# 4.0.6 has known bug float/double marshalling using CORBA::Any
@@
-55,13
+54,23
@@
FIND_PATH(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h)
##############################################################################
# find libraries
##############################################################################
##############################################################################
# find libraries
##############################################################################
+
+# Win release / debug specific stuff:
+IF (WIN32)
+ IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+ SET(OMNIORB_RD_SUFFIX d)
+ ELSE()
+ SET(OMNIORB_RD_SUFFIX)
+ ENDIF()
+ENDIF()
+
IF (WIN32)
FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4
IF (WIN32)
FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4${CMAKE_STATIC_LIBRARY_SUFFIX})
+ NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4
_rt${OMNIORB_RD_SUFFIX}
${CMAKE_STATIC_LIBRARY_SUFFIX})
FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread${CMAKE_STATIC_LIBRARY_SUFFIX})
+ NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread
_rt${OMNIORB_RD_SUFFIX}
${CMAKE_STATIC_LIBRARY_SUFFIX})
FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX})
+ NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4
_rt${OMNIORB_RD_SUFFIX}
${CMAKE_STATIC_LIBRARY_SUFFIX})
ELSE (WIN32)
FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4 NAMES omniORB4)
FIND_LIBRARY(OMNIORB_LIBRARY_omnithread NAMES omnithread)
ELSE (WIN32)
FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4 NAMES omniORB4)
FIND_LIBRARY(OMNIORB_LIBRARY_omnithread NAMES omnithread)
@@
-72,9
+81,9
@@
ENDIF (WIN32)
IF (WIN32)
FIND_LIBRARY( OMNIORB_LIBRARY_COS4
IF (WIN32)
FIND_LIBRARY( OMNIORB_LIBRARY_COS4
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4${CMAKE_STATIC_LIBRARY_SUFFIX})
+ NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4
_rt${OMNIORB_RD_SUFFIX}
${CMAKE_STATIC_LIBRARY_SUFFIX})
FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX})
+ NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4
_rt${OMNIORB_RD_SUFFIX}
${CMAKE_STATIC_LIBRARY_SUFFIX})
ELSE (WIN32)
FIND_LIBRARY(OMNIORB_LIBRARY_COS4 NAMES COS4)
FIND_LIBRARY(OMNIORB_LIBRARY_COSDynamic4 NAMES COSDynamic4)
ELSE (WIN32)
FIND_LIBRARY(OMNIORB_LIBRARY_COS4 NAMES COS4)
FIND_LIBRARY(OMNIORB_LIBRARY_COSDynamic4 NAMES COSDynamic4)
@@
-85,10
+94,12
@@
ENDIF (WIN32)
##############################################################################
IF (WIN32)
FIND_PROGRAM( OMNIORB_IDL_COMPILER
##############################################################################
IF (WIN32)
FIND_PROGRAM( OMNIORB_IDL_COMPILER
- NAMES omniidl PATHS bin/x86_win32
+ NAMES omniidl
+ PATH_SUFFIXES x86_win32
DOC "What is the path where omniidl (the idl compiler) can be found")
FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
DOC "What is the path where omniidl (the idl compiler) can be found")
FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
- NAMES omniNames PATHS bin/x86_win32
+ NAMES omniNames
+ PATH_SUFFIXES x86_win32
DOC "What is the path where omniNames (the ORB server) can be found")
ELSE(WIN32)
FIND_PROGRAM(OMNIORB_IDL_COMPILER NAMES omniidl)
DOC "What is the path where omniNames (the ORB server) can be found")
ELSE(WIN32)
FIND_PROGRAM(OMNIORB_IDL_COMPILER NAMES omniidl)
@@
-116,6
+127,10
@@
IF(OMNIORB_LIBRARY_COSDynamic4)
LIST(APPEND OMNIORB_LIBRARIES ${OMNIORB_LIBRARY_COSDynamic4})
ENDIF()
LIST(APPEND OMNIORB_LIBRARIES ${OMNIORB_LIBRARY_COSDynamic4})
ENDIF()
+# Set path to the OmniORB Python modules
+GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${OMNIORB_LIBRARIES}" PATH)
+SET(OMNIORB_PYTHONPATH "${_tmp_ROOT_DIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages")
+
# Optionaly, extract the the version number from the acconfig.h file:
# The version check is done at the very bottom of this file.
IF( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
# Optionaly, extract the the version number from the acconfig.h file:
# The version check is done at the very bottom of this file.
IF( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
@@
-126,18
+141,15
@@
ELSE()
SET( OMNIORB_VERSION "NOT-FOUND" )
ENDIF( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
SET( OMNIORB_VERSION "NOT-FOUND" )
ENDIF( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
-SET(OMNIORB_IDLCXXFLAGS -Wba -nf)
-#SET(OMNIORB_IDLPYFLAGS -bpython)
-#IF (OMNIORB_PYTHON_BACKEND)
- #SET(OMNIORB_IDLPYFLAGS "-p ${OMNIORB_PYTHON_BACKEND} ${OMNIORB_IDLPYFLAGS}")
-#ENDIF()
+SET(OMNIORB_IDLCXXFLAGS -bcxx -Wba -nf)
SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
-#SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS})
SET(IDL_CLN_H .hh)
SET(IDL_SRV_H .hh)
SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
IF(WIN32)
SET(IDL_CLN_H .hh)
SET(IDL_SRV_H .hh)
SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
IF(WIN32)
- SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
+ ## OmniORB isn`t defines SIZEOF_LONG and SIZEOF_INT on WIN32 platform
+ ## Note SIZE_OF_LONG calculates in the SalomeSetupPlatform.cmake
+ SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__ -DSIZEOF_INT=4 -DSIZEOF_LONG=${SIZE_OF_LONG}")
ENDIF()
IF(APPLE)
SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...
ENDIF()
IF(APPLE)
SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...