aerothemeplasma/KWin/kwin_reflect/cmake/Modules/PkgConfigGetVar.cmake

21 lines
562 B
CMake
Raw Normal View History

2023-08-24 22:32:11 +00:00
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 ()