1if(waffle_on_linux)
2    if(gl_FOUND AND x11-xcb_FOUND)
3        set(glx_default ON)
4    else()
5        set(glx_default OFF)
6    endif()
7
8    if(wayland-client_FOUND AND wayland-egl_FOUND AND egl_FOUND)
9        set(wayland_default ON)
10    else()
11        set(wayland_default OFF)
12    endif()
13
14    if(x11-xcb_FOUND AND egl_FOUND)
15        set(x11_egl_default ON)
16    else()
17        set(x11_egl_default OFF)
18    endif()
19
20    if(gbm_FOUND AND libudev_FOUND AND egl_FOUND)
21        set(gbm_default ON)
22    else()
23        set(gbm_default OFF)
24    endif()
25
26    set(surfaceless_egl_default ${egl_FOUND})
27
28    # On Linux, you must enable at least one of the below options.
29    option(waffle_has_glx "Build support for GLX" ${glx_default})
30    option(waffle_has_wayland "Build support for Wayland" ${wayland_default})
31    option(waffle_has_x11_egl "Build support for X11/EGL" ${x11_egl_default})
32    option(waffle_has_gbm "Build support for GBM" ${gbm_default})
33    option(waffle_has_surfaceless_egl "Build support for EGL_MESA_platform_surfaceless" ${surfaceless_egl_default})
34    option(waffle_has_nacl "Build support for NaCl" OFF)
35
36    # NaCl specific settings.
37    set(nacl_sdk_path "" CACHE STRING "Set nacl_sdk path here")
38    set(nacl_version "pepper_39" CACHE STRING "Set NaCl bundle here")
39endif()
40
41option(waffle_build_tests "Build tests" ON)
42option(waffle_build_manpages "Build manpages" OFF)
43option(waffle_build_htmldocs "Build html documentation" OFF)
44option(waffle_build_examples "Build example programs" ON)
45
46set(waffle_xsltproc "xsltproc"
47    CACHE STRING "Program for processing XSLT stylesheets. Used for building docs.")
48