From 13e3ed651df5e2aa61b6f4f0e86b4de2ddac0e24 Mon Sep 17 00:00:00 2001 From: Igor Olshevskyi Date: Tue, 12 Jan 2016 18:21:44 +0200 Subject: [PATCH] TizenRefApp-5447[Call UI] Add incremental build possibility to project Change-Id: I04de0eccf3ef53c9c332db0be6d2a4799cfc4b1f --- .gitignore | 1 + CMakeLists.txt | 92 +++++++++++++++++++++++++--------------- packaging/org.tizen.call-ui.spec | 27 +++++++----- 3 files changed, 74 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index aefdb79..4cd766c 100644 --- a/.gitignore +++ b/.gitignore @@ -46,5 +46,6 @@ debuglinks.list debugsources.list documentation.list install_manifest.txt +TEMP_BUILD_DIR ############## diff --git a/CMakeLists.txt b/CMakeLists.txt index c71b2cb..215acdd 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ ADD_SUBDIRECTORY(po) FILE(GLOB SRCS "src/*.c") -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) INCLUDE(FindPkgConfig) pkg_check_modules (pkgs REQUIRED @@ -62,48 +62,70 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE ${EXTRA_CFLAGS}") ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} "-pie" ${pkgs_LDFLAGS}) -ADD_CUSTOM_TARGET(call.edj - COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/res/images ${SHARED_FLAGS} ${EDJE_CC_DEFINITIONS} - ${CMAKE_CURRENT_SOURCE_DIR}/res/call_edc/call.edc ${CMAKE_CURRENT_SOURCE_DIR}/res/call.edj - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/call_edc/call.edc +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_BINARY_DIR}/call.edj + COMMAND edje_cc -no-save -id ${CMAKE_SOURCE_DIR}/res/images + -id ${CMAKE_SOURCE_DIR} ${EDJE_CC_DEFINITIONS} + ${CMAKE_SOURCE_DIR}/res/call_edc/call.edc ${CMAKE_BINARY_DIR}/call.edj + DEPENDS ${CMAKE_SOURCE_DIR}/res/call_edc/call.edc + ${CMAKE_SOURCE_DIR}/include/callui-view-layout-wvga.h + ${CMAKE_SOURCE_DIR}/include/callui-view-layout-hd.h + ${CMAKE_SOURCE_DIR}/include/callui-view-caller-info-defines.h + ${CMAKE_SOURCE_DIR}/include/callui-view-elements-defines.h + ${CMAKE_SOURCE_DIR}/res/callui-color-classes.h + ${CMAKE_SOURCE_DIR}/res/call_edc/edc_image_macro.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-button-layout.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-caller-info.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-incoming-lock.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-multi-call-list.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-keypad.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-main-layout.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui_view_end_call.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-lock-screen.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-quick-pannel.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-quick-pannel-landscape.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui_view_incoming_active.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-one-hold-in-conference.edc + ${CMAKE_SOURCE_DIR}/res/call_edc/callui-view-elements.edc ) -ADD_DEPENDENCIES(${PROJECT_NAME} call.edj) - -ADD_CUSTOM_TARGET(call_theme.edj - COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/res/themes ${EDJE_CC_DEFINITIONS} -sd - ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/sounds - ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/call_theme.edc ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/call_theme.edj - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/call_theme.edc +ADD_CUSTOM_TARGET(call.edje ALL DEPENDS ${CMAKE_BINARY_DIR}/call.edj) + +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_BINARY_DIR}/call_theme.edj + COMMAND edje_cc -no-save -id ${CMAKE_SOURCE_DIR}/res/themes ${EDJE_CC_DEFINITIONS} + -sd ${CMAKE_SOURCE_DIR}/res/themes/sounds + ${CMAKE_SOURCE_DIR}/res/themes/call_theme.edc ${CMAKE_BINARY_DIR}/call_theme.edj + DEPENDS ${CMAKE_SOURCE_DIR}/res/themes/call_theme.edc ) -ADD_DEPENDENCIES(${PROJECT_NAME} call_theme.edj) - -ADD_CUSTOM_TARGET(call_genlist_theme.edj - COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/res/themes -sd - ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/sounds - ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/call_genlist_theme.edc ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/call_genlist_theme.edj - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/call_genlist_theme.edc +ADD_CUSTOM_TARGET(call_theme.edje ALL DEPENDS ${CMAKE_BINARY_DIR}/call_theme.edj) + +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_BINARY_DIR}/call_genlist_theme.edj + COMMAND edje_cc -no-save -id ${CMAKE_SOURCE_DIR}/res/themes + -sd ${CMAKE_SOURCE_DIR}/res/themes/sounds + ${CMAKE_SOURCE_DIR}/res/themes/call_genlist_theme.edc ${CMAKE_BINARY_DIR}/call_genlist_theme.edj + DEPENDS ${CMAKE_SOURCE_DIR}/res/themes/call_genlist_theme.edc ) -ADD_DEPENDENCIES(${PROJECT_NAME} call_genlist_theme.edj) +ADD_CUSTOM_TARGET(call_genlist_theme.edje ALL DEPENDS ${CMAKE_BINARY_DIR}/call_genlist_theme.edj) #install binary & edj files -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/call.edj DESTINATION ${EDJDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/call_theme.edj DESTINATION ${EDJDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/themes/call_genlist_theme.edj DESTINATION ${EDJDIR}) +INSTALL(FILES ${CMAKE_BINARY_DIR}/call.edj DESTINATION ${EDJDIR}) +INSTALL(FILES ${CMAKE_BINARY_DIR}/call_theme.edj DESTINATION ${EDJDIR}) +INSTALL(FILES ${CMAKE_BINARY_DIR}/call_genlist_theme.edj DESTINATION ${EDJDIR}) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) INSTALL(DIRECTORY DESTINATION ${DATADIR}) INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKG_NAME}.xml DESTINATION ${CMAKE_SHARE_PACKAGES_DIR}) # install manifest file & icon -INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/tables/ DESTINATION ${TABLEDIR} FILES_MATCHING PATTERN "*.xml") -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/handler_btn_02.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/call_photo_id_mask.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/icon/call_resume_play_mask.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/call_photo_id.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/button_edit_bg_new.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/call_button_icon_01.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/call_button_icon_03.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/call_button_icon_04.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/icon/call_button_add.png DESTINATION ${IMGDIR}) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/images/icon/noti_icon_reject_auto.png DESTINATION ${IMGDIR}) - +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/tables/ DESTINATION ${TABLEDIR} FILES_MATCHING PATTERN "*.xml") +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/handler_btn_02.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/call_photo_id_mask.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/icon/call_resume_play_mask.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/call_photo_id.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/button_edit_bg_new.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/call_button_icon_01.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/call_button_icon_03.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/call_button_icon_04.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/icon/call_button_add.png DESTINATION ${IMGDIR}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/icon/noti_icon_reject_auto.png DESTINATION ${IMGDIR}) diff --git a/packaging/org.tizen.call-ui.spec b/packaging/org.tizen.call-ui.spec index 134647f..006a562 100755 --- a/packaging/org.tizen.call-ui.spec +++ b/packaging/org.tizen.call-ui.spec @@ -44,32 +44,37 @@ Call UI application. export CFLAGS="${CFLAGS} -fvisibility=hidden" export CXXFLAGS="${CXXFLAGS} -fvisibility-inlines-hidden -fvisibility=hidden" export FFLAGS="${FFLAGS} -fvisibility-inlines-hidden -fvisibility=hidden" + %define APPDIR %{TZ_SYS_RO_APP}/%{name} %define BINDIR %{APPDIR}/bin %define RESDIR %{APPDIR}/res +%define PACKAGESDIR %{TZ_SYS_RO_PACKAGES} + +%define _tmp_buld_dir TEMP_BUILD_DIR/%{_project}-%{_arch} -cmake . -DCMAKE_PKG_NAME=%{name} \ +mkdir -p %{_tmp_buld_dir} +cd %{_tmp_buld_dir} + +cmake ../../ -DCMAKE_PKG_NAME=%{name} \ -DCMAKE_APP_DIR=%{APPDIR} \ -DCMAKE_BIN_DIR=%{BINDIR} \ -DCMAKE_RES_DIR=%{RESDIR} \ - -DCMAKE_SHARE_PACKAGES_DIR=%{TZ_SYS_RO_PACKAGES} - + -DCMAKE_SHARE_PACKAGES_DIR=%{PACKAGESDIR} make %{?jobs:-j%jobs} %install rm -rf %{buildroot} -%make_install +cd %{_tmp_buld_dir} -#install license file -mkdir -p %{buildroot}%{TZ_SYS_SHARE}/license -cp LICENSE %{buildroot}%{TZ_SYS_SHARE}/license/%{name} +%make_install -%post +%clean +rm -f debugfiles.list debuglinks.list debugsources.list %files -%manifest %{name}.manifest %defattr(-,root,root,-) +%manifest %{name}.manifest +%license LICENSE %{BINDIR}/* %{RESDIR}/* -%{TZ_SYS_RO_PACKAGES}/%{name}.xml -%{TZ_SYS_SHARE}/license/%{name} +%{PACKAGESDIR}/%{name}.xml -- 2.7.4