find_path(GLEW_INCLUDE_DIR NAMES GL/glew.h PATHS {CONAN_INCLUDE_DIRS_GLEW} NO_CMAKE_FIND_ROOT_PATH)
find_library(GLEW_LIBRARY NAMES ${CONAN_LIBS_GLEW} PATHS ${CONAN_LIB_DIRS_GLEW} NO_CMAKE_FIND_ROOT_PATH)

message(STATUS "** GLEW ALREADY FOUND BY CONAN!")
message(STATUS "** FOUND GLEW: ${GLEW_LIBRARY}")
message(STATUS "** FOUND GLEW INCLUDE: ${GLEW_INCLUDE_DIR}")

if(MSVC)
  set(GLEW_LIBRARY ${GLEW_LIBRARY} opengl32)
endif()
if(APPLE)
  set(GLEW_LIBRARY ${GLEW_LIBRARY} -framework OpenGL)
endif()
if(UNIX AND NOT APPLE)
  set(GLEW_LIBRARY ${GLEW_LIBRARY} GL)
endif()

set(GLEW_FOUND TRUE)
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
set(GLEW_LIBRARIES ${GLEW_LIBRARY})

mark_as_advanced(GLEW_LIBRARY GLEW_INCLUDE_DIR)
