Default execution flag on shell scripts templates.
[staging/xdg-launcher.git] / cmake / cmake.d / 02-macros.cmake
index a04b915..ace7533 100644 (file)
@@ -20,7 +20,7 @@
 #--------------------------------------------------------------------------
 #  WARNING:
 #     Do not change this cmake template
-#     Customise your preferences in "./etc/config.cmake"
+#     Customise your preferences in "./conf.d/cmake/config.cmake"
 #--------------------------------------------------------------------------
 # Generic useful macro
 # -----------------------
@@ -42,7 +42,9 @@ macro(configure_files_in_dir dir)
        foreach(file ${filelist})
                get_filename_component(filename ${file} NAME)
                string(REGEX REPLACE "target" "${RSYNC_TARGET}" destinationfile ${filename})
+               string(REGEX REPLACE ".in$" "" destinationfile ${destinationfile})
                configure_file(${file} ${CMAKE_CURRENT_BINARY_DIR}/target/${destinationfile})
+               set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/target/${destinationfile}")
        endforeach()
 endmacro(configure_files_in_dir)
 
@@ -185,7 +187,7 @@ macro(wgt_package_build)
 
        add_custom_target(widget DEPENDS ${PROJECT_NAME}.wgt)
        add_dependencies(widget populate packaging_wgt)
-       set(ADDITIONAL_MAKE_CLEAN_FILES, "${PROJECT_NAME}.wgt")
+       set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wgt")
 
        if(NOT RSYNC_TARGET)
                message ("${Yellow}.. Warning: RSYNC_TARGET not defined 'make widget-target-install' not instanciated${ColourReset}")
@@ -219,7 +221,6 @@ macro(rpm_package_build)
 
        add_custom_target(rpm DEPENDS ${NPKG_PROJECT_NAME}.spec)
        add_dependencies(rpm populate packaging)
-       set(ADDITIONAL_MAKE_CLEAN_FILES, "${PROJECT_NAME}.spec")
 
        if(PACKAGE_MESSAGE)
        add_custom_command(TARGET rpm
@@ -274,4 +275,4 @@ macro(project_closing_msg)
                 add_dependencies(${PROJECT_NAME}_build_done
                        ${DEPENDENCIES_TARGET} ${PROJECT_TARGETS})
        endif()
-endmacro()
\ No newline at end of file
+endmacro()