From c68083abf3030d513ed21ea7902f96c76c84e3b6 Mon Sep 17 00:00:00 2001
From: Slávek Banko <slavek.banko@axis.cz>
Date: Mon, 24 Aug 2026 13:36:40 +0200
Subject: Install helper scripts as executables.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Although we are currently running the only helper script via a perl call,
so we don't need it to have the executable bit, lintian is reporting a
warning that the scripts are not installed as executables.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
---
 CMakeLists.txt | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8e0fab..bc0cfa1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
 #################################################
 #
-#  (C) 2021 Slávek Banko
+#  (C) 2021-2026 Slávek Banko
 #  slavek.banko (at) axis.cz
 #
 #  Improvements and feedback are welcome
@@ -26,7 +26,17 @@ project( tde-cmake-rules )
 file( GLOB_RECURSE _modules
       RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
       ${CMAKE_CURRENT_SOURCE_DIR}/modules/* )
+
+unset( _programs )
+foreach( _module IN LISTS _modules )
+  if( "${_module}" MATCHES "\\.(pl|sh)\$" )
+    list( APPEND _programs "${_module}" )
+    list( REMOVE_ITEM _modules "${_module}" )
+  endif()
+endforeach()
+
 install( FILES ${_modules} DESTINATION ${CMAKE_ROOT}/Modules )
+install( PROGRAMS ${_programs} DESTINATION ${CMAKE_ROOT}/Modules )
 
 file( GLOB_RECURSE _templates
       RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
-- 
cgit v1.2.3

