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
This commit is contained in:
Andre Schröder 2018-08-07 17:04:42 +02:00 committed by Patrick Ziegler
parent fba87227c7
commit b632e7da38
3 changed files with 5 additions and 3 deletions

View File

@ -209,9 +209,9 @@ function(queryfont output_variable fontname)
endforeach() endforeach()
if(matches) if(matches)
list(GET matches 0 output_variable) list(GET matches 0 fst_match)
set(output_variable "${output_variable}" PARENT_SCOPE) set(${output_variable} "${fst_match}" PARENT_SCOPE)
message(STATUS "Found font: ${output_variable}") message(STATUS "Found font: ${fst_match}")
else() else()
message_colored(STATUS "Font not found: ${fontname}" "33;1") message_colored(STATUS "Font not found: ${fontname}" "33;1")
endif() endif()

View File

@ -18,6 +18,7 @@ optdepends=("alsa-lib: alsa module support"
"i3-wm: i3 module support" "i3-wm: i3 module support"
"ttf-unifont: Font used in example config" "ttf-unifont: Font used in example config"
"siji-git: Font used in example config" "siji-git: Font used in example config"
"xorg-fonts-misc: Font used in example config"
"curl: github module support") "curl: github module support")
makedepends=("cmake" "git" "python" "python2" "pkg-config") makedepends=("cmake" "git" "python" "python2" "pkg-config")
provides=("polybar") provides=("polybar")

View File

@ -17,6 +17,7 @@ optdepends=("alsa-lib: alsa module support"
"i3-wm: i3 module support" "i3-wm: i3 module support"
"ttf-unifont: Font used in example config" "ttf-unifont: Font used in example config"
"siji-git: Font used in example config" "siji-git: Font used in example config"
"xorg-fonts-misc: Font used in example config"
"curl: github module support") "curl: github module support")
makedepends=("cmake" "git" "python" "python2" "pkg-config") makedepends=("cmake" "git" "python" "python2" "pkg-config")
conflicts=("polybar-git") conflicts=("polybar-git")