2023-08-15 16:20:26 +02:00
|
|
|
# SPDX-FileCopyrightText: 2022 Blender Authors
|
2023-06-14 14:49:59 +02:00
|
|
|
#
|
2022-08-15 14:58:04 +02:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
|
|
# This module defines
|
|
|
|
# Epoxy_INCLUDE_DIRS, where to find epoxy/gl.h
|
|
|
|
# Epoxy_LIBRARY, where to find the epoxy library.
|
|
|
|
# Epoxy_ROOT_DIR, The base directory to search for epoxy.
|
|
|
|
# This can also be an environment variable.
|
|
|
|
# Epoxy_FOUND, If false, do not try to use epoxy.
|
|
|
|
|
2023-07-29 05:47:55 +02:00
|
|
|
# If `EPOXY_ROOT_DIR` was defined in the environment, use it.
|
2023-08-17 05:15:56 +02:00
|
|
|
if(DEFINED EPOXY_ROOT_DIR)
|
2023-07-29 05:47:55 +02:00
|
|
|
# Pass.
|
2023-08-17 05:15:56 +02:00
|
|
|
elseif(DEFINED ENV{EPOXY_ROOT_DIR})
|
|
|
|
set(EPOXY_ROOT_DIR $ENV{EPOXY_ROOT_DIR})
|
|
|
|
else()
|
|
|
|
set(EPOXY_ROOT_DIR "")
|
|
|
|
endif()
|
2022-08-15 14:58:04 +02:00
|
|
|
|
2023-08-17 05:15:56 +02:00
|
|
|
find_path(Epoxy_INCLUDE_DIR
|
2022-08-15 14:58:04 +02:00
|
|
|
NAMES
|
|
|
|
epoxy/gl.h
|
|
|
|
HINTS
|
|
|
|
${EPOXY_ROOT_DIR}
|
|
|
|
PATH_SUFFIXES
|
|
|
|
include
|
|
|
|
)
|
|
|
|
|
2023-08-17 05:15:56 +02:00
|
|
|
find_library(Epoxy_LIBRARY
|
2022-08-15 14:58:04 +02:00
|
|
|
NAMES
|
|
|
|
epoxy
|
|
|
|
HINTS
|
|
|
|
${EPOXY_ROOT_DIR}
|
|
|
|
PATH_SUFFIXES
|
|
|
|
lib64 lib
|
|
|
|
)
|
|
|
|
|
|
|
|
# handle the QUIETLY and REQUIRED arguments and set Epoxy_FOUND to TRUE if
|
|
|
|
# all listed variables are TRUE
|
2023-08-17 05:15:56 +02:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(Epoxy DEFAULT_MSG
|
2022-08-15 14:58:04 +02:00
|
|
|
Epoxy_LIBRARY Epoxy_INCLUDE_DIR)
|
|
|
|
|
2023-08-17 05:15:56 +02:00
|
|
|
if(Epoxy_FOUND)
|
|
|
|
set(Epoxy_INCLUDE_DIRS ${Epoxy_INCLUDE_DIR})
|
|
|
|
set(Epoxy_LIBRARIES ${Epoxy_LIBRARY})
|
|
|
|
endif()
|
2022-08-15 14:58:04 +02:00
|
|
|
|
2023-08-17 05:15:56 +02:00
|
|
|
mark_as_advanced(
|
2022-08-15 14:58:04 +02:00
|
|
|
Epoxy_INCLUDE_DIR
|
|
|
|
Epoxy_LIBRARY
|
|
|
|
)
|