From 44815ba48c1d149137a2210ca3fccfe3bda2626e Mon Sep 17 00:00:00 2001 From: Sergei Kachkov Date: Thu, 21 Aug 2025 20:41:24 +0300 Subject: Fix SLANGC_EXECUTABLE search path in slangConfig.cmake (#8200) This patch changes the order of searching slangc executable. This bug affects the following scenario: let's assume that user has a binary release of slang package and wants to use it via `find_package(slang CONFIG HINTS )`, but there is also an environment variable that points to some other slang release (e.g. user has Vulkan SDK in the `$PATH`). In that case, find_package will successfully find a desired slang package, but find_program in slangConfig.cmake will check environment variable first, and in the result SLANGC_EXECUTABLE will point to slangc from Vulkan SDK and not from the downloaded package. Co-authored-by: Ellie Hermaszewska --- cmake/SlangConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/SlangConfig.cmake.in b/cmake/SlangConfig.cmake.in index 253958690..7b7a0eb98 100644 --- a/cmake/SlangConfig.cmake.in +++ b/cmake/SlangConfig.cmake.in @@ -8,7 +8,7 @@ endif() if(@SLANG_ENABLE_SLANGC@) - find_program(SLANGC_EXECUTABLE "slangc" HINTS ENV PATH "${PACKAGE_PREFIX_DIR}/bin") + find_program(SLANGC_EXECUTABLE "slangc" HINTS "${PACKAGE_PREFIX_DIR}/bin" ENV PATH) if (NOT SLANGC_EXECUTABLE) message(STATUS "slangc executable not found; ensure it is available in your PATH.") -- cgit v1.2.3