CMake: pass variable DCMTK_MODULES

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Markus Sabin
Posts: 95
Joined: Tue, 2005-07-12, 13:50
Location: Erlangen, Germany

CMake: pass variable DCMTK_MODULES

#1 Post by Markus Sabin » Wed, 2021-09-15, 07:59

Dear all,

I am trying to build a sub-set of the DCMTK libraries by specifying the DCMTK_MODULES variable with the CMake command. I tried different ways of passing the variable and its value to CMake. However, it either only catches the first module:

Code: Select all

cmake -D BUILD_APPS=OFF -D DCMTK_MODULES=ofstd oflog dcmdata dcmimgle dcmimage dcmjpeg dcmtls dcmnet dcmsr <...>
or
-D DCMTK_MODULES:STRINGS=ofstd oflog dcmdata dcmimgle dcmimage dcmjpeg dcmtls dcmnet dcmsr <...>
Or it seems to really catch all the values but then fails in another CMake sub-script:

Code: Select all

"-DDCMTK_MODULES:STRINGS=ofstd oflog dcmdata dcmimgle dcmimage dcmjpeg dcmtls dcmnet dcmsr" <...>
with the following error message:

Code: Select all

CMake Error at CMakeLists.txt:88 (add_subdirectory):
  add_subdirectory given source "ofstd oflog dcmdata dcmimgle dcmimage
  dcmjpeg dcmtls dcmnet dcmsr" which is not an existing directory.
Any ideas? Thank you very much in advance.

J. Riesmeier
DCMTK Developer
Posts: 2317
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: CMake: pass variable DCMTK_MODULES

#2 Post by J. Riesmeier » Tue, 2021-09-21, 06:42

I am everything but a CMake expert (still using Autoconf on Linux ;-)) but according to what I've found in the CMakeCache.txt file, the following could work:

Code: Select all

-DDCMTK_MODULES:STRING="ofstd;oflog;dcmdata;dcmimgle;dcmimage;dcmjpeg;dcmjpls;dcmtls;dcmnet;dcmsr"

Markus Sabin
Posts: 95
Joined: Tue, 2005-07-12, 13:50
Location: Erlangen, Germany

Re: CMake: pass variable DCMTK_MODULES

#3 Post by Markus Sabin » Thu, 2021-09-23, 13:15

Thank you very much, Jörg. I can confirm that this works very well.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest