mirror of https://github.com/nirenjan/libx52.git
fix: Add CMOCKA_CFLAGS to test program CFLAGS
In macos-14, programs that rely on cmocka need to specify CMOCKA_CFLAGS as part of their CFLAGS. This has not been an issue so far on older versions of macOS, or on any release of Ubuntu, but it should be done to ensure that the library headers can be found.fix-macos-14-builds
parent
50a911160f
commit
b0b9123a2e
|
@ -17,7 +17,7 @@ TESTS += test-cli
|
|||
check_PROGRAMS += test-cli
|
||||
|
||||
test_cli_SOURCES = cli/x52_cli.c cli/test_x52_cli.c
|
||||
test_cli_CFLAGS = -DX52_CLI_TESTING -I $(top_srcdir)/libx52
|
||||
test_cli_CFLAGS = @CMOCKA_CFLAGS@ -DX52_CLI_TESTING -I $(top_srcdir)/libx52
|
||||
test_cli_LDFLAGS = @CMOCKA_LIBS@ $(WARN_LDFLAGS)
|
||||
|
||||
# Add a dependency on test_x52_cli_tests.c
|
||||
|
|
|
@ -126,7 +126,7 @@ x52d_mouse_test_CFLAGS = \
|
|||
-I $(top_srcdir)/libx52 \
|
||||
-I $(top_srcdir)/libx52io \
|
||||
-I $(top_srcdir)/lib/pinelog \
|
||||
$(WARN_CFLAGS)
|
||||
$(WARN_CFLAGS) @CMOCKA_CFLAGS@
|
||||
x52d_mouse_test_LDFLAGS = @CMOCKA_LIBS@ $(WARN_LDFLAGS)
|
||||
x52d_mouse_test_LDADD = \
|
||||
lib/pinelog/libpinelog.la \
|
||||
|
|
|
@ -43,7 +43,7 @@ check_PROGRAMS += libx52test libx52-string-test
|
|||
|
||||
nodist_libx52test_SOURCES = libx52/test_libx52.c
|
||||
libx52test_SOURCES = $(libx52_la_SOURCES)
|
||||
libx52test_CFLAGS = @LIBUSB_CFLAGS@ -DLOCALEDIR='"$(localedir)"' -I $(top_srcdir) -I $(top_srcdir)/libx52
|
||||
libx52test_CFLAGS = @CMOCKA_CFLAGS@ @LIBUSB_CFLAGS@ -DLOCALEDIR='"$(localedir)"' -I $(top_srcdir) -I $(top_srcdir)/libx52
|
||||
libx52test_CFLAGS += -Dlibusb_control_transfer=__wrap_libusb_control_transfer
|
||||
libx52test_LDFLAGS = @CMOCKA_LIBS@ @LIBUSB_LIBS@
|
||||
libx52test_LDADD = libx52.la
|
||||
|
@ -60,7 +60,7 @@ libx52_string_test_SOURCES = \
|
|||
libx52/test_strings.c \
|
||||
libx52/x52_stringify.c \
|
||||
libx52/x52_strerror.c
|
||||
libx52_string_test_CFLAGS = -I $(top_srcdir) -I $(top_srcdir)/libx52
|
||||
libx52_string_test_CFLAGS = @CMOCKA_CFLAGS@ -I $(top_srcdir) -I $(top_srcdir)/libx52
|
||||
libx52_string_test_LDFLAGS = @CMOCKA_LIBS@
|
||||
libx52_string_test_LDADD = libx52.la
|
||||
endif
|
||||
|
|
|
@ -37,12 +37,12 @@ TESTS += test-axis test-parser
|
|||
check_PROGRAMS += test-axis test-parser
|
||||
|
||||
test_axis_SOURCES = libx52io/test_axis.c $(libx52io_la_SOURCES)
|
||||
test_axis_CFLAGS = $(libx52io_la_CFLAGS)
|
||||
test_axis_CFLAGS = @CMOCKA_CFLAGS@ $(libx52io_la_CFLAGS)
|
||||
test_axis_LDFLAGS = @CMOCKA_LIBS@ @HIDAPI_LIBS@ $(WARN_LDFLAGS)
|
||||
test_axis_LDADD = @LTLIBINTL@
|
||||
|
||||
test_parser_SOURCES = libx52io/test_parser.c $(libx52io_la_SOURCES)
|
||||
test_parser_CFLAGS = $(libx52io_la_CFLAGS)
|
||||
test_parser_CFLAGS = @CMOCKA_CFLAGS@ $(libx52io_la_CFLAGS)
|
||||
test_parser_LDFLAGS = @CMOCKA_LIBS@ @HIDAPI_LIBS@ $(WARN_LDFLAGS)
|
||||
test_parser_LDADD = @LTLIBINTL@
|
||||
|
||||
|
|
Loading…
Reference in New Issue