TinyTIFF
a lightweight C/C++ library for reading and writing TIFF files
|
This page explains how to build TinyTIFF.
The preferred way to build TinyTIFF is using CMake. You can find a detailed explanation of CMake at https://cliutils.gitlab.io/modern-cmake/. The CMake-build is defined in CMakeLists.txt
files, found in many of the directories of the code repository. Especially in the root directory and the two subdirectories ./src/ and
./examples/ .
You can use (MinGW) Makefiles by calling:
Note that we set several compiler options on the first run of cmake. The options are describe in detail below in Configuring a Build with CMake .
For Visual Studio it could look like this:
This call results in a Visual Studio solution build/TinyTIFF.sln
that you can load and compile from the Visual Studio IDE. Alternatively you can also build the solution directly calling:
Afterwards you can install the library by
The CMake build system offers several configuration variables that you may set/change to modify the outcome of the build:
CMAKE_PREFIX_PATH
: add the path to your Qt installatrion to this variable, so the find_package(Qt5...)
commands find the libraries you want to useBUILD_SHARED_LIBS
: Build as shared library (default: ON
)TinyTIFF_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE
: If set, the build-type is appended to the library name (default: ON
)TinyTIFF_BUILD_EXAMPLES
: Build examples (default: ON
)CMAKE_INSTALL_PREFIX
: Install directory for the library