Add option to build with or without x 41/16041/2 accepted/tizen/generic accepted/tizen/ivi/stable accepted/tizen/mobile accepted/tizen_generic accepted/tizen_ivi_panda accepted/tizen_ivi_release tizen_ivi_release accepted/tizen/generic/20140213.081326 accepted/tizen/generic/20140312.095507 accepted/tizen/ivi/panda/20140312.111150 accepted/tizen/ivi/release/20140312.114727 accepted/tizen/mobile/20140225.042627 submit/tizen/20140213.081519 submit/tizen/20140312.070732 submit/tizen_ivi_release/20140312.071210
authorBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Wed, 5 Feb 2014 15:03:32 +0000 (16:03 +0100)
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Wed, 5 Feb 2014 15:28:30 +0000 (16:28 +0100)
Change-Id: Ie4fb4d998e1485a6cccf8fcd0c121bbe5804b40d
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
CMakeLists.txt
packaging/wrt-commons.spec

index 934f7dd..f865d5b 100644 (file)
@@ -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")
index b833d98..c6d2ca6 100644 (file)
@@ -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}