MantisBT - CMake
View Issue Details
0012495CMakeCMakepublic2011-10-06 00:332012-03-06 08:37
Scott K Logan 
Brad King 
normalmajoralways
closedno change required 
x86_64Fedora15
CMake 2.8.4 
CMake 2.8.6 
0012495: FIND_PACKAGE does not search lib64 for VTK
When suing FindVTK.cmake, the FIND_PACKAGE command does not search /usr/lib64 for vtk-5.6, thus resulting in an error.
1. create a cmake file containing only "find_package (VTK REQUIRED)"
2. run cmake -P testfile.cmake
No tags attached.
Issue History
2011-10-06 00:33Scott K LoganNew Issue
2011-10-07 11:31Brad KingNote Added: 0027553
2011-10-07 11:31Brad KingAssigned To => Brad King
2011-10-07 11:31Brad KingStatusnew => assigned
2011-10-07 12:04Scott K LoganNote Added: 0027554
2011-10-07 12:36Brad KingNote Added: 0027556
2011-10-07 12:37Brad KingNote Added: 0027557
2011-10-07 12:37Brad KingStatusassigned => resolved
2011-10-07 12:37Brad KingFixed in Version => CMake 2.8.6
2011-10-07 12:37Brad KingResolutionopen => no change required
2012-03-06 08:37David ColeNote Added: 0028822
2012-03-06 08:37David ColeStatusresolved => closed

Notes
(0027553)
Brad King   
2011-10-07 11:31   
In "cmake -P" scripting mode CMake is not generating a build system. There is no target toolchain and therefore no target architecture. This is not expected to work.

Does it work in a normal CMakeLists.txt during configuration of a real project?
(0027554)
Scott K Logan   
2011-10-07 12:04   
I'm not sure. I found this bug compiling a ROS [0] package for Point Clouds [1].

Inside the makefile for this "stack," cmake -P is executed on a file with these contents:

find_package (VTK REQUIRED)
execute_process (COMMAND echo ${VTK_INCLUDE_DIRS} COMMAND sed "s/ / -I/g")

EOF

If I understand you correctly, the creator is misusing "cmake -P" and therefore this is not a bug in cmake? If so, how can similar functionality be achieved?

It looks like the developers primarily use Debian (Ubuntu) so this issue never arose for them.

Also, just to clarify, it looks like I failed in spelling "using" in this bug's description.

Thank you for a quick response.

[0] http://www.ros.org/ [^]
[1] http://www.ros.org/wiki/perception_pcl [^]
(0027556)
Brad King   
2011-10-07 12:36   
> If I understand you correctly, the creator is misusing "cmake -P" and therefore this is not a bug in cmake?

Correct. It may be possible to make "cmake -P" work for this with enough custom options to find_package but it would be ad-hoc.

As of CMake 2.8.5 the only way to achieve this functionality is to generate a CMakeLists.txt file and actually try to configure a project.

CMake 2.8.6 introduced a new "--find-package" option that is meant specifically for this use case. You or the ROS folks can contact our mailing list at

  http://www.cmake.org/mailman/listinfo/cmake [^]

to ask for help using it.
(0027557)
Brad King   
2011-10-07 12:37   
Resolving as no change required because this is not actually a CMake bug.

Please contact the previously linked mailing list for further help.
(0028822)
David Cole   
2012-03-06 08:37   
Closing resolved issues that have not been updated in more than 4 months.