author | Wuzzy <Wuzzy2@mail.ru> |
Sun, 15 Sep 2019 15:12:48 +0200 | |
changeset 15421 | 06524f2e9a74 |
parent 11657 | ae6706411b24 |
permissions | -rw-r--r-- |
9201 | 1 |
# Find GLEW |
7997 | 2 |
# |
9201 | 3 |
# Once done this will define |
10015 | 4 |
# GLEW_FOUND - system has GLEW |
5 |
# GLEW_INCLUDE_DIR - the GLEW include directory |
|
6 |
# GLEW_LIBRARY - The library needed to use GLEW |
|
9201 | 7 |
# Copyright (c) 2013, Vittorio Giovara <vittorio.giovara@gmail.com> |
8 |
# |
|
9 |
# Distributed under the OSI-approved BSD License (the "License"); |
|
10 |
# see accompanying file Copyright.txt for details. |
|
11 |
# |
|
12 |
# This software is distributed WITHOUT ANY WARRANTY; without even the |
|
13 |
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
14 |
# See the License for more information. |
|
7997 | 15 |
|
9201 | 16 |
include(FindPackageHandleStandardArgs) |
17 |
||
18 |
find_path( GLEW_INCLUDE_DIR GL/glew.h |
|
7997 | 19 |
/usr/include |
20 |
/usr/local/include |
|
21 |
/sw/include |
|
22 |
/opt/local/include |
|
9201 | 23 |
$ENV{PROGRAMFILES}/GLEW/include |
7997 | 24 |
DOC "The directory where GL/glew.h resides") |
9201 | 25 |
find_library( GLEW_LIBRARY |
26 |
NAMES GLEW glew glew32 glew32s |
|
7997 | 27 |
PATHS |
28 |
/usr/lib64 |
|
29 |
/usr/lib |
|
30 |
/usr/local/lib64 |
|
31 |
/usr/local/lib |
|
32 |
/sw/lib |
|
33 |
/opt/local/lib |
|
9201 | 34 |
$ENV{PROGRAMFILES}/GLEW/lib |
7997 | 35 |
DOC "The GLEW library") |
36 |
||
11657
ae6706411b24
Hijack SDL2 and GLEW include and library when compiling to javascript
koda
parents:
10015
diff
changeset
|
37 |
if(BUILD_ENGINE_JS) |
ae6706411b24
Hijack SDL2 and GLEW include and library when compiling to javascript
koda
parents:
10015
diff
changeset
|
38 |
set(GLEW_INCLUDE_DIR "${EMSCRIPTEN_ROOT_PATH}/system/include") |
ae6706411b24
Hijack SDL2 and GLEW include and library when compiling to javascript
koda
parents:
10015
diff
changeset
|
39 |
SET(GLEW_LIBRARY "glew_emscripten_internal") |
ae6706411b24
Hijack SDL2 and GLEW include and library when compiling to javascript
koda
parents:
10015
diff
changeset
|
40 |
endif() |
ae6706411b24
Hijack SDL2 and GLEW include and library when compiling to javascript
koda
parents:
10015
diff
changeset
|
41 |
|
9244 | 42 |
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_LIBRARY GLEW_INCLUDE_DIR) |
43 |
mark_as_advanced(GLEW_LIBRARY GLEW_INCLUDE_DIR) |
|
7997 | 44 |