mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
FindGLEW: Avoid using CMAKE_GENERATOR_PLATFORM to detect platform
Use `CMAKE_SIZEOF_VOID_P` instead. Fixes: #21128
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user