From b632e7da38cc07c4b7fc6613e6f64d99533e3a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=20Schr=C3=B6der?= Date: Tue, 7 Aug 2018 17:04:42 +0200 Subject: [PATCH] fix(cmake): Use name of found font (#1350) Before queryfont would never change the name of the font, this ensure that it is propery updated in the caller's scope --- cmake/common/utils.cmake | 6 +++--- contrib/polybar-git.aur/PKGBUILD | 1 + contrib/polybar.aur/PKGBUILD | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/common/utils.cmake b/cmake/common/utils.cmake index 4c4010ef..395b67b7 100644 --- a/cmake/common/utils.cmake +++ b/cmake/common/utils.cmake @@ -209,9 +209,9 @@ function(queryfont output_variable fontname) endforeach() if(matches) - list(GET matches 0 output_variable) - set(output_variable "${output_variable}" PARENT_SCOPE) - message(STATUS "Found font: ${output_variable}") + list(GET matches 0 fst_match) + set(${output_variable} "${fst_match}" PARENT_SCOPE) + message(STATUS "Found font: ${fst_match}") else() message_colored(STATUS "Font not found: ${fontname}" "33;1") endif() diff --git a/contrib/polybar-git.aur/PKGBUILD b/contrib/polybar-git.aur/PKGBUILD index 06451acb..dc85cc1b 100644 --- a/contrib/polybar-git.aur/PKGBUILD +++ b/contrib/polybar-git.aur/PKGBUILD @@ -18,6 +18,7 @@ optdepends=("alsa-lib: alsa module support" "i3-wm: i3 module support" "ttf-unifont: Font used in example config" "siji-git: Font used in example config" + "xorg-fonts-misc: Font used in example config" "curl: github module support") makedepends=("cmake" "git" "python" "python2" "pkg-config") provides=("polybar") diff --git a/contrib/polybar.aur/PKGBUILD b/contrib/polybar.aur/PKGBUILD index a6802f89..1ee7497c 100644 --- a/contrib/polybar.aur/PKGBUILD +++ b/contrib/polybar.aur/PKGBUILD @@ -17,6 +17,7 @@ optdepends=("alsa-lib: alsa module support" "i3-wm: i3 module support" "ttf-unifont: Font used in example config" "siji-git: Font used in example config" + "xorg-fonts-misc: Font used in example config" "curl: github module support") makedepends=("cmake" "git" "python" "python2" "pkg-config") conflicts=("polybar-git")