]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Refactoring of the preprocessor definitions:
authorrnv <rnv@opencascade.com>
Wed, 16 Oct 2013 14:29:50 +0000 (14:29 +0000)
committerrnv <rnv@opencascade.com>
Wed, 16 Oct 2013 14:29:50 +0000 (14:29 +0000)
1) SIZEOF_FORTRAN_INTEGER anymore is not used.
2) Move SIZEOF_INT and SIZEOF_LONG into the FindOmniOrb.cmake because it needs only for the OmniOrb for WINDOWS platforms.

Add d suffix for the OmiOrb libraries in debug for windows.

salome_adm/cmake_files/FindOmniORB.cmake

index b6680e701ca5a68cd07d4ea95271906fb9ff5e8a..0cff11b99415df6f63f56da7bb2b88164364a3e6 100644 (file)
@@ -54,13 +54,23 @@ FIND_PATH(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h)
 ##############################################################################
 # 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 
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4_rt${CMAKE_STATIC_LIBRARY_SUFFIX})
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
   FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread_rt${CMAKE_STATIC_LIBRARY_SUFFIX})
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
   FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4_rt${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)
@@ -71,9 +81,9 @@ ENDIF (WIN32)
 
 IF (WIN32)
   FIND_LIBRARY( OMNIORB_LIBRARY_COS4
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4_rt${CMAKE_STATIC_LIBRARY_SUFFIX})
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
   FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4_rt${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)
@@ -131,7 +141,9 @@ 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...