wayland: Use modules from ECM for finding deps

We were using a copied FindWayland cmake script, but lets use the ones
from ECM (extra-cmake-modules) instead. This is more important in the
future when building extensions from wayland-protocols.
This commit is contained in:
Jonas Ådahl
2015-12-09 14:03:32 +08:00
committed by Camilla Berglund
parent bb3b3452f3
commit c7f3bd0d22
2 changed files with 6 additions and 68 deletions
+6 -2
View File
@@ -271,11 +271,15 @@ endif()
# Use Wayland for window creation
#--------------------------------------------------------------------
if (_GLFW_WAYLAND)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
find_package(Wayland REQUIRED)
list(APPEND glfw_PKG_DEPS "wayland-egl")
list(APPEND glfw_INCLUDE_DIRS "${WAYLAND_INCLUDE_DIR}")
list(APPEND glfw_LIBRARIES "${WAYLAND_LIBRARIES}" "${CMAKE_THREAD_LIBS_INIT}")
list(APPEND glfw_INCLUDE_DIRS "${Wayland_INCLUDE_DIR}")
list(APPEND glfw_LIBRARIES "${Wayland_LIBRARIES}" "${CMAKE_THREAD_LIBS_INIT}")
find_package(XKBCommon REQUIRED)
list(APPEND glfw_PKG_DEPS "xkbcommon")