Only look for OSMesa module if building examples

GLFW itself doesn't need the OSMesa headers to build.
This commit is contained in:
Camilla Löwy
2020-05-25 16:30:13 +02:00
parent cfc23cd087
commit 8369880b56
2 changed files with 1 additions and 7 deletions

View File

@@ -48,6 +48,7 @@ set_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES
FOLDER "GLFW3/Examples")
if (GLFW_USE_OSMESA)
find_package(OSMesa REQUIRED)
target_compile_definitions(offscreen PRIVATE USE_NATIVE_OSMESA)
endif()