Skip to content

Commit d4feda6

Browse files
committed
Avoid using xkbcommon headers in libwpe headers
Forward-declare a few opaque types in "input-xkb.h" in order to avoid needing to list "xkbcommon" as a public dependency in the generated pkg-config module files. This allows programs which do not use libwpe's xkbcommon functions to skip linking against libxkbcommon, even if libwpe has been built with libxkbcommon support. Fixes #107
1 parent 203eb3b commit d4feda6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

include/wpe/input-xkb.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@
4545

4646
#include <stdbool.h>
4747
#include <stdint.h>
48-
#include <xkbcommon/xkbcommon.h>
49-
#include <xkbcommon/xkbcommon-compose.h>
5048

5149
#ifdef __cplusplus
5250
extern "C" {
5351
#endif
5452

53+
struct xkb_compose_state;
54+
struct xkb_compose_table;
55+
struct xkb_context;
56+
struct xkb_keymap;
57+
struct xkb_state;
58+
5559
struct wpe_input_xkb_context;
5660

5761
struct wpe_input_xkb_keymap_entry {

wpe.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ libdir=${exec_prefix}/lib
66
Name: wpe-@WPE_API_VERSION@
77
Description: The wpe library
88
Version: @PROJECT_VERSION@
9-
Requires: @WPE_PC_REQUIRES@
9+
Requires.private: @WPE_PC_REQUIRES@
1010
Cflags: -I${includedir}/wpe-@WPE_API_VERSION@ @WPE_PC_CFLAGS@
1111
Libs: -L${libdir} -lwpe-@WPE_API_VERSION@

0 commit comments

Comments
 (0)