Add option to build with or without x 51/16051/1 accepted/tizen/generic accepted/tizen/ivi/stable accepted/tizen/mobile accepted/tizen_generic accepted/tizen_ivi accepted/tizen_ivi_panda accepted/tizen/generic/20140217.081903 accepted/tizen/generic/20140312.095525 accepted/tizen/ivi/20140215.181258 accepted/tizen/ivi/panda/20140312.111055 accepted/tizen/ivi/release/20140312.120621 accepted/tizen/mobile/20140225.042410 submit/tizen/20140214.211754 submit/tizen/20140312.070733 submit/tizen_ivi_release/20140312.071211
authorBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Wed, 5 Feb 2014 16:16:51 +0000 (17:16 +0100)
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Wed, 5 Feb 2014 16:36:52 +0000 (17:36 +0100)
Theses changes are needed to manage X11 #ifdef in wrt-commons header file
https://review.tizen.org/gerrit/15793

Change-Id: I0d4ba71739fcaa1d62530d30046715a1eb6b2899
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
CMakeLists.txt
packaging/wrt-plugins-common.spec

index d88f711..2f0b87f 100644 (file)
@@ -57,6 +57,10 @@ SET(CMAKE_CXX_FLAGS_CCOV       "-O0 -std=c++0x -g --coverage")
 
 OPTION(DPL_LOG "DPL logs status" ON)
 OPTION(WITH_TESTS "Build tests" OFF)
+OPTION(X11_SUPPORT "Enable X11" ON)
+IF(X11_SUPPORT)
+    ADD_DEFINITIONS("-DX11")
+ENDIF(X11_SUPPORT)
 
 IF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
     MESSAGE(STATUS "Logging enabled for DPL")
index 3e507cf..486f927 100644 (file)
@@ -1,3 +1,4 @@
+%bcond_with x
 Name:       wrt-plugins-common
 Summary:    wrt-plugins common library
 Version:    0.3.115
@@ -54,6 +55,11 @@ export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
 %cmake . -DDPL_LOG="ON"                     \
         -DCMAKE_PROJECT_VERSION=%{version} \
         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
+%if %{with x}
+         -DX11_SUPPORT=On \
+%else
+         -DX11_SUPPORT=Off \
+%endif
            %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
 make %{?jobs:-j%jobs}