From 46bdc14e20cb7145b5f7ac07409f565701e11bd2 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 6 Oct 2024 14:21:28 +0200 Subject: [PATCH] build: fix incorrect variable checks Cmake variables should not use `${}` when checking for existence. (cherry picked from commit 94f7a47abd648c40f54f1f572421472ddd899e61) --- lib/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 07664727..34dfb94b 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -30,7 +30,7 @@ if(TREE_SITTER_FEATURE_WASM) message(CHECK_START "Looking for wasmtime headers") find_path(WASMTIME_INCLUDE_DIR wasmtime.h PATHS ENV DEP_WASMTIME_C_API_INCLUDE) - if(NOT ${WASMTIME_INCLUDE_DIR}) + if(NOT WASMTIME_INCLUDE_DIR) unset(WASMTIME_INCLUDE_DIR CACHE) message(FATAL_ERROR "Could not find wasmtime headers.\nDid you forget to set CMAKE_INCLUDE_PATH?") endif() @@ -46,7 +46,7 @@ if(TREE_SITTER_FEATURE_WASM) else() find_library(WASMTIME_LIBRARY libwasmtime.a) endif() - if(NOT ${WASMTIME_LIBRARY}) + if(NOT WASMTIME_LIBRARY) unset(WASMTIME_LIBRARY CACHE) message(FATAL_ERROR "Could not find wasmtime library.\nDid you forget to set CMAKE_LIBRARY_PATH?") endif()