Patch #708
closed
DCMTKConfigVersion.cmake not present in install
Added by Waldir Pimenta over 8 years ago.
Updated over 8 years ago.
Description
When locally building DCMTK, both DCMTKConfig.cmake
and DCMTKConfigVersion.cmake
are generated in the build directory. However, when doing make install
, only DCMTKConfig.cmake
is copied to the install directory, which makes the use of the library in other CMake-based projects fail if a version is passed to find_package()
.
After some investigation, I found the issue to be a capitalization mistake: in CMake/GenerateCMakeExports.cmake the version file is stored in the DCMTK_CONFIG_VERSION
variable, while CMakeLists.txt looks for it in ${dcmtk_config_version}
.
The attached patch fixes this issue (tested locally, works without issues) and adjusts the comments in CMakeLists.txt accordingly.
Files
- Category set to Configuration
- Assignee set to Michael Onken
- Target version set to 3.6.2
- Module set to CMake
I would suggest to use the upper case version of the variable name (in order to be consistent with the rest of the DCMTK). This also applies to "dcmtk_install_config".
Assigned to MO who introduced the "CMake export" feature.
Good point. Updated the patch accordingly.
- Assignee set to Michael Onken
- Target version set to 3.6.2
Sorry, for some reason the fields were automatically cleared by Redmine when I added my previous comment.
- Status changed from New to Closed
Integrated patch in commit d596c6fd.
No, thank you for the hint and patch.
In DCMTK we use an internal testing branch which is used for nightly builds with the idea that we want to make sure that all code that we publish on master compiles at least on the major systems.
If that is the case (or from time to time) we forward master to testing and publish it to the public repository.
So the commit will show up in a few days on git.dcmtk.org. Sorry for the confusion, I should have left a note.
No problem, I suspected that would be the case :) Time permitting, I'll add some instructions about the process for prospective contributors in the wiki.
Also available in: Atom
PDF