[cmake-developers] [CMake 0013125]: FindPkgConfig.cmake not setting PKG_CONFIG_FOUND in 2.8.8 rc2 (and rc1)

Mantis Bug Tracker mantis at public.kitware.com
Thu Apr 12 23:20:07 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13125 
====================================================================== 
Reported By:                Orion Poplawski
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13125
Category:                   Modules
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2012-04-12 23:20 EDT
Last Modified:              2012-04-12 23:20 EDT
====================================================================== 
Summary:                    FindPkgConfig.cmake not setting PKG_CONFIG_FOUND in
2.8.8 rc2 (and rc1)
Description: 
>From https://bugzilla.redhat.com/show_bug.cgi?id=812188

A few of my packages use pkg-config from within CMake to resolve build
dependencies, using the FindPkgConfig.cmake module shipped with CMake. 
According to the comments in rawhide's FindPkgConfig.cmake:

# It sets the following variables:
#   PKG_CONFIG_FOUND          ... true if pkg-config works on the system
#   PKG_CONFIG_EXECUTABLE     ... pathname of the pkg-config program
#   PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found
#                                 (since CMake 2.8.8)
#   PKG_CONFIG_FOUND          ... if pkg-config executable was found

(note the two lines mentioning PKG_CONFIG_FOUND with different meanings)

Most of my packages check for PKG_CONFIG_FOUND before trying to use pkg-config,
and the fact that this module is no longer setting that variable means that
CMake isn't picking up on all of the available dependencies.  The result is
FTBFS errors and missing program features on builds that do succeed.

Version-Release number of selected component (if applicable):
cmake-2.8.8-0.2.rc2.fc18.x86_64

Steps to Reproduce: 
The following simple CMakeLists.txt can be used to recreate the problem:

======begin CMakeLists.txt======
cmake_minimum_required(VERSION 2.8)

include(FindPkgConfig)

if(PKG_CONFIG_FOUND)
 message(STATUS "PkgConfig Found.")
else(PKG_CONFIG_FOUND)
 message(STATUS "PkgConfig Not Found.")
endif(PKG_CONFIG_FOUND)

message(STATUS "PkgConfig Executable: ${PKG_CONFIG_EXECUTABLE}")
======end CMakeLists.txt======

cmake-2.8.8-0.2.rc2.fc18.x86_64 in rawhide (f18) produces the following output:
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.25") 
-- PkgConfig Not Found.
-- PkgConfig Executable: /usr/bin/pkg-config

cmake-2.8.7-4.fc17.x86_64 in f17 produces:
-- PkgConfig Found.
-- PkgConfig Executable: /usr/bin/pkg-config
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-04-12 23:20 Orion PoplawskiNew Issue                                    
======================================================================




More information about the cmake-developers mailing list