<html><head></head><body>Sorry, I did reply to your commit email directly, but didn't get a response from you, and then ran out of time. I have no objection to ecm having a macro like this, but the module wasn't up to scratch for ecm, and once it's in a release, we can't break compatibility. Given the module name was one of the things I wasn't happy with, keeping it out of this weekend's release was a priority for me.<br>
<br>
ECM discussions don't need to be global, but kde-buildsystem should really be involved.<br>
<br>
Can we revisit adding this to ecm next week?<br>
<br>
Alex<br>
<br>
PS: sorry for top-posting - I'm writing on my phone.<br><br><div class="gmail_quote">On 3 December 2015 10:12:04 GMT+00:00, Marco Martin <notmart@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi,<br />Where was the decision about this?<br /><br />To make it global wasn't admittedly a big discussion, but seemed quite agreed <br />that templates were going inside the framework themselves<br />(note that this commit will break kapptemplate itself as well since was going <br />to not have its own macro as well)<br /><br />On Thursday 03 December 2015, Alex Merry wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Git commit 2d814f049b496542dde17b4049679b8a0b7e1d9d by Alex Merry.<br /> Committed on 03/12/2015 at 10:02.<br /> Pushed by alexmerry into branch 'master'.<br /> <br /> Add KDETemplateMacro.cmake so I can remove it from ecm for now.<br /> <br /> See emails on kde-commits mailing list for rationale.<br /> <br /> CCMAIL: notmart@gmail.com<br /> <br /> M  +1    -1    CMakeLists.txt<br /> A  +49   -0    cmake/KDETemplateMacro.cmake<br /> <br /> <a
href="http://commits.kde.org/plasma-framework/2d814f049b496542dde17b4049679b8a0b7">http://commits.kde.org/plasma-framework/2d814f049b496542dde17b4049679b8a0b7</a><br /> e1d9d<br /> <br /> diff --git a/CMakeLists.txt b/CMakeLists.txt<br /> index 70f8965..66fb847 100644<br /> --- a/CMakeLists.txt<br /> +++ b/CMakeLists.txt<br /> @@ -8,7 +8,7 @@ find_package(ECM 5.16.0  NO_MODULE)<br />  set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra<br /> CMake Modules." URL<br /> "<a href="https://projects.kde.org/projects/kdesupport/extra-cmake-modules">https://projects.kde.org/projects/kdesupport/extra-cmake-modules</a>")<br /> feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND<br /> FATAL_ON_MISSING_REQUIRED_PACKAGES)<br /> <br /> -set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})<br /> +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}<br /> ${CMAKE_CURRENT_SOURCE_DIR}/cmake)<br /> <br /> <br />  include(GenerateExportHeader)<br /> diff --git
a/cmake/KDETemplateMacro.cmake b/cmake/KDETemplateMacro.cmake<br /> new file mode 100644<br /> index 0000000..796c3f1<br /> --- /dev/null<br /> +++ b/cmake/KDETemplateMacro.cmake<br /> @@ -0,0 +1,49 @@<br /> +macro(kdetemplate_add_app_templates _templateNames)<br /> +    foreach(_templateName ${ARGV})<br /> +<br /> +        get_filename_component(_tmp_file ${_templateName} ABSOLUTE)<br /> +        get_filename_component(_baseName ${_tmp_file} NAME_WE)<br /> +        if(WIN32)<br /> +            set(_template ${CMAKE_CURRENT_BINARY_DIR}/${_baseName}.zip)<br /> +        else(WIN32)<br /> +            set(_template<br /> ${CMAKE_CURRENT_BINARY_DIR}/${_baseName}.tar.bz2) +        endif()<br /> +<br /> +<br /> +        file(GLOB _files "${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}/*")<br /> +        set(_deps)<br /> +        foreach(_file ${_files})<br /> +            get_filename_component(_fileName ${_file} NAME)<br /> +            string(COMPARE NOTEQUAL ${_fileName} .kdev_ignore
_v1)<br /> +            string(REGEX MATCH "\\.svn" _v2 ${_fileName})<br /> +            if(WIN32)<br /> +                string(REGEX MATCH "_svn" _v3 ${_fileName})<br /> +            else(WIN32)<br /> +                set(_v3 FALSE)<br /> +            endif()<br /> +            if (_v1 AND NOT _v2 AND NOT _v3)<br /> +                set(_deps ${_deps} ${_file})<br /> +            endif ()<br /> +        endforeach()<br /> +<br /> +        add_custom_target(${_baseName} ALL DEPENDS ${_template})<br /> +<br /> +        if(WIN32)<br /> +            add_custom_command(OUTPUT ${_template}<br /> +                COMMAND 7za ARGS a -r -tzip ${_template}<br /> ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}/* +                DEPENDS<br /> ${_deps}<br /> +            )<br /> +        else(WIN32)<br /> +            add_custom_command(OUTPUT ${_template}<br /> +                COMMAND tar ARGS -c -C<br /> ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName} +                   <br /> --exclude
.kdev_ignore --exclude .svn<br /> +                    -j -f ${_template} .<br /> +                DEPENDS ${_deps}<br /> +            )<br /> +        endif()<br /> +<br /> +        install(FILES ${_template} DESTINATION<br /> ${DATA_INSTALL_DIR}/kdevappwizard/templates) +       <br /> set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES<br /> "${_template}") +<br /> +    endforeach()<br /> +endmacro()<br /></blockquote><br /></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>