Cannot point to DCMTKConfig.cmake

378 views Asked by At

Using Windows 10, I want to configure the source of OpenSceneGraph via CMake to make it build-ready for Visual Studio. I also need some DCMTK functionalities, hence I want to link it.

OpenSceneGraph provides an attempt to link DCMTK in its CMakeLists.txt, but it fails (and since linking it is optional, configuration is finished nevertheless).

-- Trying to find DCMTK expecting DCMTKConfig.cmake
-- Trying to find DCMTK expecting DCMTKConfig.cmake - failed
-- Trying to find DCMTK relying on FindDCMTK.cmake
-- Please set DCMTK_DIR and re-run configure (missing: DCMTK_config_INCLUDE_DIR DCMTK_dcmdata_INCLUDE_DIR DCMTK_dcmimage_INCLUDE_DIR DCMTK_dcmimgle_INCLUDE_DIR DCMTK_dcmjpeg_INCLUDE_DIR DCMTK_dcmjpls_INCLUDE_DIR DCMTK_dcmnet_INCLUDE_DIR DCMTK_dcmpstat_INCLUDE_DIR DCMTK_dcmqrdb_INCLUDE_DIR DCMTK_dcmsign_INCLUDE_DIR DCMTK_dcmsr_INCLUDE_DIR DCMTK_dcmtls_INCLUDE_DIR DCMTK_ofstd_INCLUDE_DIR DCMTK_oflog_INCLUDE_DIR)

My DCMTK package does provide a DCMTKConfig.cmake file, and I've set a system environment variable DCMTK_DIR that points to its directory.

Researching the problem, I've found the article on FindDCMTK but I can't get any viable information out of it.

The directories for OpenSceneGraph and DCMTK are next to each other in a specified location.

How do I instruct CMake to find the configuration file of DCMTK?

1

There are 1 answers

0
Ruan Caiman On

As suggested by Tsyvarev in the comments above, I would also advise using the CMAKE Gui on Windows - when you attempt to configure, it should display everything it either set or changed with red highlights. Then you can manually edit the DCMTK related variables to point to the correct folders and/or files - you might be able to just edit the Root folders and hit configure again to let it populate based on root. When you are satisfied with the settings and not getting errors, then you can hit Generate to let it create the Visual Studio files.