Compilation and installation of DCMTK
Moderator: Moderator Team
- Posts: 37
- Joined: Mon, 2022-02-28, 08:55
I am building DCMTK (static libs) with ICU and OpenSSL on Windows with Visual Studio. To reduce build times of client software on CI/CD and developer computers, I would like to create a Nuget package (archive) that is downloaded from an artifact server. This reduces build times significantly compared to building DCMTK every time.
My problem is that after building DCMTK with CMake, the generated DCMTKTargets.cmake file contains absolute paths to the ICU and OpenSSL libraries like illustrated below
Code: Select all
This means that the output from CMake install is not relocatable. Is this a DCMTK limitation on Windows, or are there ways to avoid absolute paths like above?
- OFFIS DICOM Team
- Posts: 1362
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
On Windows, DCMTK uses a different mechanism (defined in CMake/3rdparty.cmake) to locate the external support libraries such as OpenSSL.
This makes use of the CMake find_path() command, which apparently always returns an absolute path. It should not be overly difficult to add some code in that file that converts such paths into a relative path. Unfortunately, CMake does not seem to have this functionality built-in.
Users browsing this forum: No registered users and 1 guest