From 021d3b8ee8ef0c246e539090899a43e7cef16539 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sat, 9 Sep 2006 13:30:56 +0000 Subject: Add macro to remove obsolete cmake file (not necessary to duplicate (in the future) code) svn path=/trunk/KDE/kdelibs/; revision=582465 --- modules/KDE4Macros.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 63a19671..bc7db283 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -668,3 +668,15 @@ MACRO(KDE4_ADD_DCOP_STUBS) Please remove it and port to DBUS.") ENDMACRO(KDE4_ADD_DCOP_STUBS) +MACRO(KDE4_REMOVE_OBSOLETE_CMAKE_FILES _file_to_remove) +# the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex + install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake ) + + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "#generated by cmake, dont edit\n\n") + foreach ( _current_FILE ${_file_to_remove}) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "message(STATUS \"Removing ${module_install_dir}/${_current_FILE}\" )\n" ) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "exec_program( ${CMAKE_COMMAND} ARGS -E remove ${module_install_dir}/${_current_FILE} OUTPUT_VARIABLE _dummy)\n" ) + endforeach ( _current_FILE) + +ENDMACRO(KDE4_REMOVE_OBSOLETE_CMAKE_FILES _file) + -- cgit v1.2.1