Installation

June 3, 2026 ยท View on GitHub

Join the chat at https://gitter.im/naohisas/KVS

Kyoto Visualization System (KVS) is a multi-platform, open-source C++ library for developing scientific visualization applications. KVS provides classes and interfaces for isosurface extraction, streamlines, volume rendering, image processing, and related visualization tasks.

Installation

Getting KVS

git clone https://github.com/naohisas/KVS.git
cd KVS

Installation directory

KVS is installed into the directory specified by KVS_DIR.

Linux / macOS

export KVS_DIR=$HOME/local/kvs
export PATH=$KVS_DIR/bin:$PATH

Windows

VariableValue
KVS_DIRC:\Program Files\kvs
PATH%PATH%;%KVS_DIR%\bin

Configuration

KVS build options are mainly controlled by kvs.conf and environment variables.

kvs.conf contains feature flags such as KVS_ENABLE_OPENGL and KVS_SUPPORT_QT.

KVS_ENABLE_OPENGL     = 1
KVS_ENABLE_GLU        = 1
KVS_ENABLE_GLEW       = 0
KVS_ENABLE_OPENMP     = 0
KVS_ENABLE_DEPRECATED = 0

KVS_SUPPORT_GLUT      = 1
KVS_SUPPORT_GLFW      = 0
KVS_SUPPORT_FFMPEG    = 0
KVS_SUPPORT_OPENCV    = 0
KVS_SUPPORT_QT        = 0
KVS_SUPPORT_PYTHON    = 0
KVS_SUPPORT_MPI       = 0
KVS_SUPPORT_EGL       = 0
KVS_SUPPORT_OSMESA    = 0

Set a flag to 1 to enable the corresponding feature or support library.

Build with make

Linux / macOS

make
make install

Windows

nmake
nmake install

Common make targets

TargetDescription
make or make buildBuild KVS
make installInstall KVS into KVS_DIR
make cleanRemove build files
make rebuildClean and build again
make uninstallRemove the installed KVS_DIR directory
make reinstallUninstall and install again

make build options

The following variables can be passed as environment variables or command-line variables.

KVS_CPP_STANDARD=17 make
KVS_CPP_STANDARD=17 make install
KVS_CPP=clang++ KVS_CC=clang make

On macOS, KVS_MACOSX_DEPLOYMENT_TARGET can be used when a specific deployment target is required.

KVS_MACOSX_DEPLOYMENT_TARGET=14.0 make
KVS_MACOSX_DEPLOYMENT_TARGET=14.0 make install

If KVS_MACOSX_DEPLOYMENT_TARGET is not specified, KVS does not add -mmacosx-version-min, allowing the compiler, SDK, and package manager environment to choose the default deployment target.

Build with CMake

KVS also supports CMake builds. The CMake build reads kvs.conf and Makefile.def so that it can use settings compatible with the make-based build.

cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$KVS_DIR
cmake --build build -j
cmake --install build

You can also specify KVS_DIR directly.

cmake -S . -B build -DKVS_DIR=$HOME/local/kvs
cmake --build build -j
cmake --install build

CMake build options

CMake options can be specified with -D.

cmake -S . -B build \
  -DKVS_DIR=$HOME/local/kvs \
  -DKVS_CPP_STANDARD=17 \
  -DKVS_SUPPORT_QT=ON \
  -DKVS_SUPPORT_OPENCV=ON

On macOS:

cmake -S . -B build \
  -DKVS_DIR=$HOME/local/kvs \
  -DKVS_MACOSX_DEPLOYMENT_TARGET=14.0

Main build variables

VariablemakeCMakeDescription
KVS_DIRyesyesKVS installation prefix
KVS_CPP_STANDARDyesyesC++ standard, default is 17
KVS_MACOSX_DEPLOYMENT_TARGETyesyesmacOS deployment target
KVS_CPPyesyesC++ compiler
KVS_CCyespartialC compiler used by make
KVS_FCyespartialFortran compiler used by make
KVS_LDyesyesLinker command
KVS_PYyesyesPython executable
KVS_*_DIRyesyesRoot directory of an optional dependency
KVS_*_INCLUDE_PATHyesyesInclude path of an optional dependency
KVS_*_LIBRARY_PATHyesyesLibrary path of an optional dependency
KVS_*_LINK_LIBRARYyesyesExplicit link libraries

Examples:

KVS_GLFW_DIR=/opt/homebrew/opt/glfw make
cmake -S . -B build -DKVS_GLFW_DIR=/opt/homebrew/opt/glfw

Support packages

KVS supports optional packages through kvs.conf.

PackageFlagDescription
OpenGLKVS_ENABLE_OPENGLEnable OpenGL-based rendering functionality
GLUKVS_ENABLE_GLUEnable GLU support
GLEWKVS_ENABLE_GLEWEnable GLEW support
OpenMPKVS_ENABLE_OPENMPEnable OpenMP parallelization
Deprecated APIsKVS_ENABLE_DEPRECATEDEnable deprecated functions and classes
CUDAKVS_SUPPORT_CUDAEnable CUDA support
GLUTKVS_SUPPORT_GLUTBuild GLUT-based screen and widgets. See SupportGLUT README.
GLFWKVS_SUPPORT_GLFWBuild GLFW-based screen and widgets. See SupportGLFW README.
FFmpegKVS_SUPPORT_FFMPEGBuild movie input/output support. See SupportFFmpeg README.
OpenCVKVS_SUPPORT_OPENCVBuild OpenCV-based image/video support. See SupportOpenCV README.
QtKVS_SUPPORT_QTBuild Qt-based screen and widgets. See SupportQt README.
PythonKVS_SUPPORT_PYTHONBuild Python interaction support. See SupportPython README.
MPIKVS_SUPPORT_MPIBuild MPI support. See SupportMPI README.
EGLKVS_SUPPORT_EGLBuild GPU off-screen rendering support. See SupportEGL README.
OSMesaKVS_SUPPORT_OSMESABuild CPU off-screen rendering support. See SupportOSMesa README.

For package-specific settings, see the corresponding README files under Source/Support*.

After installation

The following files and directories are installed under KVS_DIR.

PathDescription
bin/KVS tools such as kvsmake, kvscheck, kvsconv, and kvsview
include/Header files
lib/Static libraries
lib/cmake/CMake package configuration files
kvs.confInstalled KVS configuration
Makefile.defInstalled make configuration

After installation, kvsmake can be used to create example or application build files.

kvsmake -G
make

For Qt applications:

kvsmake -Q
qmake
make

Copyright

KVS is released under the BSD 3-Clause License. See LICENSE for details.

KVS/Source/Core/NanoVG uses nanovg and stb.

KVS/Source/Core/FileFormat/XML uses tinyxml.

KVS/Source/SupportMPI/Renderer/ImageCompositor uses 234Compositor.

KVS/Source/SupportFFmpeg/AvCpp uses AvCpp.

Citation

When using KVS for your research and publishing the results in papers or other works, please cite this webpage or the following paper as a reference:

Naohisa Sakamoto and Koji Koyamada, KVS: A simple and effective framework for scientific visualization, Journal of Advanced Simulation in Science and Engineering (JASSE), Vol. 2, Issue 1, pp. 76-95, 2015.

@article{Naohisa Sakamoto2015,
  title={KVS: A simple and effective framework for scientific visualization},
  author={Naohisa Sakamoto and Koji Koyamada},
  journal={Journal of Advanced Simulation in Science and Engineering},
  volume={2},
  number={1},
  pages={76-95},
  year={2015},
  doi={10.15748/jasse.2.76}
}