diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-08-16 11:01:49 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-08-16 11:01:49 (GMT) |
commit | 35175120b1773a674f096daee64d97e2efaf3a08 (patch) | |
tree | 511b576f0e98d4882b6cdb9dbb33c91f0e983519 | |
parent | 442742a187d9bb9032bb948f0257395fbbfbc8c4 (diff) | |
download | CMake-35175120b1773a674f096daee64d97e2efaf3a08.zip CMake-35175120b1773a674f096daee64d97e2efaf3a08.tar.gz CMake-35175120b1773a674f096daee64d97e2efaf3a08.tar.bz2 |
STYLE: /usr/local/bin is in the path anyway
STYLE: this file is mostly uppercase commands, so make all commands
uppercase
ENH: add a status message in case pkgconfig didn't find the package (sync
with the one from KDE)
Alex
-rw-r--r-- | Modules/UsePkgConfig.cmake | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake index 23519e8..5d7d65c 100644 --- a/Modules/UsePkgConfig.cmake +++ b/Modules/UsePkgConfig.cmake @@ -12,10 +12,10 @@ -FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/local/bin ) +FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config ) MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) - message(STATUS + MESSAGE(STATUS "WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig") # reset the variables at the beginning SET(${_include_DIR}) @@ -33,20 +33,24 @@ MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir OUTPUT_VARIABLE ${_include_DIR} ) - string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}") + STRING(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}") EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir OUTPUT_VARIABLE ${_link_DIR} ) - string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}") + STRING(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}") EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs OUTPUT_VARIABLE ${_link_FLAGS} ) - string(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}") + STRING(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}") EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags OUTPUT_VARIABLE ${_cflags} ) - string(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}") + STRING(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}") + + ELSE( NOT _return_VALUE) + + MESSAGE(STATUS "PKGCONFIG() indicates that ${_package} is not installed (install the package which contains ${_package}.pc if you want to support this feature)") ENDIF(NOT _return_VALUE) |