summaryrefslogtreecommitdiffstats
path: root/Modules/FindGLEW.cmake
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-09-20 04:57:00 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-21 14:55:56 (GMT)
commitd628ac0eb8b6d0e8e2617f26bf5a7e6280ba0008 (patch)
tree914f9ae8551bf2cf5180dbc8b90c3df9aa77c500 /Modules/FindGLEW.cmake
parent4fc07cd369cd46fbd859f140eda971d00ac52704 (diff)
downloadCMake-d628ac0eb8b6d0e8e2617f26bf5a7e6280ba0008.zip
CMake-d628ac0eb8b6d0e8e2617f26bf5a7e6280ba0008.tar.gz
CMake-d628ac0eb8b6d0e8e2617f26bf5a7e6280ba0008.tar.bz2
FindGLEW: Avoid using CMAKE_GENERATOR_PLATFORM to detect platform
Use `CMAKE_SIZEOF_VOID_P` instead. Fixes: #21128
Diffstat (limited to 'Modules/FindGLEW.cmake')
-rw-r--r--Modules/FindGLEW.cmake3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/FindGLEW.cmake b/Modules/FindGLEW.cmake
index 080371a..187b6a8 100644
--- a/Modules/FindGLEW.cmake
+++ b/Modules/FindGLEW.cmake
@@ -126,13 +126,12 @@ if(GLEW_VERBOSE)
message(STATUS "FindGLEW: GLEW_INCLUDE_DIRS: ${GLEW_INCLUDE_DIRS}")
endif()
-if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64" OR "${CMAKE_GENERATOR}" MATCHES "Win64")
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_arch "x64")
else()
set(_arch "Win32")
endif()
-
set(__GLEW_CURRENT_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
__glew_set_find_library_suffix(SHARED)