From f7e87e96d2c8334c28281aa11c44f6ef54b55aae Mon Sep 17 00:00:00 2001
From: Slávek Banko <slavek.banko@axis.cz>
Date: Mon, 10 Mar 2025 20:18:25 +0100
Subject: Fix CMake rules for relationship between add_custom_target and
 add_custom_command for konsole fonts. This solves the warning about the use
 of wrong syntax.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
---
 konsole/fonts/CMakeLists.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/konsole/fonts/CMakeLists.txt b/konsole/fonts/CMakeLists.txt
index e61aa959b..379f357e2 100644
--- a/konsole/fonts/CMakeLists.txt
+++ b/konsole/fonts/CMakeLists.txt
@@ -19,14 +19,16 @@ install( CODE "execute_process( COMMAND mkfontdir \$ENV{DESTDIR}${DATA_INSTALL_D
 
 # FIXME generating fonts can be improved
 
-add_custom_target( console8x16.pcf.gz ALL )
-add_custom_command( TARGET console8x16.pcf.gz
+add_custom_target( konsole-font-8x16 ALL
+  DEPENDS console8x16.pcf.gz )
+add_custom_command( OUTPUT console8x16.pcf.gz
   COMMAND bdftopcf -o console8x16.pcf ${CMAKE_CURRENT_SOURCE_DIR}/console8x16.bdf
   COMMAND gzip -f --best console8x16.pcf
   DEPENDS console8x16.bdf )
 
-add_custom_target( 9x15.pcf.gz ALL )
-add_custom_command( TARGET 9x15.pcf.gz
+add_custom_target( konsole-font-9x15 ALL
+  DEPENDS 9x15.pcf.gz )
+add_custom_command( OUTPUT 9x15.pcf.gz
   COMMAND bdftopcf -o 9x15.pcf ${CMAKE_CURRENT_SOURCE_DIR}/9x15.bdf
   COMMAND gzip -f --best 9x15.pcf
   DEPENDS 9x15.bdf )
-- 
cgit v1.2.3

