Patch #708
closedDCMTKConfigVersion.cmake not present in install
0%
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
Updated by Jörg Riesmeier over 8 years ago
- 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.
Updated by Waldir Pimenta over 8 years ago
- File 0001-fix-CMake-definitions-to-properly-install-DCMTKConfi.patch 0001-fix-CMake-definitions-to-properly-install-DCMTKConfi.patch added
- Assignee deleted (
Michael Onken) - Target version deleted (
3.6.2)
Good point. Updated the patch accordingly.
Updated by Waldir Pimenta over 8 years ago
- 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.
Updated by Michael Onken over 8 years ago
- Status changed from New to Closed
Integrated patch in commit d596c6fd.
Updated by Waldir Pimenta over 8 years ago
Thanks for the quick resolution, Michael. One question: was the commit made in a branch other than master, or has it simply not been pushed yet? I just pulled master and don't see the change, and can't see it neither on http://support.dcmtk.org/redmine/projects/dcmtk/repository, nor on http://git.dcmtk.org/?p=dcmtk.git (and btw, is https://github.com/commontk/DCMTK maintained by the DCMTK team, or is it a third-party mirror?)
Updated by Michael Onken over 8 years ago
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.
Updated by Waldir Pimenta over 8 years ago
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.
Updated by Waldir Pimenta over 8 years ago
Now that the public repository has been updated, here's the link to the commit: http://git.dcmtk.org/?p=dcmtk.git;a=commit;h=d596c6fd986ad4d2a86ab74281d7f0eaa0c7e54d