From b54156f4151ef6c39e05e80b4715c666a06603ae Mon Sep 17 00:00:00 2001 From: nge Date: Sun, 20 Jan 2013 17:34:26 +0000 Subject: [PATCH] Add Calcium for OSX --- CMakeLists.txt | 5 +++++ salome_adm/cmake_files/FindOMNIORB.cmake | 6 +++--- src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt | 1 + src/DSC/DSC_User/Datastream/Calcium/fortoc.h | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b19bb1384..54d02e86b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,6 +128,11 @@ endif(SALOME_USE_DOC) INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) +SET(CALCIUM_IDL_INT_F77 long) +SET(CALCIUM_CORBA_INT_F77 CORBA::Long) +SET(LONG_OR_INT int) + + SET(KERNEL_salomebin_BINS bin/salome) SET(KERNEL_salomelib_LIBS lib/salome) diff --git a/salome_adm/cmake_files/FindOMNIORB.cmake b/salome_adm/cmake_files/FindOMNIORB.cmake index 08ae0bf0e..c638db9de 100644 --- a/salome_adm/cmake_files/FindOMNIORB.cmake +++ b/salome_adm/cmake_files/FindOMNIORB.cmake @@ -206,8 +206,8 @@ ENDIF (WIN32) ############################################################################## FIND_PATH( OMNIORB_PYTHON_BACKEND NAMES python.py - PATHS $ENV{OMNIORB_DIR}/lib/python${PYTHON_VERSION}/site-packages/omniidl_be $ENV{OMNIORBPY_DIR}/lib/python${PYTHON_VERSION}/site-packages/omniidl_be - ${OMNIORB_DIR}/lib/python${PYTHON_VERSION}/site-packages/omniidl_be ${OMNIORBPY_DIR}/lib/python${PYTHON_VERSION}/site-packages/omniidl_be + PATHS $ENV{OMNIORB_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/omniidl_be $ENV{OMNIORBPY_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/omniidl_be + ${OMNIORB_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/omniidl_be ${OMNIORBPY_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/omniidl_be DOC "Path to python-backend directory (omniidl_be) including python.py file" NO_DEFAULT_PATH ) @@ -270,7 +270,6 @@ if(OMNIORB_INCLUDE_DIR AND 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}) @@ -284,6 +283,7 @@ if(OMNIORB_INCLUDE_DIR AND 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() diff --git a/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt b/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt index 2f6d9838a..c2633e635 100755 --- a/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt +++ b/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt @@ -64,6 +64,7 @@ SET(CalciumC_SOURCES calciumf.c ) ADD_LIBRARY(CalciumC ${CalciumC_SOURCES}) +TARGET_LINK_LIBRARIES(CalciumC SalomeDSCSuperv SalomeCalcium) INSTALL(TARGETS CalciumC DESTINATION ${KERNEL_salomelib_LIBS}) diff --git a/src/DSC/DSC_User/Datastream/Calcium/fortoc.h b/src/DSC/DSC_User/Datastream/Calcium/fortoc.h index 479048ada..c8195211f 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/fortoc.h +++ b/src/DSC/DSC_User/Datastream/Calcium/fortoc.h @@ -23,7 +23,7 @@ /* Operateur de concatenation */ #define _(A,B) A##B -#ifdef __linux +#if defined __linux || defined __APPLE__ #define F_FUNC(lname,uname) _(lname,_) /* Fortran function name */ #define F_CALL(lname,uname) _(lname,_) /* Fortran function call */ #define STR_PSTR(str) char *str /* fortran string arg pointer */ -- 2.39.2