From dca9b2db07c86bff00011ded01bd4f1df597da1c Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 11 Feb 2013 01:29:45 +0100 Subject: [PATCH] Only disable tests and examples if not using OpenGL. --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2565ca23..c05b2acd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,9 +38,11 @@ if (GLFW_USE_EGL) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/modules) find_package(EGL REQUIRED) - set(GLFW_BUILD_EXAMPLES OFF) - set(GLFW_BUILD_TESTS OFF) - message(STATUS "NOTE: Examples and tests are disabled for EGL") + if (NOT _GLFW_USE_OPENGL) + set(GLFW_BUILD_EXAMPLES OFF) + set(GLFW_BUILD_TESTS OFF) + message(STATUS "NOTE: Examples and tests require OpenGL") + endif() else() set(_GLFW_USE_OPENGL 1) endif()