The CiftiLib library requires boost headers and either QT (4.8.x or 5), or libxml++ 2.17.x or newer (and its dependencies: libxml2, glib, sigc++, gtkmm and glibmm) and the boost filesystem library to compile, and optionally uses zlib if you want to use its NIfTI reading capabilities for other purposes.
It is currently set up to be compiled, along with a few simple examples, by cmake:
To build it, and example executables, in the recommended "out-of-source" method using cmake:
#start one level up from the source tree
#make build directory beside the source tree, enter it
#make a build directory beside the source tree, enter it
mkdir build; cd build
#you may want to set the cmake variable CMAKE_BUILD_TYPE to Release or Debug before building
#NOTE: you may want to set the cmake variable CMAKE_BUILD_TYPE to Release or Debug before building
#the default build behavior may be non-optimized and without debug symbols.
#run cmake to generate makefiles
cmake ../CiftiLib -D CMAKE_BUILD_TYPE=Release
cmake -D CMAKE_BUILD_TYPE=Release ../CiftiLib
#OR
cmake-gui ../CiftiLib
#build
make
#OPTIONAL: run tests, make docs
#OPTIONAL: run tests
make test
#install library to location specified by cmake variable CMAKE_INSTALL_PREFIX
make install
#OPTIONAL: generate documentation (needs doxygen installed and on PATH)
make doc
The resulting library and example executables will be in subdirectories of the build directory, not in the source directory. You can install the library and headers (location controlled by cmake variable CMAKE_INSTALL_PREFIX and make variable DESTDIR) with 'make install'.
The build results will be in subdirectories of the build directory, not in the source directory.
To use the installed library, use pkg-config to get the needed directories and libraries. For instance, in cmake:
find_package(PkgConfig)
pkg_check_modules(PC_CIFTI REQUIRED CiftiLib)
You can then use cmake variables PC_CIFTI_LIBRARIES, PC_CIFTI_INCLUDE_DIRS, and similar, see here for descriptions: