1
2pkg_check_modules(GLESv2 glesv2 REQUIRED)
3pkg_check_modules(EGL egl REQUIRED)
4pkg_check_modules(GBM gbm REQUIRED)
5pkg_check_modules(X11 x11 REQUIRED)
6pkg_check_modules(XCB xcb REQUIRED)
7pkg_check_modules(X11XCB x11-xcb REQUIRED)
8pkg_check_modules(WL wayland-client REQUIRED)
9pkg_check_modules(WL_EGL wayland-egl REQUIRED)
10
11
12include_directories(
13    ${LIBDRM_INCLUDE_DIRS}
14    ${GLESv2_INCLUDE_DIRS}
15    ${EGL_INCLUDE_DIRS}
16    ${GBM_INCLUDE_DIRS}
17    ${X11_INCLUDE_DIRS}
18    ${XCB_INCLUDE_DIRS}
19    ${X11XCB_INCLUDE_DIRS}
20)
21
22link_directories(
23    ${LIBDRM_LIBRARY_DIRS}
24    ${GLESv2_LIBRARY_DIRS}
25    ${EGL_LIBRARY_DIRS}
26    ${GBM_LIBRARY_DIRS}
27    ${X11_LIBRARY_DIRS}
28    ${XCB_LIBRARY_DIRS}
29    ${X11XCB_LIBRARY_DIRS}
30)
31
32add_executable (kmscube cube.cpp cube.h cube-egl.cpp cube-egl.h cube-gles2.cpp cube-gles2.h
33    cube-null.cpp cube-gbm.cpp cube-x11.cpp cube-wl.cpp
34    esTransform.c esTransform.h)
35target_link_libraries(kmscube kms++ kms++util
36    ${LIBDRM_LIBRARIES}
37    ${GLESv2_LIBRARIES}
38    ${EGL_LIBRARIES}
39    ${GBM_LIBRARIES}
40    ${X11_LIBRARIES}
41    ${XCB_LIBRARIES}
42    ${X11XCB_LIBRARIES}
43    ${WL_LIBRARIES}
44    ${WL_EGL_LIBRARIES}
45)
46