BUG: untested fix for newlines in the output of pkg config
This commit is contained in:
parent
c841258170
commit
100723fbb0
|
@ -31,13 +31,22 @@ MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
|
|||
# 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=includedir
|
||||
OUTPUT_VARIABLE ${_include_DIR} )
|
||||
string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_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} --variable=libdir
|
||||
OUTPUT_VARIABLE ${_link_DIR} )
|
||||
string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
|
||||
|
||||
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags OUTPUT_VARIABLE ${_cflags} )
|
||||
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
|
||||
OUTPUT_VARIABLE ${_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}}")
|
||||
|
||||
ENDIF(NOT _return_VALUE)
|
||||
|
||||
|
|
Loading…
Reference in New Issue