projects/aports·blob master · refs

53 lines · 1.5 KiB

1From 2a671f952c3125eb490d0468baf7dd3eb21c20f8 Mon Sep 17 00:00:00 2001
2From: Luca Weiss <[email protected]>
3Date: Wed, 11 Feb 2026 16:49:53 +0100
4Subject: [PATCH] Include and link against libintl
5
6textdomain, bindtextdomain and bind_textdomain_codeset are defined in
7libintl.h, so include that header, and link the application against it.
8---
9 CMakeLists.txt | 2 ++
10 src/CMakeLists.txt | 1 +
11 src/gallery-application.cpp | 1 +
12 3 files changed, 4 insertions(+)
13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index 55f463f6..2bcf643e 100644
16--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
18@@ -45,6 +45,8 @@ find_package(PkgConfig REQUIRED)
19 pkg_check_modules(EXIV2 REQUIRED exiv2)
20 pkg_check_modules(MEDIAINFO REQUIRED libmediainfo)
21
22+find_package(Intl REQUIRED)
23+
24 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
25 set(CMAKE_EXE_LINKER_FLAGS "-s")
26
27diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
28index 53979732..67a0a521 100644
29--- a/src/CMakeLists.txt
30+++ b/src/CMakeLists.txt
31@@ -67,6 +67,7 @@ target_link_libraries( ${GALLERY}
32 Qt5::Quick
33 Qt5::Sql
34 Qt5::Widgets
35+ Intl::Intl
36 )
37
38 install(TARGETS ${GALLERY} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
39diff --git a/src/gallery-application.cpp b/src/gallery-application.cpp
40index 12729203..8c409400 100644
41--- a/src/gallery-application.cpp
42+++ b/src/gallery-application.cpp
43@@ -56,6 +56,7 @@
44 #include <QTimer>
45 #include <QUrl>
46 #include <QtGui/QGuiApplication>
47+#include <libintl.h>
48
49 QElapsedTimer* GalleryApplication::m_timer = 0;
50
51--
522.53.0
53