aerothemeplasma/KWin/kwin_fixblur/cmake/Modules/PkgConfigGetVar.cmake
2024-02-01 01:16:09 +01:00

20 lines
562 B
CMake
Executable file

include (UsePkgConfig)
macro (pkgconfig_getvar _package _var _output_variable)
SET (${_output_variable})
if (PKGCONFIG_EXECUTABLE)
exec_program (${PKGCONFIG_EXECUTABLE}
ARGS ${_package} --exists
RETURN_VALUE _return_VALUE
OUTPUT_VARIABLE _pkgconfigDevNull
)
if (NOT _return_VALUE)
exec_program (${PKGCONFIG_EXECUTABLE}
ARGS ${_package} --variable ${_var}
OUTPUT_VARIABLE ${_output_variable}
)
endif ()
endif ()
endmacro ()