mirror of
https://github.com/overte-org/overte.git
synced 2025-04-10 16:12:28 +02:00
simplify GLEW find module for Win32
This commit is contained in:
parent
af18840c4e
commit
46e575838b
1 changed files with 5 additions and 15 deletions
|
@ -15,13 +15,10 @@
|
|||
if (GLEW_INCLUDE_DIRS AND GLEW_LIBRARY)
|
||||
set(GLEW_FOUND TRUE)
|
||||
else ()
|
||||
if (WIN32)
|
||||
find_path(GLEW_INCLUDE_DIRS GL/glew.h
|
||||
"${GLEW_ROOT_DIR}/include"
|
||||
"$ENV{GLEW_ROOT_DIR}/include"
|
||||
"$ENV{HIFI_LIB_DIR}/glew/include"
|
||||
DOC "The directory where GL/glew.h resides"
|
||||
)
|
||||
if (WIN32)
|
||||
set(WIN_GLEW_SEARCH_DIRS "${GLEW_ROOT_DIR}" "$ENV{GLEW_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/glew")
|
||||
|
||||
find_path(GLEW_INCLUDE_DIRS include/GL/glew.h HINTS ${WIN_GLEW_SEARCH_DIRS})
|
||||
|
||||
if (CMAKE_CL_64)
|
||||
set(WIN_ARCH_DIR "x64")
|
||||
|
@ -29,14 +26,7 @@ else ()
|
|||
set(WIN_ARCH_DIR "Win32")
|
||||
endif()
|
||||
|
||||
find_library(GLEW_LIBRARY
|
||||
NAMES glew GLEW glew32 glew32s
|
||||
PATHS
|
||||
"${GLEW_ROOT_DIR}/lib/Release/${WIN_ARCH_DIR}"
|
||||
"$ENV{GLEW_ROOT_DIR}/lib/Release/${WIN_ARCH_DIR}"
|
||||
"$ENV{HIFI_LIB_DIR}/glew/lib/Release/${WIN_ARCH_DIR}"
|
||||
DOC "The GLEW library"
|
||||
)
|
||||
find_library(GLEW_LIBRARY "lib/Release/${WIN_ARCH_DIR}/glew32" HINTS ${WIN_GLEW_SEARCH_DIRS})
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
|
Loading…
Reference in a new issue