]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #32377: cgns detection - ensure that gmsh picks up the right library
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 6 Dec 2022 17:10:12 +0000 (18:10 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 6 Dec 2022 17:10:12 +0000 (18:10 +0100)
products/compil_scripts/gmsh-4.10.3.sh

index 4dcc6c045d8c4bc93731e4587a7f074636e7837c..bef11b9dcd88b46a1b43abd55097ca0edeb40117 100755 (executable)
@@ -27,6 +27,12 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_PRIVATE_API=ON"
 if [ -n "$CGNS_ROOT_DIR" ]; then
     # GMSH relies on the presence of this environment variable.
     export CGNS_ROOT=$CGNS_ROOT_DIR
+    if [ "${SAT_cgns_IS_NATIVE}" != "1" ]; then
+        # ensure that we are picking up the correct CGNS library
+        # e.g. Debian 10, cgns is centrally installed, CGNS_LIB will not target the embedded CGNS
+        # which will lead to compilation issue.
+        export LD_LIBRARY_PATH=$CGNS_ROOT/lib:$LD_LIBRARY_PATH
+    fi
     CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_CGNS=ON"
 else
     CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_CGNS=OFF"