From 694f14f96f8f64725461a585e3c1d11a9b00aec3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 14 Mar 2024 11:37:28 -0400 Subject: Tests: Teach CPackWiXGenerator to use WiX tools in PATH --- Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake index c549e61..28665ee 100644 --- a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake +++ b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake @@ -39,9 +39,8 @@ endif() function(run_wix_command command) file(TO_CMAKE_PATH "$ENV{WIX}" WIX_ROOT) - set(WIX_PROGRAM "${WIX_ROOT}/bin/${command}.exe") - - if(NOT EXISTS "${WIX_PROGRAM}") + find_program(WIX_PROGRAM NAMES ${command} NO_CACHE PATHS "${WIX_ROOT}" PATH_SUFFIXES "bin") + if(NOT WIX_PROGRAM) message(FATAL_ERROR "Failed to find WiX Tool: ${WIX_PROGRAM}") endif() -- cgit v0.12