MantisBT - CMake
View Issue Details
0014644CMakeCMakepublic2013-12-12 07:242016-06-10 14:31
Marcel Metz 
Kitware Robot 
normalminoralways
closedmoved 
x86_64GNU/Linux3.11.9-200.fc19.
CMake 2.8.12 
 
0014644: FindJPEG.cmake doesn't honour JPEG_ROOT_DIR
According to Modules/readme.txt Find* modules should honour the Xxx_ROOT_DIR variable to locate separate installations of a library. However the FindJPEG modules doesn't use such a variable or a suitable alternative. Therefor it is impossible to select a jpeg library that isn't installed in a well known directory.
No tags attached.
patch FindJPEG.cmake.patch (1,238) 2013-12-12 07:24
https://public.kitware.com/Bug/file/5014/FindJPEG.cmake.patch
patch FindJPEG.cmake.1.patch (1,250) 2013-12-12 07:29
https://public.kitware.com/Bug/file/5015/FindJPEG.cmake.1.patch
Issue History
2013-12-12 07:24Marcel MetzNew Issue
2013-12-12 07:24Marcel MetzFile Added: FindJPEG.cmake.patch
2013-12-12 07:29Marcel MetzFile Added: FindJPEG.cmake.1.patch
2013-12-12 07:30Marcel MetzNote Added: 0034770
2013-12-16 04:08Rolf Eike BeerNote Added: 0034777
2013-12-16 04:52Marcel MetzNote Added: 0034778
2013-12-16 04:56Rolf Eike BeerNote Added: 0034779
2013-12-16 05:09Marcel MetzNote Added: 0034780
2014-02-17 14:39Marcel MetzNote Edited: 0034780bug_revision_view_page.php?bugnote_id=34780#r1386
2016-06-10 14:29Kitware RobotNote Added: 0042446
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0034770)
Marcel Metz   
2013-12-12 07:30   
My bad, the first patch contained a typo.
(0034777)
Rolf Eike Beer   
2013-12-16 04:08   
I wonder if this patch gives any benefits against simply setting CMAKE_PREFIX_PATH from the command line. I think the documentation of the *_ROOT_DIR should be changed so it states that if you ever need such a variable it should be called *_ROOT_DIR, but in general one should avoid introducing one and should look if setting CMAKE_PREFIX_PATH isn't working.
(0034778)
Marcel Metz   
2013-12-16 04:52   
> I wonder if this patch gives any benefits against simply setting CMAKE_PREFIX_PATH from the command line.

As far as I know it isn't possible to set up the CMAKE_PREFIX_PATH within a CMakeLists.txt file. You are forced to set it on the command line or as an environment variable.
(0034779)
Rolf Eike Beer   
2013-12-16 04:56   
Since you can't know the layout of the users system in advance setting anything like that environment variable from with a CMakeLists.txt is wrong anyway.
(0034780)
Marcel Metz   
2013-12-16 05:09   
(edited on: 2014-02-17 14:39)
In my case the layout of the user system is known. The jpeg library (and other libraries) are bundled in a development toolkit (I'm unable to change that) which should be dropped in a certain subdirectory of my CMake base project. But I'm open for other ideas how to fix that. I could also just use the patched FindJPEG in the private project cmake module path, but I thought this patch is maybe useful for the upstream project too.

(0042446)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.