X-Git-Url: https://git.piment-noir.org/?p=deb_x265.git;a=blobdiff_plain;f=source%2Fcmake%2FFindVLD.cmake;h=ece8bae4c5ed11d3b805c62e0e9e4c2d96c9965e;hp=716625c9478a06efa7516eb44a944008f4a5c68d;hb=b53f7c52d8280ab63876efd6eb292c21430ac607;hpb=5c9b45285dd64723ad1dac380b98a7b1f3095674 diff --git a/source/cmake/FindVLD.cmake b/source/cmake/FindVLD.cmake index 716625c..ece8bae 100644 --- a/source/cmake/FindVLD.cmake +++ b/source/cmake/FindVLD.cmake @@ -54,11 +54,14 @@ ELSEIF (CMAKE_SIZEOF_VOID_P EQUAL 8) LIST (APPEND _VLD_POSSIBLE_LIB_SUFFIXES lib/Win64) ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 4) +SET (PFILES "ProgramFiles") +SET (PFILES_X86 "ProgramFiles(x86)") # hack to avoid escaping issues in cmake 3.1 + FIND_PATH (VLD_ROOT_DIR NAMES include/vld.h PATHS ENV VLDROOT - "$ENV{PROGRAMFILES}/Visual Leak Detector" - "$ENV{PROGRAMFILES(X86)}/Visual Leak Detector" + "$ENV{PFILES}/Visual Leak Detector" + "$ENV{PFILES_X86}/Visual Leak Detector" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Visual Leak Detector;InstallLocation]" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Visual Leak Detector;InstallLocation]" DOC "VLD root directory")