Created
May 18, 2024 11:06
-
-
Save dogukanarat/021ad274a86da243197bd2f3aa59e98e to your computer and use it in GitHub Desktop.
FindGLFW cmake module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FindGLFW - Find GLFW library | |
# This module finds if GLFW is installed and determines where the include | |
# files and libraries are. | |
# This module defines the following variables: | |
# GLFW_FOUND, if false, do not try to link to GLFW | |
# GLFW_INCLUDE_DIRS, where to find the headers | |
# GLFW_LIBRARIES, the libraries to link against | |
find_library( | |
GLFW_LIBRARIES | |
NAMES glfw3 glfw | |
PATHS | |
/usr/lib | |
/usr/local/lib | |
/usr/lib64 | |
/usr/local/lib64 | |
/opt/local/lib | |
) | |
find_path( | |
GLFW_INCLUDE_DIRS | |
NAMES GLFW/glfw3.h | |
PATHS | |
/usr/include | |
/usr/local/include | |
/opt/local/include | |
) | |
if (GLFW_LIBRARIES AND GLFW_INCLUDE_DIRS) | |
set(GLFW_FOUND TRUE) | |
message(STATUS "Found GLFW: ${GLFW_LIBRARIES} ${GLFW_INCLUDE_DIRS}") | |
else() | |
set(GLFW_FOUND FALSE) | |
message(STATUS "GLFW not found") | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment