forked from GLVis/glvis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
154 lines (108 loc) · 5.83 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
GLVis visualization tool
_/_/_/ _/ _/ _/ _/
_/ _/ _/ _/ _/_/_/
_/ _/_/ _/ _/ _/ _/ _/_/
_/ _/ _/ _/ _/ _/ _/_/
_/_/_/ _/_/_/_/ _/ _/ _/_/_/
http://glvis.org
GLVis is an X11 application and can be built on Linux/Unix systems including
Mac OS X using the X11/XQuarz app and under Windows using Cygwin/X.
Besides a C++ compiler, GLVis depends on the following external packages:
- the MFEM library (use the latest release) plus any libraries that MFEM was
built to depend on
http://mfem.org
- the X11, GL and GLU libraries
http://www.x.org, http://www.opengl.org, http://www.mesa3d.org
- the XQuarz app (on Mac OS X)
http://www.xquartz.org/
- the libpng or libtiff library; used for taking screenshots (optional)
http://www.libpng.org, http://www.libtiff.org
- the FreeType 2 and Fontconfig libraries; used for font rendering (optional)
http://www.freetype.org, http://www.fontconfig.org
- Cygwin/X (on Windows); install the packages xinit, libpng-devel,
fontconfig-devel, libGLU-devel.
https://cygwin.com, https://x.cygwin.com
There are two build systems, one based on GNU make and one based on CMake, as
described below. Choose the one that matches the build system you used to
build MFEM.
In addition to the native build systems, a GLVis package is also available
in the Spack package manager, https://github.com/LLNL/spack.
Building with GNU make
======================
GLVis comes with a standard makefile, which can be adjusted to specify the paths
to the external libraries, the compiler flags, etc.
Some of the available 'make' targets are:
make -> Builds the glvis binary, using the MFEM compiler and options
make opt -> Builds an optimized version
make debug -> Builds a debug version
make clean -> Cleans the build
make style -> Format the code with Artistic Style.
make help -> Prints a short help message
Information about the current build configuration can be viewed using
make status
make info
An optional installation of the glvis executable can be performed with
make install [PREFIX=<dir>]
Building with CMake
===================
GLVis may also be configured using CMake to find dependencies.
NOTE: You must have built MFEM using CMake to build GLVis using CMake.
An example invocation of CMake may be:
cmake \
-G Ninja \
-D CMAKE_BUILD_TYPE:STRING=Release \
-D CMAKE_INSTALL_PREFIX:STRING=/path/to/glvis/install \
\
-D GLVIS_USE_LIBTIFF=OFF \
-D GLVIS_USE_LIBPNG=ON \
-D GLVIS_USE_FREETYPE=ON \
\
-D MFEM_DIR=/path/to/directory/with/MFEMConfig.cmake \
\
/path/to/glvis/source
Some important variables for CMake are:
- MFEM_DIR: This is the MFEM build or install prefix. Can be used if the MFEM
location is not auto-detected correctly.
- mfem_DIR: (alternative to MFEM_DIR) This is the location of the configuration
file MFEMConfig.cmake that is created during the build and/or install of
MFEM. You may use either the build directory's config file or the install
directory's config file.
- CMAKE_BUILD_TYPE: Most common options are "Debug" and "Release" [default].
- CMAKE_INSTALL_PREFIX: Top-level directory for the install. GLVis will be
installed to ${CMAKE_INSTALL_PREFIX}/bin. Default is "/usr/local".
- GLVIS_USE_LIBPNG: Use libpng for creating screenshots. Default is "ON".
- GLVIS_USE_LIBTIFF: Use libtiff for creating screenshots. Default is "OFF".
- GLVIS_USE_FREETYPE: Use freetype for font rendering. Default is "ON".
- GLVIS_MULTISAMPLE and GLVIS_MS_LINEWIDTH: See building considerations below
for more information on these variables.
Some building considerations
============================
- On most Linux distributions, the required dependencies (except MFEM) can be
installed via a package manager. Usually it is sufficient to install the
packages: libGLU-dev, libpng-dev, and fontconfig-dev with their dependencies
(actual packages names may vary).
- To adjust the anti-aliasing settings for your hardware:
1) Modify the value of the GLVIS_MULTISAMPLE variable (multisample mode) in
the makefile or CMake invocation. Supported values can be obtained from
the 'glxinfo' command ('ms' columns) or a from a tool like
'nvidia-settings'.
2) Modify the value of the GLVIS_MS_LINEWIDTH variable (anti-aliased line
width) in the makefile or CMake invocation. Note that the same value can
produce different results depending on the OpenGL implementation.
3) The above options and some other built-in defaults can be overwritten with
command line options, see glvis -h for short help.
- If your X11 server does not support GLX 1.3, you can build GLVis to only use
GLX 1.0 calls, by specifying the GLVIS_GLX10 define. Note that the X11.app
in OS X may complain about GLX 1.3 support, but in practice works fine with
GLVis. To define this in CMake, pass "-D GLVIS_USE_GLX10=ON" to cmake.
- GLVis can be built without libpng/libtiff/FreeType 2/Fontconfig by setting
the makefile variables USE_LIBPNG/USE_LIBTIFF/USE_FREETYPE to NO or by
passing GLVIS_USE_LIBPNG/GLVIS_USE_LIBTIFF/GLVIS_USE_FREETYPE=OFF to cmake.
- On Mac OS X, it is better to start manually the XQuarz app, before starting
GLVis, in order to avoid the wait for establishing the first X11 connection.
- Support for secure sockets using the GnuTLS library through MFEM can be
enabled by configuring and compiling MFEM with the option MFEM_USE_GNUTLS=YES,
see MFEM's INSTALL for more details. In addition, in order for this to work,
one needs to generate GLVis server/client key pairs (in ~/.config/glvis),
similar to ssh keys. The script 'glvis-keygen.sh' can be used to do that:
bash glvis-keygen.sh ["Your Name"] ["Your Email"]