| 1 | From 2a671f952c3125eb490d0468baf7dd3eb21c20f8 Mon Sep 17 00:00:00 2001
|
| 2 | From: Luca Weiss <[email protected]>
|
| 3 | Date: Wed, 11 Feb 2026 16:49:53 +0100
|
| 4 | Subject: [PATCH] Include and link against libintl
|
| 5 |
|
| 6 | textdomain, bindtextdomain and bind_textdomain_codeset are defined in
|
| 7 | libintl.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 |
|
| 14 | diff --git a/CMakeLists.txt b/CMakeLists.txt
|
| 15 | index 55f463f6..2bcf643e 100644
|
| 16 | |
| 17 | |
| 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 |
|
| 27 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
| 28 | index 53979732..67a0a521 100644
|
| 29 | |
| 30 | |
| 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})
|
| 39 | diff --git a/src/gallery-application.cpp b/src/gallery-application.cpp
|
| 40 | index 12729203..8c409400 100644
|
| 41 | |
| 42 | |
| 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 | --
|
| 52 | 2.53.0
|
| 53 |
|