X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=doc%2Fexamples%2FMakefile.am;h=424b8440dff2417aad6f42ac15f9cd26bd03c7bc;hb=ebb9f8ffff8bf3a922073143bd16825140450b98;hp=3cb3e3d7b12c031133fc93211412440c887fc952;hpb=0363661e12053e578f5cae7e29108c7029ed74ae;p=lttng-ust.git diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 3cb3e3d7..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 -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" .. && $(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;