diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a169473..4dd1c1c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,6 @@ if (GLFW_USE_EGL) message(FATAL_ERROR "Unsupported client library") endif() - set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake/modules") find_package(EGL REQUIRED) if (NOT _GLFW_USE_OPENGL) @@ -84,6 +83,8 @@ else() set(_GLFW_USE_OPENGL 1) endif() +set(CMAKE_MODULE_PATH "${GLFW_SOURCE_DIR}/CMake/modules") + if (_GLFW_USE_OPENGL) find_package(OpenGL REQUIRED) elseif (_GLFW_USE_GLESV1)