X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=doc%2Fexamples%2FMakefile.am;h=424b8440dff2417aad6f42ac15f9cd26bd03c7bc;hb=2c520d0e6e7ae99491b830f55cb663d030c9a22e;hp=cb46d2c200e2770de062333e30b7a0f0ccea3d07;hpb=5f836e39f04c7c90439b1306ccc73b20c9c95957;p=lttng-ust.git diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index cb46d2c2..424b8440 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -34,7 +34,7 @@ dist_doc_examples_python_DATA = python/hello.py endif if HAVE_CMAKE -if HAVE_CXX +if CXX_WORKS SUBDIRS_CMAKE = cmake-multiple-shared-libraries endif endif @@ -145,7 +145,20 @@ all-local: fi; if [ x"$(SUBDIRS_CMAKE)" != x"" ]; then \ for subdir in $(SUBDIRS_CMAKE); do \ - (cd $(SUBDIRS_CMAKE) && mkdir -p build && cd build && cmake .. && $(MAKE) && cd ..) || exit 1; \ + ( \ + cd $(SUBDIRS_CMAKE) && \ + $(MKDIR_P) build && \ + cd build && \ + cmake \ + -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" \ + -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" \ + -DCMAKE_C_FLAGS="$(CFLAGS) $(CPPFLAGS)" \ + -DCMAKE_CXX_FLAGS="$(CXXFLAGS) $(CPPFLAGS)" \ + -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" \ + .. && \ + $(MAKE) && \ + cd .. \ + ) || exit 1; \ done; \ fi;