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
This commit is contained in:
parent
442742a187
commit
35175120b1
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue