From: Baptiste DURAND Date: Wed, 5 Feb 2014 15:03:32 +0000 (+0100) Subject: Add option to build with or without x X-Git-Tag: accepted/tizen/generic/20140312.095507 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86811a069dd2a16a7705a72797459070e865a49b;p=platform%2Fframework%2Fweb%2Fwrt-commons.git Add option to build with or without x Change-Id: Ie4fb4d998e1485a6cccf8fcd0c121bbe5804b40d Signed-off-by: Baptiste DURAND --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 934f7dd..f865d5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,12 @@ ENDIF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling") OPTION(WITH_TESTS "Build tests" OFF) OPTION(WITH_CHILD "Build additional test subdirectory. WITH_TEST must be ON" OFF) +OPTION(X11_SUPPORT "Enable X11" ON) +IF(X11_SUPPORT) + ADD_DEFINITIONS("-DX11") +ENDIF(X11_SUPPORT) + + # Compiler flags SET(CMAKE_C_FLAGS_PROFILING "-O2") SET(CMAKE_CXX_FLAGS_PROFILING "-O2 -std=c++0x") diff --git a/packaging/wrt-commons.spec b/packaging/wrt-commons.spec index b833d98..c6d2ca6 100644 --- a/packaging/wrt-commons.spec +++ b/packaging/wrt-commons.spec @@ -1,3 +1,4 @@ +%bcond_with x Name: wrt-commons Summary: Wrt common library Version: 0.2.160 @@ -62,6 +63,11 @@ export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed" -DDPL_LOG="OFF" \ -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \ %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS} \ +%if %{with x} + -DX11_SUPPORT=On \ +%else + -DX11_SUPPORT=Off \ +%endif %{?WITH_CHILD:-DWITH_CHILD=%WITH_CHILD} make %{?jobs:-j%jobs}