Commit 76c925f6131c22472e4b24ac22b4037b36d13e1d
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
Showing
3 changed files
with
30 additions
and
1 deletions
README
| @@ -4,9 +4,11 @@ T.O.C. | @@ -4,9 +4,11 @@ T.O.C. | ||
| 4 | 1. GBS Builds | 4 | 1. GBS Builds |
| 5 | 1.1. NON-SMACK Targets | 5 | 1.1. NON-SMACK Targets |
| 6 | 1.2. SMACK enabled Targets | 6 | 1.2. SMACK enabled Targets |
| 7 | + 1.3. DEBUG Builds | ||
| 7 | 2. Building for Ubuntu desktop | 8 | 2. Building for Ubuntu desktop |
| 8 | 2.1. Minimum Requirements | 9 | 2.1. Minimum Requirements |
| 9 | 2.2. Building the Repository | 10 | 2.2. Building the Repository |
| 11 | + 2.3. DEBUG Builds | ||
| 10 | 3. Creating an example | 12 | 3. Creating an example |
| 11 | 4. Installing Emscripten examples | 13 | 4. Installing Emscripten examples |
| 12 | 14 | ||
| @@ -24,6 +26,11 @@ T.O.C. | @@ -24,6 +26,11 @@ T.O.C. | ||
| 24 | 26 | ||
| 25 | gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1" | 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 | 2. Building for Ubuntu desktop | 36 | 2. Building for Ubuntu desktop |
| @@ -47,6 +54,16 @@ Then run the following commands: | @@ -47,6 +54,16 @@ Then run the following commands: | ||
| 47 | cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX . | 54 | cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX . |
| 48 | make install -j8 | 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 | 3. Creating an example | 69 | 3. Creating an example |
build/tizen/CMakeLists.txt
| @@ -16,6 +16,11 @@ ELSE() | @@ -16,6 +16,11 @@ ELSE() | ||
| 16 | SET(BINDIR ${PREFIX}/bin) | 16 | SET(BINDIR ${PREFIX}/bin) |
| 17 | ENDIF() | 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 | SET(RESOURCE_DIR ${ROOT_SRC_DIR}/resources) | 25 | SET(RESOURCE_DIR ${ROOT_SRC_DIR}/resources) |
| 21 | SET(LOCAL_IMAGES_DIR ${RESOURCE_DIR}/images) | 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,7 +70,14 @@ LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed" | ||
| 70 | CXXFLAGS+=" -D_ARCH_ARM_" | 70 | CXXFLAGS+=" -D_ARCH_ARM_" |
| 71 | %endif | 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 | make %{?jobs:-j%jobs} | 82 | make %{?jobs:-j%jobs} |
| 76 | 83 |