]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
ttk- patch implementation -otherwise blind to graphviz/embree
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 6 Oct 2022 10:15:37 +0000 (12:15 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 6 Oct 2022 10:15:37 +0000 (12:15 +0200)
products/TTK.pyconf
products/compil_scripts/TTK.sh
products/env_scripts/TTK.py
products/patches/ttk-f8dafde2d7-p01.patch [new file with mode: 0644]

index f87d196a4cd18b940b6b4c2ad0317b07c1dc9d40..5fff2f027398a4f37e2e44a139cbed1ba5c23964 100644 (file)
@@ -8,7 +8,7 @@ default :
     {
        env_script : "TTK.py"
     }
-    depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'ParaView', 'boost', 'qt', 'embree']
+    depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'ParaView', 'boost', 'qt', 'embree', "graphviz"]
     build_depend : ["cmake", "swig"]
     opt_depend : ['openmpi']
     patches : []
@@ -21,3 +21,8 @@ default :
       incremental : "yes"
     }
 }
+
+version_f8dafde2d7 :
+{
+  patches: ['ttk-f8dafde2d7-p01.patch']
+}
index a77a094e3cbdf92f335b35ecd83cfd7e8249a891..d8369866ae3348217d030181e6fe8c7be767a4a8 100755 (executable)
@@ -7,8 +7,13 @@ echo "##########################################################################
 CMAKE_OPTIONS=""
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+if [ -n "$SAT_DEBUG" ]; then
+    CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+else
+    CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+fi
 CMAKE_OPTIONS+=" -DTK_BUILD_PARAVIEW_PLUGINS=ON"
+CMAKE_OPTIONS+=" -Dembree_DIR:PATH=${EMBREE_ROOT_DIR}/lib/cmake/embree-${EMBREE_VERSION}"
 
 echo
 echo "*** cmake" $CMAKE_OPTIONS
index d1168cbf18c64a598c07cc19ba004593eb79d0a1..015487549ef9e333e6c349d2c31fa7b65b0feaf2 100644 (file)
@@ -1,14 +1,21 @@
 #!/usr/bin/env python
 import os.path
+import platform
 
 def set_env(env, prereq_dir, version):
     env.set('TTK_ROOT_DIR', prereq_dir)
     env.set('TTK_HOME', prereq_dir)
     env.set('TTK_VERSION',version)
-    env.prepend('PATH', os.path.join(prereq_dir,'bin'))
-    env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib'))
     pyver = 'python' + env.get('PYTHON_VERSION')
-    env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
+    if platform.system() == "Windows" :
+        env.prepend('PATH', os.path.join(prereq_dir,'bin'))
+        env.prepend('PV_PLUGIN_PATH', os.path.join(prereq_dir, 'bin'))
+        env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
+    else:
+        env.prepend('PATH', os.path.join(prereq_dir,'bin'))
+        env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib'))
+        env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
+        env.prepend('PV_PLUGIN_PATH',os.path.join(prereq_dir,'lib','plugins')
 
 def set_nativ_env(env):
     pass
diff --git a/products/patches/ttk-f8dafde2d7-p01.patch b/products/patches/ttk-f8dafde2d7-p01.patch
new file mode 100644 (file)
index 0000000..c6a76f8
--- /dev/null
@@ -0,0 +1,24 @@
+--- ttk_ref/CMake/config.cmake 2022-10-06 12:09:21.179305232 +0200
++++ ttk_dev/CMake/config.cmake 2022-10-06 12:08:43.950092714 +0200
+@@ -160,6 +160,10 @@
+   message(STATUS "Zlib not found, disabling Zlib support in TTK.")
+ endif()
++SET(EMBREE_ROOT_DIR $ENV{EMBREE_ROOT_DIR} CACHE PATH "Path to the EMBREE.")
++IF(EMBREE_ROOT_DIR)
++ LIST(APPEND CMAKE_PREFIX_PATH "${EMBREE_ROOT_DIR}")
++ENDIF(EMBREE_ROOT_DIR)
+ find_package(EMBREE 3.4 QUIET)
+ if(EMBREE_FOUND)
+   option(TTK_ENABLE_EMBREE "Enable embree raytracing for ttkCinemaImaging" ON)
+@@ -169,6 +173,10 @@
+   message(STATUS "EMBREE library not found, disabling embree support in TTK.")
+ endif()
++SET(GRAPHVIZ_ROOT_DIR $ENV{GRAPHVIZ_ROOT_DIR} CACHE PATH "Path to the GRAPHVIZ.")
++IF(GRAPHVIZ_ROOT_DIR)
++ LIST(APPEND CMAKE_PREFIX_PATH "${GRAPHVIZ_ROOT_DIR}")
++ENDIF(GRAPHVIZ_ROOT_DIR)
+ find_package(Graphviz QUIET)
+ if(Graphviz_FOUND)
+   option(TTK_ENABLE_GRAPHVIZ "Enable GraphViz support" ON)