No subject


Tue Nov 1 15:57:14 EDT 2011


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