summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2024-03-01 10:27:55 +0100
committerAlbert Astals Cid <aacid@kde.org>2024-03-01 10:39:15 +0100
commit840fc7637d93d40e09c7792086c96ba94811fb1f (patch)
tree64fc8988636eafcd76cae46c32ef5fccb46c1b6e
parent0ad01ca51e6b6e061ba85db5b906dfc299dba8e1 (diff)
Fix translations on non glibc platforms
-rw-r--r--utils/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index 8fb7a509..bc1c5864 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -1,4 +1,5 @@
include(FindGettext)
+include(FindIntl)
set(common_srcs
parseargs.cc
@@ -94,7 +95,7 @@ target_link_libraries(pdfinfo ${common_libs})
install(TARGETS pdfinfo DESTINATION bin)
install(FILES pdfinfo.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
-if (GETTEXT_FOUND AND ENABLE_SIGNATURES)
+if (GETTEXT_FOUND AND Intl_FOUND AND ENABLE_SIGNATURES)
add_definitions(-DHAVE_GETTEXT)
add_definitions(-DCMAKE_INSTALL_LOCALEDIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LOCALEDIR}")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/po")
@@ -110,6 +111,14 @@ if (ENABLE_SIGNATURES)
if (ENABLE_NSS3)
target_include_directories(pdfsig SYSTEM PRIVATE ${NSS3_INCLUDE_DIRS})
endif()
+ if (Intl_FOUND)
+ if (${CMAKE_VERSION} VERSION_LESS "3.20.0")
+ target_include_directories(pdfsig SYSTEM PRIVATE ${Intl_INCLUDE_DIRS})
+ target_link_libraries(pdfsig ${Intl_LIBRARIES})
+ else ()
+ target_link_libraries(pdfsig Intl::Intl)
+ endif ()
+ endif ()
install(TARGETS pdfsig DESTINATION bin)
install(FILES pdfsig.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif ()