]> source.dussan.org Git - tigervnc.git/commitdiff
Avoid wildcards in cmake rules
authorPierre Ossman <ossman@cendio.se>
Mon, 17 Apr 2023 14:56:12 +0000 (16:56 +0200)
committerPierre Ossman <ossman@cendio.se>
Mon, 17 Apr 2023 14:56:12 +0000 (16:56 +0200)
They are not fully supported and break with some backends, like Ninja.

vncviewer/CMakeLists.txt

index c8df6a251704324adbe344adab3be72a5047bae3..3191176b45abfa777268cefa04aaabe3012427a5 100644 (file)
@@ -71,6 +71,12 @@ install(TARGETS vncviewer DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
 if(UNIX)
   install(FILES vncviewer.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 RENAME vncviewer.1)
 
+  file(STRINGS ${CMAKE_SOURCE_DIR}/po/LINGUAS LINGUAS)
+  set(po_FILES "")
+  foreach(lang ${LINGUAS})
+    list(APPEND po_FILES "${CMAKE_SOURCE_DIR}/po/${lang}.po")
+  endforeach()
+
   configure_file(vncviewer.desktop.in.in vncviewer.desktop.in)
   find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge)
   if("${GETTEXT_VERSION_STRING}" VERSION_GREATER 0.18.99)
@@ -79,7 +85,7 @@ if(UNIX)
                 --desktop --template vncviewer.desktop.in
                 -d ${CMAKE_SOURCE_DIR}/po -o vncviewer.desktop
       DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
-              ${CMAKE_SOURCE_DIR}/po/*.po
+              ${po_FILES}
     )
   elseif(INTLTOOL_MERGE_EXECUTABLE)
     add_custom_command(OUTPUT vncviewer.desktop
@@ -91,7 +97,7 @@ if(UNIX)
                 -d ${CMAKE_SOURCE_DIR}/po
                 vncviewer.desktop.intl vncviewer.desktop
       DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
-              ${CMAKE_SOURCE_DIR}/po/*.po
+              ${po_FILES}
     )
   else()
     add_custom_command(OUTPUT vncviewer.desktop
@@ -108,7 +114,7 @@ if(UNIX)
                 --xml --template ${CMAKE_CURRENT_SOURCE_DIR}/org.tigervnc.vncviewer.metainfo.xml.in
                 -d ${CMAKE_SOURCE_DIR}/po -o org.tigervnc.vncviewer.metainfo.xml
       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.tigervnc.vncviewer.metainfo.xml.in
-              ${CMAKE_SOURCE_DIR}/po/*.po
+              ${po_FILES}
     )
   elseif(INTLTOOL_MERGE_EXECUTABLE)
     add_custom_command(OUTPUT org.tigervnc.vncviewer.metainfo.xml
@@ -121,7 +127,7 @@ if(UNIX)
                 -x ${CMAKE_SOURCE_DIR}/po
                 org.tigervnc.vncviewer.metainfo.xml.intl org.tigervnc.vncviewer.metainfo.xml
       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.tigervnc.vncviewer.metainfo.xml.in
-              ${CMAKE_SOURCE_DIR}/po/*.po
+              ${po_FILES}
     )
   else()
     add_custom_command(OUTPUT org.tigervnc.vncviewer.metainfo.xml