I'm quite new to CMake, now I'm trying to compile the COLMAP software from https://colmap.github.io/ with it. It compiles the modules but when it comes to linking it fails with a number of errors like
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0'
I have libfreeimage and libtiff installed by the apt packages (libfreeimage-dev / libtiff4-dev). I also added libtiff explicitly to the dependencies in the CMakeLists-Files with the following
find_package(TIFF REQUIRED)
and
set(COLMAP_LIBRARIES
...
${FREEIMAGE_LIBRARIES}
${TIFF_LIBRARIES}
Do I have to set the libraries as having dynamic linkage somewhere in the CMake-File explicitly? Or what else could be the problem?