]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
compatibility medfile (begin)
authoradam <adam>
Fri, 16 Jan 2009 16:54:25 +0000 (16:54 +0000)
committeradam <adam>
Fri, 16 Jan 2009 16:54:25 +0000 (16:54 +0000)
salome_adm/cmake_files/FindPLATFORM.cmake
salome_adm/cmake_files/am2cmake.py

index 0e681035ec2bfb3dbf6f152a20b28141d1c52faa..068623d19f7c70fc2c0162304fcde180ebecc949 100644 (file)
@@ -31,6 +31,7 @@ IF(WINDOWS)
   SET(MACHINE WINDOWS)
   SET(PLATFORM_CPPFLAGS)
   SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT)
+  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT)
   SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0)
   #  #  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT -D_CRT_SECURE_NO_WARNINGS)
   #  #  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500)
index 618e7c0af047f5c6634dbb2023072f5bea4b71fa..ae85fe8bab8b07d14f310e761c35ef6bd72a9b92 100644 (file)
@@ -127,6 +127,12 @@ class CMakeFile(object):
         # --
         content = content.replace("-no-undefined -version-info=0:0:0", "")
         content = content.replace("-include SALOMEconfig.h", "")
+
+        # --
+        # Compatibility medfile
+        # --
+        content = content.replace("-no-undefined -version-info 0:0:0", "")
+        content = content.replace("-no-undefined -version-info 2:5:1", "")
         
         # --
         cas_list = [
@@ -396,6 +402,14 @@ class CMakeFile(object):
                 SET(GEOM_ENABLE_GUI ON)
                 """)
                 pass
+            elif self.module == "medfile":
+                newlines.append("""
+                SET(MED_NUM_MAJEUR 2)
+                SET(MED_NUM_MINEUR 3)
+                SET(MED_NUM_RELEASE 5)
+                SET(LONG_OR_INT int)
+                """)
+                pass
             # --
             pass
         # --
@@ -886,6 +900,7 @@ class CMakeFile(object):
        SET(var ${var} ${PTHREADS_INCLUDES})
        SET(var ${var} ${${amname}_CPPFLAGS})
        SET(var ${var} ${${amname}_CXXFLAGS})
+       SET(var ${var} ${${amname}_CFLAGS})
         SET(flags)
         FOREACH(f ${var})
         SET(flags "${flags} ${f}")
@@ -968,13 +983,23 @@ class CMakeFile(object):
         # --
         self.setCompilationFlags(newlines)
         # --
-        newlines.append(r'''
-        SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION 0.0.0 SOVERSION 0)
-        ''')
+        if self.module == "medfile":
+            newlines.append(r'''
+            SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION 1.1.5 SOVERSION 1)
+            ''')
+        else:
+            newlines.append(r'''
+            SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION 0.0.0 SOVERSION 0)
+            ''')
+            pass
         # --
         from os.path import basename
         upper_name = basename(self.root).upper()
         # --
+        if upper_name in ["2.1.X", "2.3.1"]:
+            upper_name = "D_" + upper_name
+            pass
+        # --
         newlines.append(r'''
         SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL %s_EXPORTS)
         '''%(upper_name))
@@ -1005,27 +1030,36 @@ class CMakeFile(object):
         ''')
         # --
         if key != "noinst_LTLIBRARIES":
+            if self.module == "medfile":
+                newlines.append(r'''
+                SET(DEST lib)
+                ''')
+            else:
+                newlines.append(r'''
+                SET(DEST lib/salome)
+                ''')
+                pass
             newlines.append(r'''
             IF(BEGIN_WITH_lib)
-            INSTALL(TARGETS ${name} DESTINATION lib/salome)
+            INSTALL(TARGETS ${name} DESTINATION ${DEST})
             ''')
             if self.module == "geom":
                 newlines.append(r'''
                 IF(WINDOWS)
                 STRING(REGEX MATCH "Export" ISExport ${name})
                 IF(ISExport)
-                INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/lib/salome/${name}.dll DESTINATION lib/salome RENAME lib${name}.dll)
+                INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME lib${name}.dll)
                 ENDIF(ISExport)
                 STRING(REGEX MATCH "Import" ISImport ${name})
                 IF(ISImport)
-                INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/lib/salome/${name}.dll DESTINATION lib/salome RENAME lib${name}.dll)
+                INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME lib${name}.dll)
                 ENDIF(ISImport)
                 ENDIF(WINDOWS)
                 ''')
                 pass
             newlines.append(r'''
             IF(name STREQUAL SalomePyQt)
-            INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so DESTINATION lib/salome RENAME ${name}.so)
+            INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so DESTINATION ${DEST} RENAME ${name}.so)
             ENDIF(name STREQUAL SalomePyQt)
             ELSE(BEGIN_WITH_lib)
             IF(WINDOWS)
@@ -1066,17 +1100,27 @@ class CMakeFile(object):
         # --
         self.setLibAdd(newlines)
         # --
+        if self.module == "medfile":
+            newlines.append(r'''
+            SET(DEST bin)
+            ''')
+        else:
+            newlines.append(r'''
+            SET(DEST bin/salome)
+            ''')
+            pass
+        # --
         newlines.append(r'''
         IF(WINDOWS)
-        INSTALL(TARGETS ${name} DESTINATION bin/salome)
-        INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/bin/salome/${name}.exe DESTINATION bin/salome RENAME ${amname}.exe)
-        INSTALL(CODE "FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/bin/salome/${name}.exe)")
+        INSTALL(TARGETS ${name} DESTINATION ${DEST})
+        INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.exe DESTINATION ${DEST} RENAME ${amname}.exe)
+        INSTALL(CODE "FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.exe)")
         ELSE(WINDOWS)
         SET(PERMS)
         SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE)
         SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE)
         SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE)
-        INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name} DESTINATION bin/salome PERMISSIONS ${PERMS} RENAME ${amname})
+        INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name} DESTINATION ${DEST} PERMISSIONS ${PERMS} RENAME ${amname})
         ENDIF(WINDOWS)
         ''')
         # --