diff --git a/README b/README index 1103da8..05417af 100644 --- a/README +++ b/README @@ -4,9 +4,11 @@ T.O.C. 1. GBS Builds 1.1. NON-SMACK Targets 1.2. SMACK enabled Targets + 1.3. DEBUG Builds 2. Building for Ubuntu desktop 2.1. Minimum Requirements 2.2. Building the Repository + 2.3. DEBUG Builds 3. Creating an example 4. Installing Emscripten examples @@ -24,6 +26,11 @@ T.O.C. gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1" +1.3. DEBUG Builds +----------------- + + gbs build -A [TARGET_ARCH] --define "%enable_debug 1" + 2. Building for Ubuntu desktop @@ -47,6 +54,16 @@ Then run the following commands: cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX . make install -j8 +2.3. DEBUG Builds +----------------- + +Specify a debug build when building for desktop by passing the following parameter to cmake: + + cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX -DCMAKE_BUILD_TYPE=Debug . + +Before running make install as normal: + + make install -j8 3. Creating an example diff --git a/build/tizen/CMakeLists.txt b/build/tizen/CMakeLists.txt index e98c386..5d3d28f 100644 --- a/build/tizen/CMakeLists.txt +++ b/build/tizen/CMakeLists.txt @@ -16,6 +16,11 @@ ELSE() SET(BINDIR ${PREFIX}/bin) ENDIF() +MESSAGE( STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE} ) +if(CMAKE_BUILD_TYPE MATCHES Debug) + MESSAGE("Setting variable: DEBUG_ENABLED") + SET(DEBUG_ENABLED "1") +ENDIF() SET(RESOURCE_DIR ${ROOT_SRC_DIR}/resources) SET(LOCAL_IMAGES_DIR ${RESOURCE_DIR}/images) diff --git a/packaging/com.samsung.dali-demo.spec b/packaging/com.samsung.dali-demo.spec index 63e4e87..bb5cb50 100755 --- a/packaging/com.samsung.dali-demo.spec +++ b/packaging/com.samsung.dali-demo.spec @@ -70,7 +70,14 @@ LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed" CXXFLAGS+=" -D_ARCH_ARM_" %endif -cd %{_builddir}/%{name}-%{version}/build/tizen && cmake -DDALI_APP_DIR=%{dali_app_ro_dir} -DLOCALE_DIR=%{locale_dir} -DLOCAL_STYLE_DIR=%{local_style_dir} . +cd %{_builddir}/%{name}-%{version}/build/tizen + +cmake -DDALI_APP_DIR=%{dali_app_ro_dir} \ + -DLOCALE_DIR=%{locale_dir} \ +%if 0%{?enable_debug} + -DCMAKE_BUILD_TYPE=Debug \ +%endif + -DLOCAL_STYLE_DIR=%{local_style_dir} . make %{?jobs:-j%jobs}