diff --git a/CMake/modules/FindEGL.cmake b/CMake/modules/FindEGL.cmake index 0d5765ed..0929c920 100644 --- a/CMake/modules/FindEGL.cmake +++ b/CMake/modules/FindEGL.cmake @@ -4,12 +4,13 @@ # EGL_LIBRARY # EGL_FOUND -FIND_PATH(EGL_INCLUDE_DIR NAMES EGL/egl.h) +find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h) -SET(EGL_NAMES ${EGL_NAMES} egl EGL) -FIND_LIBRARY(EGL_LIBRARY NAMES ${EGL_NAMES}) +set(EGL_NAMES ${EGL_NAMES} egl EGL) +find_library(EGL_LIBRARY NAMES ${EGL_NAMES}) -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR) + +mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY) -MARK_AS_ADVANCED(EGL_INCLUDE_DIR EGL_LIBRARY) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8680aec2..bd3e944c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(GLFW_USE_EGL "Build for EGL and OpenGL ES platform (Currently only X11)" OFF) if (GLFW_USE_EGL) - SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/modules) + set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/modules) find_package(EGL REQUIRED) else() find_package(OpenGL REQUIRED) @@ -200,7 +200,7 @@ endif() if (_GLFW_X11_EGL) # Set up library and include paths - list(APPEND glfw_INCLUDE_DIRS${EGL_INCLUDE_DIR}) + list(APPEND glfw_INCLUDE_DIRS ${EGL_INCLUDE_DIR}) list(APPEND glfw_LIBRARIES ${EGL_LIBRARY}) set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} egl")