Skip to content

Commit

Permalink
Update FindSMI.cmake
Browse files Browse the repository at this point in the history
Fix build on Windows when using 64-bit CMake.
  • Loading branch information
rpavlik committed Feb 2, 2017
1 parent 27b505e commit 425a224
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cmake/FindSMI.cmake
Expand Up @@ -67,13 +67,12 @@ if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
# Get desired program files directory
set(_PF86_ENV "ProgramFiles(x86)")
set(_PF86 $ENV{${_PF86_ENV}})

if(NOT "$ENV{${_PF86}}" STREQUAL "")
# 32-bit dir: only set on win64
file(TO_CMAKE_PATH "$ENV{_PF86}" _progfiles)
set(_PF86 "$ENV{${_PF86_ENV}}")
if(NOT "${_PF86}" STREQUAL "")
# 32-bit dir: only set on win64
file(TO_CMAKE_PATH "${_PF86}" _progfiles)
else()
# 32-bit dir on win32
# 32-bit dir on win32
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _progfiles)
endif()

Expand Down

0 comments on commit 425a224

Please sign in to comment.