File: FindGLCORE.cmake

package info (click to toggle)
openscenegraph 3.6.5%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 39,988 kB
  • sloc: cpp: 392,058; ansic: 21,495; java: 1,020; yacc: 548; makefile: 430; objc: 406; xml: 155; lex: 151; javascript: 34
file content (36 lines) | stat: -rw-r--r-- 1,130 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Finds the OpenGL Core Profile (cp) header file.
# Looks for glcorearb.h
# 
# This script defines the following:
#  GLCORE_FOUND // Set to TRUE if glcorearb.h is found
#  GLCORE_INCLUDE_DIR // Parent directory of directory (gl, GL3, or OpenGL) containing the CP header.
#  GLCORE_GLCOREARB_HEADER // advanced
#
# GLCORE_ROOT can be set as an environment variable or a CMake variable,
# to the parent directory of the gl, GL3, or OpenGL directory containing the CP header.
#


FIND_PATH( GLCORE_GLCOREARB_HEADER
    NAMES GL/glcorearb.h GL3/glcorearb.h OpenGL/glcorearb.h gl/glcorearb.h
    HINTS ${GLCORE_ROOT}
    PATHS ENV GLCORE_ROOT
)

set( GLCORE_INCLUDE_DIR )
if( GLCORE_GLCOREARB_HEADER )
    set( GLCORE_INCLUDE_DIR ${GLCORE_GLCOREARB_HEADER} )
endif()


# handle the QUIETLY and REQUIRED arguments and set
# GLCORE_FOUND to TRUE as appropriate
INCLUDE( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( GLCORE
    "Set GLCORE_ROOT as the parent of the directory containing the OpenGL core profile header."
    GLCORE_INCLUDE_DIR )

MARK_AS_ADVANCED(
    GLCORE_INCLUDE_DIR
    GLCORE_GLCOREARB_HEADER
)