From 57cdcedf1bde06195f782fd2cfcf302050245da6 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 17 Apr 2023 16:56:12 +0200 Subject: [PATCH] Avoid wildcards in cmake rules They are not fully supported and break with some backends, like Ninja. --- vncviewer/CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/vncviewer/CMakeLists.txt b/vncviewer/CMakeLists.txt index c8df6a25..3191176b 100644 --- a/vncviewer/CMakeLists.txt +++ b/vncviewer/CMakeLists.txt @@ -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 -- 2.39.5