mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 11:41:36 +08:00
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
|
From 6195ac786afd3fb8d74df4db86fdddd966661ec9 Mon Sep 17 00:00:00 2001
|
||
|
From: Dawid Wrobel <me@dawidwrobel.com>
|
||
|
Date: Mon, 1 Mar 2021 20:41:12 +0000
|
||
|
Subject: [PATCH] Prevent CMake failing with "variable NOTFOUND"
|
||
|
|
||
|
Since the LibIntl_LIBRARIES has value only on some platforms, CMake can
|
||
|
throw an error complaining about using a NOTFOUND variable.
|
||
|
---
|
||
|
src/CMakeLists.txt | 8 ++++++--
|
||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||
|
index 92bfabf..46d2c76 100644
|
||
|
--- a/src/CMakeLists.txt
|
||
|
+++ b/src/CMakeLists.txt
|
||
|
@@ -41,8 +41,12 @@ target_include_directories(KF5I18n INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_
|
||
|
target_include_directories(KF5I18n PRIVATE ${LibIntl_INCLUDE_DIRS})
|
||
|
|
||
|
target_link_libraries(KF5I18n PUBLIC Qt5::Core)
|
||
|
-# This is only required for platforms which don't use glibc (with glibc LibIntl_LIBRARIES will be empty)
|
||
|
-target_link_libraries(KF5I18n PRIVATE ${LibIntl_LIBRARIES})
|
||
|
+
|
||
|
+if (${LibIntl_LIBRARIES})
|
||
|
+ # This is only required for platforms which don't use glibc (with glibc LibIntl_LIBRARIES will be empty)
|
||
|
+ target_link_libraries(KF5I18n PRIVATE ${LibIntl_LIBRARIES})
|
||
|
+endif()
|
||
|
+
|
||
|
target_compile_options(KF5I18n PRIVATE -DTRANSLATION_DOMAIN=\"ki18n5\")
|
||
|
|
||
|
set_target_properties(KF5I18n PROPERTIES VERSION ${KI18N_VERSION_STRING}
|
||
|
--
|
||
|
GitLab
|
||
|
|