CMake: Make GLEW as external target when using the system one

This avoids an error when USE_SYSTEM_LIBGLEW is OFF then ON from the
GUI of CMake.

Fixes #4409.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
master
Paul Cercueil 2018-08-28 15:06:15 +02:00 committed by John Bartholomew
parent 029ad27f5d
commit 3be4a81239
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ endif (WIN32)
option(USE_SYSTEM_LIBGLEW "Use the system's libglew" OFF)
if (USE_SYSTEM_LIBGLEW)
add_library(GLEW::GLEW INTERFACE IMPORTED)
find_package(GLEW REQUIRED)
endif (USE_SYSTEM_LIBGLEW)