mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
Fixes for non-GUI builds
This commit is contained in:
parent
0cf1cfea5c
commit
685981d463
@ -32,6 +32,7 @@ if(USE_PYTHON)
|
|||||||
install(TARGETS ngpy ${ng_install_dir})
|
install(TARGETS ngpy ${ng_install_dir})
|
||||||
endif(USE_PYTHON)
|
endif(USE_PYTHON)
|
||||||
|
|
||||||
|
if(USE_GUI)
|
||||||
install(FILES
|
install(FILES
|
||||||
dialog.tcl menustat.tcl ngicon.tcl ng.tcl
|
dialog.tcl menustat.tcl ngicon.tcl ng.tcl
|
||||||
ngvisual.tcl sockets.tcl nghelp.tcl ngshell.tcl
|
ngvisual.tcl sockets.tcl nghelp.tcl ngshell.tcl
|
||||||
@ -41,4 +42,5 @@ install(FILES
|
|||||||
|
|
||||||
add_subdirectory(Togl2.1)
|
add_subdirectory(Togl2.1)
|
||||||
install(FILES drawing.tcl DESTINATION ${ng_install_dir_bin} COMPONENT netgen)
|
install(FILES drawing.tcl DESTINATION ${ng_install_dir_bin} COMPONENT netgen)
|
||||||
|
endif(USE_GUI)
|
||||||
|
|
||||||
|
@ -23,18 +23,20 @@ PYBIND11_PLUGIN(libngpy)
|
|||||||
py::module ngpy("libngpy", "pybind netgen module");
|
py::module ngpy("libngpy", "pybind netgen module");
|
||||||
py::module meshing = ngpy.def_submodule("_meshing", "pybind meshing module");
|
py::module meshing = ngpy.def_submodule("_meshing", "pybind meshing module");
|
||||||
ExportNetgenMeshing(meshing);
|
ExportNetgenMeshing(meshing);
|
||||||
py::module meshvis = ngpy.def_submodule("meshvis", "pybind meshvis module");
|
|
||||||
ExportMeshVis(meshvis);
|
|
||||||
py::module csg = ngpy.def_submodule("_csg", "pybind csg module");
|
py::module csg = ngpy.def_submodule("_csg", "pybind csg module");
|
||||||
ExportCSG(csg);
|
ExportCSG(csg);
|
||||||
py::module csgvis = ngpy.def_submodule("csgvis", "pybind csgvis module");
|
|
||||||
ExportCSGVis(csgvis);
|
|
||||||
py::module geom2d = ngpy.def_submodule("_geom2d", "pybind geom2d module");
|
py::module geom2d = ngpy.def_submodule("_geom2d", "pybind geom2d module");
|
||||||
ExportGeom2d(geom2d);
|
ExportGeom2d(geom2d);
|
||||||
py::module stl = ngpy.def_submodule("_stl", "pybind stl module");
|
py::module stl = ngpy.def_submodule("_stl", "pybind stl module");
|
||||||
ExportSTL(stl);
|
ExportSTL(stl);
|
||||||
|
#ifdef OPENGL
|
||||||
|
py::module meshvis = ngpy.def_submodule("meshvis", "pybind meshvis module");
|
||||||
|
ExportMeshVis(meshvis);
|
||||||
|
py::module csgvis = ngpy.def_submodule("csgvis", "pybind csgvis module");
|
||||||
|
ExportCSGVis(csgvis);
|
||||||
py::module stlvis = ngpy.def_submodule("stlvis", "pybind stlvis module");
|
py::module stlvis = ngpy.def_submodule("stlvis", "pybind stlvis module");
|
||||||
ExportSTLVis(stlvis);
|
ExportSTLVis(stlvis);
|
||||||
|
#endif // OPENGL
|
||||||
return ngpy.ptr();
|
return ngpy.ptr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,10 @@ endif(WIN32)
|
|||||||
|
|
||||||
add_library(nglib SHARED nglib.cpp ${nglib_objects})
|
add_library(nglib SHARED nglib.cpp ${nglib_objects})
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
target_link_libraries( nglib mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis )
|
target_link_libraries( nglib mesh stl interface geom2d csg stl visual)
|
||||||
|
if(USE_GUI)
|
||||||
|
target_link_libraries( nglib stlvis geom2dvis csgvis )
|
||||||
|
endif(USE_GUI)
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
|
|
||||||
target_link_libraries( nglib ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} )
|
target_link_libraries( nglib ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} )
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import libngpy
|
import libngpy
|
||||||
from libngpy._csg import *
|
from libngpy._csg import *
|
||||||
import libngpy.csgvis as csgvis
|
|
||||||
from libngpy.csgvis import MouseMove
|
|
||||||
from libngpy._meshing import MeshingParameters
|
from libngpy._meshing import MeshingParameters
|
||||||
from libngpy._meshing import Pnt
|
from libngpy._meshing import Pnt
|
||||||
from libngpy._meshing import Vec
|
from libngpy._meshing import Vec
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
import libngpy.csgvis as csgvis
|
||||||
|
from libngpy.csgvis import MouseMove
|
||||||
CSGeometry.VS = csgvis.VS
|
CSGeometry.VS = csgvis.VS
|
||||||
SetBackGroundColor = csgvis.SetBackGroundColor
|
SetBackGroundColor = csgvis.SetBackGroundColor
|
||||||
del csgvis
|
del csgvis
|
||||||
@ -14,6 +15,8 @@ del csgvis
|
|||||||
def VS (obj):
|
def VS (obj):
|
||||||
return obj.VS()
|
return obj.VS()
|
||||||
|
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def csg_meshing_func (geom, **args):
|
def csg_meshing_func (geom, **args):
|
||||||
|
Loading…
Reference in New Issue
Block a user