diff options
Diffstat (limited to 'Modules/FindGLEW.cmake')
-rw-r--r-- | Modules/FindGLEW.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/FindGLEW.cmake b/Modules/FindGLEW.cmake index 497a80c..f42182f 100644 --- a/Modules/FindGLEW.cmake +++ b/Modules/FindGLEW.cmake @@ -4,6 +4,15 @@ # # Find the OpenGL Extension Wrangler Library (GLEW) # +# IMPORTED Targets +# ^^^^^^^^^^^^^^^^ +# +# This module defines the :prop_tgt:`IMPORTED` target ``GLEW::GLEW``, +# if GLEW has been found. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# # This module defines the following variables: # # :: @@ -35,4 +44,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args(GLEW REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY) +if(GLEW_FOUND AND NOT TARGET GLEW::GLEW) + add_library(GLEW::GLEW UNKNOWN IMPORTED) + set_target_properties(GLEW::GLEW PROPERTIES + IMPORTED_LOCATION "${GLEW_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}") +endif() + mark_as_advanced(GLEW_INCLUDE_DIR GLEW_LIBRARY) |