From 94f7a47abd648c40f54f1f572421472ddd899e61 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. --- lib/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index a6b20bbd..1ded8d1c 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()