From 4ace1bd380a7477459776dc57ba84fe9a24222eb Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Mon, 16 Mar 2015 12:51:33 +0000 Subject: cmake: Fix CMP0053 violation. --- cmake/FindDirectX.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/FindDirectX.cmake b/cmake/FindDirectX.cmake index 29f04b97..fc631fe2 100644 --- a/cmake/FindDirectX.cmake +++ b/cmake/FindDirectX.cmake @@ -39,8 +39,11 @@ if (WIN32) set (DirectX_ARCHITECTURE x86) endif () - if ("$ENV{ProgramFiles(x86)}") - set (ProgramFiles "$ENV{ProgramFiles(x86)}") + # Can't use "$ENV{ProgramFiles(x86)}" to avoid violating CMP0053. See + # http://public.kitware.com/pipermail/cmake-developers/2014-October/023190.html + set (ProgramFiles_x86 "ProgramFiles(x86)") + if ("$ENV{${ProgramFiles_x86}}") + set (ProgramFiles "$ENV{${ProgramFiles_x86}}") else () set (ProgramFiles "$ENV{ProgramFiles}") endif () -- cgit v1.2.3