build: fix incorrect variable checks

Cmake variables should not use `${}` when checking for existence.

(cherry picked from commit 94f7a47abd)
This commit is contained in:
dundargoc 2024-10-06 14:21:28 +02:00 committed by Amaan Qureshi
parent 0b167b0782
commit 46bdc14e20

View file

@ -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()