summaryrefslogtreecommitdiff
path: root/src/waffle/CMakeLists.txt
blob: e1623987ab72f7ef570b053484acece14daa6384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# ----------------------------------------------------------------------------
# Target: waffle (shared library)
# ----------------------------------------------------------------------------

set(waffle_sources
    api/api_priv.c
    api/waffle_attrib_list.c
    api/waffle_config.c
    api/waffle_context.c
    api/waffle_display.c
    api/waffle_enum.c
    api/waffle_error.c
    api/waffle_gl_misc.c
    api/waffle_init.c
    api/waffle_window.c
    core/wcore_config_attrs.c
    core/wcore_error.c
    core/wcore_platform.c
    )

if(waffle_has_egl)
    list(APPEND waffle_sources
        egl/egl_no_native.c
        )
endif(waffle_has_egl)

if(waffle_has_x11)
    list(APPEND waffle_sources
        x11/x11.c
        )
endif(waffle_has_x11)

if(waffle_has_x11_egl)
    list(APPEND waffle_sources
        x11_egl/xegl_config.c
        x11_egl/xegl_context.c
        x11_egl/xegl_display.c
        x11_egl/xegl_gl_misc.c
        x11_egl/xegl_platform.c
        x11_egl/xegl_priv_egl.c
        x11_egl/xegl_window.c
    )
endif(waffle_has_x11_egl)

add_library(waffle SHARED ${waffle_sources})

if(waffle_has_egl)
  target_link_libraries(waffle ${waffle_EGL_library})
endif(waffle_has_egl)

if(waffle_has_glx)
    target_link_libraries(waffle ${waffle_GL_library})
endif(waffle_has_glx)

if(waffle_has_x11_egl)
  target_link_libraries(waffle ${waffle_X11-xcb_library})
endif(waffle_has_x11_egl)

set_target_properties(waffle
    PROPERTIES
    LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
    SOVERSION ${waffle_so_version})

install(TARGETS waffle
    LIBRARY DESTINATION ${waffle_install_libdir})