aerothemeplasma/KWin/kwin_reflect/cmake/Modules/PkgConfigGetVar.cmake
2023-08-25 00:32:11 +02: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 ()