GDCM not found when ITK 5.0 is installed as shared library

#1

Hi all,

When trying to run an application built with ITK 5.0 installed as a shared library, I get the error:

error while loading shared libraries: libitkgdcmjpeg8-5.0.so.1: cannot open shared object file: No such file or directory

The error does not appear, when running the application with the ITK located in the corresponding build folder.
The error does also not appear, when running the application with ITK installed as a static library.

I am using Ubuntu 18.04 and Clang 6.0.

Steps to reproduce:

  1. Configure ITK-5.0 with BUILD_SHARED_LIBS:BOOL=ON and custom install prefix (all other options default)
  2. Build and install
  3. Build and run an ITK example (e.g. CreateAIndex)

Are there additional options I have to set in CMake, when installing ITK as a shared library?

Cheers,
Lukas