]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #32926: Xdata compilation issue
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 31 Jan 2023 15:30:57 +0000 (16:30 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 31 Jan 2023 15:30:57 +0000 (16:30 +0100)
products/CONFIGURATION.pyconf
products/patches/SPNS-32926-CONFIGURATION-V9_2_0.XDATA.patch [new file with mode: 0644]

index c7640e8284ab71b94985313a02304ebe5ac30bc0..d8a062893b55864e3a2e93b46a98fe96d3efec9a 100755 (executable)
@@ -33,5 +33,5 @@ version_V9_9_0_FD36 :
 
 version_V9_2_0_CO8 :
 {
-  patches: ['SPNS-32926-CONFIGURATION-V9_2_0.FindXDR.patch']
+  patches: ['SPNS-32926-CONFIGURATION-V9_2_0.FindXDR.patch', 'SPNS-32926-CONFIGURATION-V9_2_0.XDATA.patch']
 }
diff --git a/products/patches/SPNS-32926-CONFIGURATION-V9_2_0.XDATA.patch b/products/patches/SPNS-32926-CONFIGURATION-V9_2_0.XDATA.patch
new file mode 100644 (file)
index 0000000..12e8b46
--- /dev/null
@@ -0,0 +1,45 @@
+diff --git a/cmake/FindXDR.cmake b/cmake/FindXDR.cmake
+index e8e8625..52f2de9 100644
+--- a/cmake/FindXDR.cmake
++++ b/cmake/FindXDR.cmake
+@@ -19,7 +19,7 @@
+ MESSAGE(STATUS "Check for XDR ...")
+-FIND_PATH(XDR_INCLUDE_DIRS rpc/xdr.h)
++FIND_PATH(XDR_INCLUDE_DIRS rpc/xdr.h PATH_SUFFIXES tirpc)
+ IF(XDR_INCLUDE_DIRS)
+    SET(XDR_DEFINITIONS "-DHAS_XDR")
+ ENDIF()
+@@ -34,6 +34,14 @@ IF(WIN32)
+       SET(XDR_INCLUDE_DIRS "${XDR_INCLUDE_DIRS2}")  # Make the detection fail
+     ENDIF()
+   ENDIF()
++ELSE(WIN32)
++  FIND_LIBRARY(XDR_LIBRARIES NAMES tirpc xdr)
++  IF(NOT XDR_LIBRARIES)
++    MESSAGE(STATUS  "Could not find XDR libraries ...")
++    SET(XDR_LIBRARIES) # reset variable tough
++  ELSE()
++    MESSAGE(STATUS "Found XDR libraries ${XDR_LIBRARIES} ...")
++  ENDIF()
+ ENDIF(WIN32)
+ INCLUDE(FindPackageHandleStandardArgs)
+diff --git a/cmake/SalomeMacros.cmake b/cmake/SalomeMacros.cmake
+index bc7baaa..6fa6fe0 100755
+--- a/cmake/SalomeMacros.cmake
++++ b/cmake/SalomeMacros.cmake
+@@ -120,10 +120,11 @@ MACRO(SALOME_INSTALL_SCRIPTS file_list path)
+     SET(_source_prefix "")
+     GET_FILENAME_COMPONENT(file_name ${file} NAME)
+     IF(NOT IS_ABSOLUTE ${file})
++      SET(_source_prefix "${CMAKE_CURRENT_SOURCE_DIR}/")
+       IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+         SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
++        SET(_source_prefix "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
+       ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+-      SET(_source_prefix "${CMAKE_CURRENT_SOURCE_DIR}/")
+     ENDIF(NOT IS_ABSOLUTE ${file})
+     INSTALL(FILES ${PREFIX}${file} DESTINATION ${path} PERMISSIONS ${PERMS})
+     GET_FILENAME_COMPONENT(ext ${file} EXT)