diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-03-08 14:24:16 -0800 |
---|---|---|
committer | Chase Douglas <chase.douglas@canonical.com> | 2012-03-16 15:23:49 -0700 |
commit | 4acb16f939c73dc081775e29eb4089e4184fffbf (patch) | |
tree | 63fd63ba4d3e1d8830670161630f85f8dcf63f53 | |
parent | 71f006cadac2bc7f249965896d898143d7592f12 (diff) |
Install, but do not build into a library, the xorg-gtest sources
This mimics the Google Test distribution mechanism. See:
http://code.google.com/p/googletest/wiki/FAQ#Why_is_it_not_recommended_to_install_a_pre-compiled_copy_of_Goog
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-By: Christopher Halse Rogers <christopher.halse.rogers@canonical.com>
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | src/Makefile.am | 41 | ||||
-rw-r--r-- | src/libxorg-gtest.ver | 24 | ||||
-rw-r--r-- | src/libxorg-gtest_main.ver | 7 | ||||
-rw-r--r-- | xorg-gtest.pc.in | 6 |
5 files changed, 14 insertions, 74 deletions
diff --git a/configure.ac b/configure.ac index 40a97f1..37a6dc0 100644 --- a/configure.ac +++ b/configure.ac @@ -11,13 +11,6 @@ AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE([enable]) -LIB_VERSION=0:0:0 -AC_SUBST([LIB_VERSION]) - -# Initialize libtool -AC_PROG_LIBTOOL - - # Checks for programs. AC_PROG_CXX AC_PROG_RANLIB @@ -55,6 +48,9 @@ AS_IF([test "x$with_evemu" == xyes], AM_CONDITIONAL([HAVE_EVEMU], [test "x$have_evemu" = "xyes"]) AS_IF([test "x$have_evemu" = xyes], [AC_DEFINE([HAVE_EVEMU])]) +AC_SUBST(SOURCEDIR, ['${prefix}/src/xorg-gtest']) +AC_SUBST(DUMMY_CONF_PATH, ['${datarootdir}/xorg/gtest/dummy.conf']) + # Check if we can build integration tests AS_IF([test "x$enable_integration_tests" != xno], [AC_MSG_CHECKING([for X.org server])] diff --git a/src/Makefile.am b/src/Makefile.am index e12e772..c5a8413 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,39 +23,16 @@ # SOFTWARE. # -lib_LTLIBRARIES = libxorg-gtest.la libxorg-gtest_main.la - -AM_CXXFLAGS = -I$(top_srcdir)/include $(XSERVER_CFLAGS) $(BASE_CXXFLAGS) - -libxorg_gtest_la_SOURCES = xorg-gtest-all.cpp - -libxorg_gtest_la_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - $(GTEST_CPPFLAGS) \ - -DDUMMY_CONF_PATH="\"$(datadir)/xorg/gtest/dummy.conf\"" - -libxorg_gtest_main_la_SOURCES = \ +libxorg_gtest_sources = \ + environment.cpp \ + device.cpp \ + process.cpp \ + test.cpp \ + xorg-gtest-all.cpp + +libxorg_gtest_main_sources = \ defines.h \ xorg-gtest_main.cpp -libxorg_gtest_main_la_LIBADD = libxorg-gtest.la - -libxorg_gtest_main_la_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - $(GTEST_CPPFLAGS) - -libxorg_gtest_la_LDFLAGS = $(XSERVER_LIBS) -Wl,--version-script=$(top_srcdir)/src/libxorg-gtest.ver -libxorg_gtest_main_la_LDFLAGS = \ - $(XSERVER_LIBS) \ - -Wl,--version-script=$(top_srcdir)/src/libxorg-gtest_main.ver - -if HAVE_EVEMU -libxorg_gtest_la_SOURCES += device.cpp - -libxorg_gtest_la_LIBADD = $(EVEMU_LIBS) -endif - srcinstalldir = $(prefix)/src/xorg-gtest/src -dist_srcinstall_DATA = $(libxorg_gtest_la_SOURCES) $(libxorg_gtest_main_la_SOURCES) - -EXTRA_DIST = libxorg-gtest.ver libxorg-gtest_main.ver +dist_srcinstall_DATA = $(libxorg_gtest_sources) $(libxorg_gtest_main_sources) diff --git a/src/libxorg-gtest.ver b/src/libxorg-gtest.ver deleted file mode 100644 index c617446..0000000 --- a/src/libxorg-gtest.ver +++ /dev/null @@ -1,24 +0,0 @@ -XORG_GTEST_1.0 { - global: - extern "C++" { - xorg::testing::Environment::*; - xorg::testing::Process::*; - xorg::testing::Test::*; - "typeinfo for xorg::testing::Environment"; - "typeinfo for xorg::testing::Test"; - "typeinfo name for xorg::testing::Environment"; - "typeinfo name for xorg::testing::Test"; - "vtable for xorg::testing::Environment"; - "vtable for xorg::testing::Test"; - }; - - local: - *; -}; - -XORG_GTEST_1.1 { - global: - extern "C++" { - xorg::testing::evemu::*; - }; -} XORG_GTEST_1.0; diff --git a/src/libxorg-gtest_main.ver b/src/libxorg-gtest_main.ver deleted file mode 100644 index 001ce91..0000000 --- a/src/libxorg-gtest_main.ver +++ /dev/null @@ -1,7 +0,0 @@ -XORG_GTEST_1.0 { - global: - main; - - local: - *; -}; diff --git a/xorg-gtest.pc.in b/xorg-gtest.pc.in index 7df6fbf..a80f666 100644 --- a/xorg-gtest.pc.in +++ b/xorg-gtest.pc.in @@ -1,11 +1,9 @@ prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ includedir=@includedir@ +sourcedir=@SOURCEDIR@ datarootdir=@datarootdir@ +CPPflags=-I${includedir} -I${sourcedir} -DDUMMY_CONF_PATH=\"@DUMMY_CONF_PATH@\" Name: xorg-gtest Description: X.org Google Test Environment Version: @PACKAGE_VERSION@ -Cflags: -I${includedir} -DDUMMY_CONF_PATH=@DUMMY_CONF_PATH@ -Libs: -L${libdir} -lxorg-gtest |