You need, whatever your operating system:
If you have a GitHub account, just clone the repository, else download it as a zip archive. Then launch the demo example, which is creating PPM files with colormaps and colorbars for all the available colormaps:
$ git clone git@github.com:vmagnin/forcolormap.git
$ cd forcolormap
$ fpm run --example demo
To use ForColormap within your own fpm project, add the following lines to your fpm.toml manifest file:
[dependencies]
forcolormap = {git = "https://github.com/vmagnin/forcolormap.git"}
You can also build the project with CMake:
$ git clone git@github.com:vmagnin/forcolormap.git
$ cd forcolormap
$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install
By default, ForColormap is built as a static library by CMake. You can compile your program with the -static option:
$ gfortran -static my_program.f90 $(pkg-config --cflags --libs forcolormap forimage)
Note that ForColormap is depending on ForImage, and for static linking you must respect that order.
There is a CMake option to obtain a shared library:
$ cmake -D BUILD_SHARED_LIBS=true ..
You can compile your program like this:
$ gfortran my_program.f90 $(pkg-config --cflags --libs forcolormap)
If you encounter linking problems, you should verify the content of your PKG_CONFIG_PATH and LD_LIBRARY_PATH environment variables. For example, in Ubuntu or FreeBSD the .pc files will be installed in /usr/local/lib/pkgconfig/ and the libraries in /usr/local/lib/.
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
You can build the examples with:
$ cmake -D BUILD_FORCOLORMAP_EXAMPLES=true ..
$ make
$ cd example
The automatic tests can be run with:
$ cmake -D BUILD_TESTING=true ..
$ make
$ ctest
From the build directory:
$ sudo make uninstall_forcolormap
Note that its dependency ForImage will also be uninstalled! You will have to reinstall it if needed.
You can also choose and remove files listed in build/install_manifest.txt one by one.
See CMake basics for more information.