mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 06:25:56 +03:00
Merge pull request #5199 from marv/cmake-pkg_get_variable
cmake: Use FindPkgConfig's pkg_get_variable instead of custom macro
This commit is contained in:
commit
42d410f6f3
1 changed files with 1 additions and 21 deletions
|
@ -1,25 +1,5 @@
|
|||
include(UsePkgConfig)
|
||||
|
||||
MACRO(PKGCONFIG_GETVAR _package _var _output_variable)
|
||||
SET(${_output_variable})
|
||||
|
||||
# if pkg-config has been found
|
||||
IF (PKGCONFIG_EXECUTABLE)
|
||||
|
||||
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull)
|
||||
|
||||
# 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 ${_var} OUTPUT_VARIABLE ${_output_variable})
|
||||
|
||||
ENDIF (NOT _return_VALUE)
|
||||
|
||||
ENDIF (PKGCONFIG_EXECUTABLE)
|
||||
ENDMACRO(PKGCONFIG_GETVAR _package _var _output_variable)
|
||||
|
||||
macro(dbus_add_activation_service _sources)
|
||||
PKGCONFIG_GETVAR(dbus-1 session_bus_services_dir _install_dir)
|
||||
pkg_get_variable(_install_dir dbus-1 session_bus_services_dir)
|
||||
foreach (_i ${_sources})
|
||||
get_filename_component(_service_file ${_i} ABSOLUTE)
|
||||
string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i})
|
||||
|
|
Loading…
Reference in a new issue