aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2024-02-29 16:35:52 +0200
committerJia Tan <jiat0218@gmail.com>2024-02-29 16:35:52 +0200
commit319cec142f67fe294e0486402f1569f223d9a83d (patch)
treea2cb80582dfad0e491e3a63de687c3bdbc6bc3b6 /CMakeLists.txt
parentCMake: Warn if gettext tools and pre-created .gmo files are missing. (diff)
downloadxz-319cec142f67fe294e0486402f1569f223d9a83d.tar.xz
CMake: Warn if translated man pages are missing.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 035cbec5..b45002d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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()