diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-11-22 18:44:59 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-11-22 18:44:59 (GMT) |
commit | 3c900bbbd9e2844069483b7ac08de3f4fa7d30f7 (patch) | |
tree | 9d9c3a4d67cb209111892c496faaac9055904ebe /Modules/UsePkgConfig.cmake | |
parent | 651fecee5bb9011ac6402479b2c38c150799f6ee (diff) | |
download | CMake-3c900bbbd9e2844069483b7ac08de3f4fa7d30f7.zip CMake-3c900bbbd9e2844069483b7ac08de3f4fa7d30f7.tar.gz CMake-3c900bbbd9e2844069483b7ac08de3f4fa7d30f7.tar.bz2 |
ENH: check in new pkgconfig stuff from Enrico Scholz
Diffstat (limited to 'Modules/UsePkgConfig.cmake')
-rw-r--r-- | Modules/UsePkgConfig.cmake | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake index 260365c..a7c7e59 100644 --- a/Modules/UsePkgConfig.cmake +++ b/Modules/UsePkgConfig.cmake @@ -1,6 +1,6 @@ -# - pkg-config module for CMake +# - obsolete pkg-config module for CMake # -# Defines the following macros: +# Includes FindPkgConfig.cmake which defines # # PKGCONFIG(package includedir libdir linkflags cflags) # @@ -10,37 +10,4 @@ # variable will be empty when the function returns, otherwise they will contain the respective information # - - -FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/local/bin ) - -MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) -# reset the variables at the beginning - SET(${_include_DIR}) - SET(${_link_DIR}) - SET(${_link_FLAGS}) - SET(${_cflags}) - - # if pkg-config has been found - IF(PKGCONFIG_EXECUTABLE) - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) - - # and if the package of interest also exists for pkg-config, then get the information - IF(NOT _return_VALUE) - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir OUTPUT_VARIABLE ${_include_DIR} ) - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir OUTPUT_VARIABLE ${_link_DIR} ) - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs OUTPUT_VARIABLE ${_link_FLAGS} ) - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags OUTPUT_VARIABLE ${_cflags} ) - - ENDIF(NOT _return_VALUE) - - ENDIF(PKGCONFIG_EXECUTABLE) - -ENDMACRO(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags) - -MARK_AS_ADVANCED(PKGCONFIG_EXECUTABLE) +INCLUDE(FindPkgConfig) |