Commit 76c925f6131c22472e4b24ac22b4037b36d13e1d

Authored by Tom Robinson
1 parent 0c5eaf99

Allows debug builds to be enabled for GBS & Ubuntu builds

You can now enable a debug build of DALi via GBS by adding the following to your GBS build line:

--define "%enable_debug 1"

Details in README file.

Change-Id: Ie587690ac1871d17905e83b70ce251d64f88dff2
... ... @@ -4,9 +4,11 @@ T.O.C.
4 4 1. GBS Builds
5 5 1.1. NON-SMACK Targets
6 6 1.2. SMACK enabled Targets
  7 + 1.3. DEBUG Builds
7 8 2. Building for Ubuntu desktop
8 9 2.1. Minimum Requirements
9 10 2.2. Building the Repository
  11 + 2.3. DEBUG Builds
10 12 3. Creating an example
11 13 4. Installing Emscripten examples
12 14  
... ... @@ -24,6 +26,11 @@ T.O.C.
24 26  
25 27 gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"
26 28  
  29 +1.3. DEBUG Builds
  30 +-----------------
  31 +
  32 + gbs build -A [TARGET_ARCH] --define "%enable_debug 1"
  33 +
27 34  
28 35  
29 36 2. Building for Ubuntu desktop
... ... @@ -47,6 +54,16 @@ Then run the following commands:
47 54 cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX .
48 55 make install -j8
49 56  
  57 +2.3. DEBUG Builds
  58 +-----------------
  59 +
  60 +Specify a debug build when building for desktop by passing the following parameter to cmake:
  61 +
  62 + cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_BUILD_TYPE=Debug .
  63 +
  64 +Before running make install as normal:
  65 +
  66 + make install -j8
50 67  
51 68  
52 69 3. Creating an example
... ...
build/tizen/CMakeLists.txt
... ... @@ -16,6 +16,11 @@ ELSE()
16 16 SET(BINDIR ${PREFIX}/bin)
17 17 ENDIF()
18 18  
  19 +MESSAGE( STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE} )
  20 +if(CMAKE_BUILD_TYPE MATCHES Debug)
  21 + MESSAGE("Setting variable: DEBUG_ENABLED")
  22 + SET(DEBUG_ENABLED "1")
  23 +ENDIF()
19 24  
20 25 SET(RESOURCE_DIR ${ROOT_SRC_DIR}/resources)
21 26 SET(LOCAL_IMAGES_DIR ${RESOURCE_DIR}/images)
... ...
packaging/com.samsung.dali-demo.spec
... ... @@ -70,7 +70,14 @@ LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed"
70 70 CXXFLAGS+=" -D_ARCH_ARM_"
71 71 %endif
72 72  
73   -cd %{_builddir}/%{name}-%{version}/build/tizen && cmake -DDALI_APP_DIR=%{dali_app_ro_dir} -DLOCALE_DIR=%{locale_dir} -DLOCAL_STYLE_DIR=%{local_style_dir} .
  73 +cd %{_builddir}/%{name}-%{version}/build/tizen
  74 +
  75 +cmake -DDALI_APP_DIR=%{dali_app_ro_dir} \
  76 + -DLOCALE_DIR=%{locale_dir} \
  77 +%if 0%{?enable_debug}
  78 + -DCMAKE_BUILD_TYPE=Debug \
  79 +%endif
  80 + -DLOCAL_STYLE_DIR=%{local_style_dir} .
74 81  
75 82 make %{?jobs:-j%jobs}
76 83  
... ...