]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Warn if translated man pages are missing.
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 29 Feb 2024 14:35:52 +0000 (16:35 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 29 Feb 2024 14:37:19 +0000 (16:37 +0200)
CMakeLists.txt

index 035cbec53c586c0c812fa6dac885ac911f911425..b45002d8396a0cc0a06d59fbfb0513686a40f00c 100644 (file)
@@ -306,6 +306,15 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.20")
                             "disabled by passing -DENABLE_NLS=OFF to cmake.")
         endif()
 
+        # Warn if NLS is enabled but translated man pages are missing.
+        if(UNIX AND ENABLE_NLS AND
+                NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po4a/man")
+            message(WARNING "Native language support (NLS) has been enabled "
+                            "but pre-generated translated man pages "
+                            "were not found and thus they won't be installed. "
+                            "Run 'po4a/update-po' to generate them.")
+        endif()
+
         # The *installed* name of the translation files is "xz.mo".
         set(TRANSLATION_DOMAIN "xz")
     endif()