File: FindGLFW3.cmake

package info (click to toggle)
gr-fosphor 3.9~git20240323.74d54fc-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,260 kB
  • sloc: python: 9,483; ansic: 3,422; cpp: 1,281; lisp: 609; makefile: 33
file content (24 lines) | stat: -rw-r--r-- 740 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if(NOT GLFW3_FOUND)
  INCLUDE(FindPkgConfig)
  pkg_check_modules(GLFW3_PKG glfw3)
  find_path(GLFW3_INCLUDE_DIRS
    NAMES GLFW/glfw3.h
    HINTS ${GLFW3_PKG_INCLUDE_DIRS}
  )

  find_library(GLFW3_LIBRARIES
    NAMES ${GLFW3_PKG_LIBRARIES} glfw3 glfw
    HINTS ${GLFW3_PKG_LIBRARY_DIRS}
  )

  if(GLFW3_INCLUDE_DIRS AND GLFW3_LIBRARIES)
    set(GLFW3_FOUND TRUE CACHE INTERNAL "GLFW3 found")
    message(STATUS "Found GLFW3: ${GLFW3_INCLUDE_DIRS}, ${GLFW3_LIBRARIES}")
  else(GLFW3_INCLUDE_DIRS AND GLFW3_LIBRARIES)
    set(GLFW3_FOUND FALSE CACHE INTERNAL "GLFW3 found")
    message(STATUS "GLFW3 not found.")
  endif(GLFW3_INCLUDE_DIRS AND GLFW3_LIBRARIES)

  mark_as_advanced(GLFW3_INCLUDE_DIRS GLFW3_LIBRARIES)

endif(NOT GLFW3_FOUND)