build: Allow not to build tests
https://bugzilla.gnome.org/show_bug.cgi?id=634790 Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
2f2c5649ef
commit
da7a6a229b
|
@ -1,6 +1,9 @@
|
|||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
SUBDIRS = libnotify docs tools tests
|
||||
SUBDIRS = libnotify docs tools
|
||||
if TESTS_ENABLED
|
||||
SUBDIRS += tests
|
||||
endif
|
||||
|
||||
pcdata_DATA = libnotify.pc
|
||||
pcdatadir = $(libdir)/pkgconfig
|
||||
|
|
10
configure.ac
10
configure.ac
|
@ -94,7 +94,14 @@ AC_SUBST([pkg_modules])
|
|||
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
|
||||
|
||||
tests_modules="gtk+-3.0 >= $REQ_GTK_VERSION"
|
||||
PKG_CHECK_MODULES(TESTS, [$tests_modules])
|
||||
AC_ARG_ENABLE(tests,
|
||||
[AS_HELP_STRING([--disable-tests],
|
||||
[Do not build tests])],
|
||||
,enable_tests=yes)
|
||||
if test x$enable_tests = xyes ; then
|
||||
PKG_CHECK_MODULES(TESTS, [$tests_modules])
|
||||
fi
|
||||
AM_CONDITIONAL(TESTS_ENABLED, test x$enable_tests = xyes)
|
||||
|
||||
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
|
||||
AC_SUBST(GLIB_GENMARSHAL)
|
||||
|
@ -210,6 +217,7 @@ echo "
|
|||
source code location: ${srcdir}
|
||||
cflags: ${CFLAGS}
|
||||
|
||||
Build tests: ${enable_tests}
|
||||
Build docs: ${enable_docbook_docs}
|
||||
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue