From ca9c58c4217b236ac061c8ea87086b41b620ff02 Mon Sep 17 00:00:00 2001 From: Francisco Santos Date: Tue, 29 Jul 2014 17:46:18 +0100 Subject: [PATCH] Make dependency in AUL optional. Change-Id: Ibe77ec3bf58765a823be772f7fe4033d8447b26a --- build/tizen/.gitignore | 1 + build/tizen/configure.ac | 9 ++++----- demo/dali-table-view.cpp | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/build/tizen/.gitignore b/build/tizen/.gitignore index bd706b5..1e145df 100644 --- a/build/tizen/.gitignore +++ b/build/tizen/.gitignore @@ -1,5 +1,6 @@ /aclocal.m4 /autom4te.cache +/compile /config.guess /config.log /config.status diff --git a/build/tizen/configure.ac b/build/tizen/configure.ac index c3fa4d3..b788479 100644 --- a/build/tizen/configure.ac +++ b/build/tizen/configure.ac @@ -15,7 +15,7 @@ m4_define([dali_version],[0.1.0]) AC_INIT([dali], [dali_version]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AM_INIT_AUTOMAKE([-Wall foreign]) AC_PROG_CXX AC_PROG_LIBTOOL @@ -29,10 +29,9 @@ AC_SUBST(DALI_VERSION) PKG_CHECK_MODULES(DALI, dali) PKG_CHECK_MODULES(DALI_TOOLKIT, dali-toolkit) -PKG_CHECK_MODULES(CAPI_MEDIA_PLAYER, capi-media-player) -PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application) -PKG_CHECK_MODULES(AUL, aul) -PKG_CHECK_MODULES(DLOG, dlog) +PKG_CHECK_MODULES(AUL, aul, + [AC_DEFINE([HAS_AUL], [1])], + [1]) DALIDEMO_CFLAGS=-DPLATFORM_SLP diff --git a/demo/dali-table-view.cpp b/demo/dali-table-view.cpp index 33d1ba8..d77c3dc 100644 --- a/demo/dali-table-view.cpp +++ b/demo/dali-table-view.cpp @@ -21,7 +21,12 @@ // EXTERNAL INCLUDES #include #include + +#ifdef USE_AUL #include +#else +#include +#endif // USE_AUL using namespace Dali; using namespace Dali::Toolkit; @@ -710,7 +715,18 @@ void DaliTableView::OnPressedAnimationFinished( Dali::Animation& source ) else { const Example& example( iter->second ); +#ifdef USE_AUL aul_open_app( example.name.c_str() ); +#else // USE_AUL + std::stringstream stream; + stream << DALI_EXAMPLE_BIN << example.name.c_str(); + pid_t pid = fork(); + if( pid == 0) + { + execlp( stream.str().c_str(), example.name.c_str(), NULL ); + DALI_ASSERT_ALWAYS(false && "exec failed!"); + } +#endif // USE_AUL } mPressedActor.Reset(); } -- 2.7.4