From 3e769ff43056b55efd7c54f91d8ccf8236425366 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 24 May 2022 20:41:50 +0000 Subject: [PATCH] Use a function instead of a macro. See PR!1757 --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c4bf8700..432fd69f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,11 +121,11 @@ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries" URL "https://www.x.org" TYPE OPTIONAL PURPOSE "Required for building the X11 based workspace") -macro(check_X11_lib) - if (NOT TARGET X11::${ARGV0}) - message(SEND_ERROR "Required component ${ARGV0} of X11 was not found") +function(check_X11_lib _lib) + if (NOT TARGET X11::${_lib}) + message(SEND_ERROR "Required component ${_lib} of X11 was not found") endif() -endmacro() +endfunction() check_X11_lib(ICE) check_X11_lib(SM) check_X11_lib(X11)