yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=d6eaf4271d35c24052360f8f11703be90ebc1517

commit d6eaf4271d35c24052360f8f11703be90ebc1517
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Thu Oct 8 13:41:47 2015 +0300

    Clean up panes layout generation
    
    Generate edj file at make stage
---
 CMakeLists.txt                     |  2 +-
 src/bin/gui/layouts/CMakeLists.txt | 30 ++++++++++++------------------
 2 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39a3c4b..0a42d0c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,4 +77,4 @@ add_subdirectory(src/bin)
 add_subdirectory(src/tests)
 add_subdirectory(data/config)
 add_subdirectory(data/layouts)
-add_dependencies(erigo dummy_edj)
+add_dependencies(erigo dummy_edj panes_layout_edj)
diff --git a/src/bin/gui/layouts/CMakeLists.txt 
b/src/bin/gui/layouts/CMakeLists.txt
index fab7001..d64efa1 100644
--- a/src/bin/gui/layouts/CMakeLists.txt
+++ b/src/bin/gui/layouts/CMakeLists.txt
@@ -1,25 +1,19 @@
 cmake_minimum_required(VERSION 2.8.1)
 
-LIST(APPEND LAYOUTS
-   panes_layout.edj
-   )
+add_custom_command (
+   OUTPUT panes_layout.edj
+   COMMAND edje_cc ${CMAKE_CURRENT_SOURCE_DIR}/panes_layout.edc 
${CMAKE_CURRENT_BINARY_DIR}/panes_layout.edj
+   DEPENDS panes_layout.edc
+)
 
-
-execute_process(COMMAND edje_cc panes_layout.edc
-                WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-                RESULT_VARIABLE res)
-
-if (${res} EQUAL 0)
-   message(STATUS "Edje layout compiled")
-else()
-   message(STATUS "Failed to compile edje layout")
-endif ()
+add_custom_target (
+   panes_layout_edj
+   DEPENDS panes_layout.edj panes_layout.edc
+)
 
 if (${EGUI_IS_RELEASE})
-   install (FILES ${LAYOUTS} DESTINATION share/${PROJECT_NAME_LOWER}/layouts)
-elseif (NOT ${EGUI_IS_RELEASE})
-   foreach (f ${LAYOUTS})
-      configure_file(${f} ${CMAKE_CURRENT_BINARY_DIR}/${f} COPYONLY)
-   endforeach(f)
+   install (
+      FILES ${CMAKE_CURRENT_BINARY_DIR}/panes_layout.edj
+      DESTINATION share/${PROJECT_NAME_LOWER}/layouts)
 endif (${EGUI_IS_RELEASE})
 

-- 


Reply via email to