MantisBT - CMake
View Issue Details
0012620CMakeModulespublic2011-12-12 11:282012-07-09 06:52
Aurélien Gâteau 
Brad King 
normalminoralways
closedfixed 
LinuxUbuntu12.04
CMake 2.8.6 
 
0012620: FindPkgConfig does not fail when pkg-config is not installed
If pkg-config is not installed and one calls "find_package(PkgConfig REQUIRED)" in a CMakeLists.txt, cmake does not fail.
- Make sure pkg-config is not installed
- Create a CMakeLists.txt with the line
  find_package(PkgConfig REQUIRED)
- Run cmake => no failure
No tags attached.
patch pkg-config-required.patch (982) 2012-01-16 12:04
https://public.kitware.com/Bug/file/4192/pkg-config-required.patch
Issue History
2011-12-12 11:28Aurélien GâteauNew Issue
2012-01-16 12:04Yury G. KudryashovFile Added: pkg-config-required.patch
2012-01-16 12:09Yury G. KudryashovNote Added: 0028321
2012-01-18 09:22Aurélien GâteauNote Added: 0028352
2012-01-20 08:44Brad KingNote Added: 0028376
2012-01-20 08:44Brad KingStatusnew => resolved
2012-01-20 08:44Brad KingResolutionopen => fixed
2012-01-20 08:44Brad KingAssigned To => Brad King
2012-07-09 06:52David ColeNote Added: 0029958
2012-07-09 06:52David ColeStatusresolved => closed

Notes
(0028321)
Yury G. Kudryashov   
2012-01-16 12:09   
The attached patch fixes the problem.

Offtopic: Aurélien, where do you need `find_package(PkgConfig REQUIRED)`?
Offtopic2: What does PKG_CONFIG_VERSION mean? It seem to be always equal to 1.
(0028352)
Aurélien Gâteau   
2012-01-18 09:22   
Thanks Yury for the patch. I am using 'find_package(PkgConfig REQUIRED)' to find libindicate-qt. I should probably write a FindIndicateQt.cmake file, but since the lib is Unix only, pkg-config was good enough for now.
(0028376)
Brad King   
2012-01-20 08:44   
I applied Yuri's patch after he posted it to our dev list:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55c3435d [^]

Thanks!
(0029958)
David Cole   
2012-07-09 06:52   
Closing resolved issues that have not been updated in more than 4 months.