[evolution] Bug 781645 - Skip GSettings schema compile and icon cache update when DESTDIR is set



commit a9f72bd18c3b66dd7d2a98d5905af69d340ac5ab
Author: Milan Crha <mcrha redhat com>
Date:   Mon Oct 2 19:22:41 2017 +0200

    Bug 781645 - Skip GSettings schema compile and icon cache update when DESTDIR is set

 cmake/modules/GLibTools.cmake |    8 +++++---
 cmake/modules/IconCache.cmake |    8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/cmake/modules/GLibTools.cmake b/cmake/modules/GLibTools.cmake
index fc8eb82..f0be558 100644
--- a/cmake/modules/GLibTools.cmake
+++ b/cmake/modules/GLibTools.cmake
@@ -238,9 +238,11 @@ macro(add_gsettings_schemas _target _schema0)
        if(_install_code)
                # Compile gsettings schemas and ensure that all of them are in the place.
                install(CODE
-                       "execute_process(${_install_code}
-                               COMMAND ${CMAKE_COMMAND} -E chdir . \"${GLIB_COMPILE_SCHEMAS}\" 
\"${GSETTINGS_SCHEMAS_DIR}\"
-                       )")
+                       "if(\"\$ENV{DESTDIR}\" STREQUAL \"\")
+                               execute_process(${_install_code}
+                                       COMMAND ${CMAKE_COMMAND} -E chdir . \"${GLIB_COMPILE_SCHEMAS}\" 
\"${GSETTINGS_SCHEMAS_DIR}\"
+                               )
+                       endif(\"\$ENV{DESTDIR}\" STREQUAL \"\")")
        endif(_install_code)
 endmacro(add_gsettings_schemas)
 
diff --git a/cmake/modules/IconCache.cmake b/cmake/modules/IconCache.cmake
index 6f7f5f0..145b843 100644
--- a/cmake/modules/IconCache.cmake
+++ b/cmake/modules/IconCache.cmake
@@ -60,9 +60,11 @@ macro(add_icon_cache_files _destdir _fileslistvar)
 
        if(GTK_UPDATE_ICON_CACHE)
                install(CODE
-                       "execute_process(${_install_code}
-                               COMMAND ${CMAKE_COMMAND} -E chdir . ${_update_icon_cache_cmd}
-                       )")
+                       "if(\"\$ENV{DESTDIR}\" STREQUAL \"\")
+                               execute_process(${_install_code}
+                                       COMMAND ${CMAKE_COMMAND} -E chdir . ${_update_icon_cache_cmd}
+                               )
+                       endif(\"\$ENV{DESTDIR}\" STREQUAL \"\")")
        endif(GTK_UPDATE_ICON_CACHE)
 endmacro(add_icon_cache_files)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]