[colobot] 35/145: Add warning messages if tool programs are not found

Didier Raboud odyx at moszumanska.debian.org
Mon Jul 11 12:56:14 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 3a3653d47e2a0d2ee75ccfd50fab99d036a41374
Author: Piotr Dziwinski <piotrdz at gmail.com>
Date:   Sun Apr 3 15:30:23 2016 +1200

    Add warning messages if tool programs are not found
---
 desktop/CMakeLists.txt | 36 +++++++++++++++++++++++++++++-------
 1 file changed, 29 insertions(+), 7 deletions(-)

diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt
index a452167..b4e6a85 100644
--- a/desktop/CMakeLists.txt
+++ b/desktop/CMakeLists.txt
@@ -4,7 +4,15 @@ set(COLOBOT_ICON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/colobot.svg)
 
 # Render SVG icon in various sizes
 find_program(RSVG_CONVERT rsvg-convert)
+if(NOT RSVG_CONVERT)
+    message(WARNING "rsvg-cnvert not found; desktop icons will not be generated")
+endif()
+
 find_program(XMLSTARLET xmlstarlet)
+if(NOT XMLSTARLET)
+    message(WARNING "xmlstarlet not found; desktop icons will not be generated")
+endif()
+
 if(RSVG_CONVERT AND XMLSTARLET AND (PLATFORM_GNU OR PLATFORM_MACOSX))
     add_custom_target(png-icons ALL DEPENDS ${COLOBOT_ICON_FILE})
 
@@ -30,13 +38,19 @@ if(RSVG_CONVERT AND XMLSTARLET AND (PLATFORM_GNU OR PLATFORM_MACOSX))
     endforeach()
 
     # Pack icon for Mac OS
-    find_program(PNG2ICNS png2icns)
-    if(PNG2ICNS AND PLATFORM_MACOSX)
-        add_custom_command(OUTPUT Colobot.icns
-            COMMAND ${PNG2ICNS} Colobot.icns ${ICNS_SRCS}
-            DEPENDS png-icons
-            )
-        add_custom_target(icns-icon ALL DEPENDS Colobot.icns)
+    if(PLATFORM_MACOSX)
+        find_program(PNG2ICNS png2icns)
+        if(NOT PNG2ICNS)
+            message(WARNING "png2icns not found; icns file will not be generated")
+        endif()
+
+        if(PNG2ICNS)
+            add_custom_command(OUTPUT Colobot.icns
+                COMMAND ${PNG2ICNS} Colobot.icns ${ICNS_SRCS}
+                DEPENDS png-icons
+                )
+            add_custom_target(icns-icon ALL DEPENDS Colobot.icns)
+        endif()
     endif()
 
 endif()
@@ -64,6 +78,10 @@ if(PLATFORM_GNU)
 
     # Translate translatable material
     find_program(PO4A po4a)
+    if(NOT PO4A)
+        message(WARNING "po4a not found; desktop and manpage files will not be translated")
+    endif()
+
     if(PO4A)
         add_custom_target(desktop_po4a
             COMMAND ${PO4A} po4a.cfg
@@ -74,6 +92,10 @@ if(PLATFORM_GNU)
 
     # Create manpage from pod-formatted file
     find_program(POD2MAN pod2man)
+    if(NOT POD2MAN)
+        message(WARNING "pod2man not found; manpage will not be generated")
+    endif()
+
     if(POD2MAN)
         set(COLOBOT_MANPAGE_SECTION 6)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list