]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
PR: synchro V7_main tag mergefrom_V6_main_19Mar13
authorprascle <prascle>
Wed, 20 Mar 2013 10:27:44 +0000 (10:27 +0000)
committerprascle <prascle>
Wed, 20 Mar 2013 10:27:44 +0000 (10:27 +0000)
adm_local/cmake_files/FindNETGEN.cmake
doc/salome/gui/NETGENPLUGIN/CMakeLists.txt
doc/salome/gui/NETGENPLUGIN/static/header.html.in
doc/salome/gui/NETGENPLUGIN/static/header_py.html.in

index 1b2209fb8515688862b2dc55eb32390d37f20948..c64662d096f8808c9ad601c4522ed8fc40282dda 100644 (file)
@@ -23,34 +23,62 @@ SET(NETGEN_INCLUDES)
 SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -I${NETGEN_INCLUDES_DIR} -I${NETGENHOME}/share/netgen/include)
 SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
 
+SET(NETGEN_LIBS)
+FIND_LIBRARY(NETGEN_LIB_csg csg PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
+#FIND_LIBRARY(NETGEN_LIB_gen gen PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
+FIND_LIBRARY(NETGEN_LIB_geom2d geom2d PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
+#FIND_LIBRARY(NETGEN_LIB_gprim gprim PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
+FIND_LIBRARY(NETGEN_LIB_interface interface PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
+#FIND_LIBRARY(NETGEN_LIB_la la PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
+FIND_LIBRARY(NETGEN_LIB_mesh mesh PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
+FIND_LIBRARY(NETGEN_LIB_occ occ PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
+FIND_LIBRARY(NETGEN_LIB_stl stl PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
 FIND_LIBRARY(NETGEN_LIB_nglib nglib PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
 
-# temporary, check to be added later
+FOREACH(LIBNAME 
+    ${NETGEN_LIB_csg} 
+#    ${NETGEN_LIB_gen}
+    ${NETGEN_LIB_geom2d} 
+#    ${NETGEN_LIB_gprim}
+    ${NETGEN_LIB_interface} 
+#    ${NETGEN_LIB_la}
+    ${NETGEN_LIB_mesh} 
+    ${NETGEN_LIB_occ} 
+    ${NETGEN_LIB_stl} 
+    ${NETGEN_LIB_nglib}
+    )
+  IF(LIBNAME)
+    SET(NETGEN_LIBS ${NETGEN_LIBS} ${LIBNAME})
+  ENDIF(LIBNAME)
+ENDFOREACH(LIBNAME )
+
+# Check Netgen version
 SET(NETGEN_V5 OFF)
+SET(tmp_check_netgen ${CMAKE_BINARY_DIR}/tmp_check_netgen.cxx)
+FILE(WRITE ${tmp_check_netgen}
+  "#include <iostream>      \n"
+  "#include <fstream>       \n"
+  "namespace nglib {        \n"
+  "#include \"nglib.h\"     \n"
+  "}                        \n"
+  "#include <occgeom.hpp>   \n"
+  "int main() {             \n"
+  "nglib::Ng_Init();        \n"
+  "netgen::Mesh* ngMesh;    \n"
+  "ngMesh->CalcLocalH(1.0); \n"
+  "nglib::Ng_Exit();        \n" 
+  "return 0;                \n"
+  "}                        \n"
+  )
+TRY_COMPILE(NETGEN_V5
+  ${CMAKE_BINARY_DIR}
+  ${tmp_check_netgen}
+  CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=${NETGEN_LIB_nglib}"
+  COMPILE_DEFINITIONS ${CAS_CPPFLAGS} ${NETGEN_INCLUDES}
+  OUTPUT_VARIABLE OUTPUT
+  )
+FILE(REMOVE ${tmp_check_netgen})
 
 IF(NETGEN_V5)
   SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -DNETGEN_V5)
 ENDIF(NETGEN_V5)
-
-SET(NETGEN_LIBS)
-IF(WINDOWS)
-  FIND_LIBRARY(NETGEN_LIB_csg csg PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  FIND_LIBRARY(NETGEN_LIB_gen gen PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  FIND_LIBRARY(NETGEN_LIB_geom2d geom2d PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  FIND_LIBRARY(NETGEN_LIB_gprim gprim PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  FIND_LIBRARY(NETGEN_LIB_interface interface PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  FIND_LIBRARY(NETGEN_LIB_la la PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  FIND_LIBRARY(NETGEN_LIB_mesh mesh PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  FIND_LIBRARY(NETGEN_LIB_occ occ PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  FIND_LIBRARY(NETGEN_LIB_stl stl PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_csg})
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_gen})
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_geom2d})
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_gprim})
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_interface})
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_la})
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_mesh})
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_occ})
-  SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_stl})
-ENDIF(WINDOWS)
-SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_nglib})
index 5f55b688a89cf2c2f89ac418697b74f2c0382a76..868561c5cbccf07dcbffea5d9bb2e80b0ddb5279 100755 (executable)
@@ -23,7 +23,7 @@ SET(top_builddir ${CMAKE_BINARY_DIR})
 SET(top_srcdir ${CMAKE_SOURCE_DIR})
 SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
 SET(builddir ${CMAKE_CURRENT_BINARY_DIR})
-SET(datadir${CMAKE_INSTALL_PREFIX}/share)
+SET(datadir ${CMAKE_INSTALL_PREFIX}/share)
 SET(docdir ${datadir}/doc/salome)
 SET(guidocdir ${docdir}/gui/NETGENPLUGIN)
 
@@ -56,7 +56,9 @@ IF(WINDOWS)
   SET(CALL_STR "call")
 ELSE(WINDOWS)
   SET(DOC_PYTHONPATH ${CMAKE_INSTALL_PREFIX}/bin/salome:${SMESH_ROOT_DIR}/bin/salome:${SMESH_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${MED_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${GEOM_ROOT_DIR}/bin/salome:${GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${KERNEL_ROOT_DIR}/bin/salome:${KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${OMNIORB_ROOT_USER}/lib/python${PYTHON_VERSION}/site-packages:${OMNIORB_ROOT_USER}/lib64/python${PYTHON_VERSION}/site-packages)
-  SET(SCR "export PYTHONPATH=${DOC_PYTHONPATH}:${PYTHONPATH}
+  SET(DOC_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/lib/salome:${SMESH_ROOT_DIR}/lib/salome:${MED_ROOT_DIR}/lib/salome:${GEOM_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/salome")
+  SET(SCR "export PYTHONPATH=${DOC_PYTHONPATH}:\${PYTHONPATH}
+  export LD_LIBRARY_PATH=${DOC_LD_LIBRARY_PATH}:\${LD_LIBRARY_PATH}
   export SMESH_MeshersList=${DOC_SMESH_MeshersList}
   ")
   SET(EXT "sh")
index 4571b4363cc48f96e171710a7d16e3659c419d88..d434d830d8e407b8095083b5f885ec14397f7e16 100755 (executable)
@@ -5,6 +5,8 @@
 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
 <title>$title</title>
 <link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="$relpath^jquery.js"></script>
+<script type="text/javascript" src="$relpath^dynsections.js"></script>
 $treeview
 $search
 $mathjax
index 61414bb57bac65fa3430f36fc70701268019a220..22abb143c4d909b892f33107f96d6cc28e5c2ced 100644 (file)
@@ -5,6 +5,8 @@
 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
 <title>$title</title>
 <link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="$relpath^jquery.js"></script>
+<script type="text/javascript" src="$relpath^dynsections.js"></script>
 $treeview
 $search
 $mathjax