summaryrefslogtreecommitdiff
path: root/net-p2p/monero/files/monero-0.17.1.1-translations-use-host-compiler.patch
blob: ac9d7da8d486f207a607700325a331d2faf5ba37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From ea1400129fa76ea66acc48e2a2f3ca1acb64711e Mon Sep 17 00:00:00 2001
From: Bertrand Jacquin <bertrand@jacquin.bzh>
Date: Sat, 30 Nov 2019 02:09:14 +0000
Subject: [PATCH] translations: use host compiler

Do not pass target compiler and compiler flags as
generate_translations_header need to be created using host compiler and
compiler flags
---
 CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41f82e26c2ec..63c6f2d4f5fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -468,7 +468,12 @@ ExternalProject_Add(generate_translations_header
   SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations"
   BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
   STAMP_DIR ${LRELEASE_PATH}
-  CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH}
+  CMAKE_ARGS
+    -DCMAKE_C_COMPILER=$ENV{BUILD_CC}
+    -DCMAKE_CXX_COMPILER=$ENV{BUILD_CXX}
+    -DCMAKE_C_FLAGS=$ENV{BUILD_CFLAGS}
+    -DCMAKE_CXX_FLAGS=$ENV{BUILD_CXXFLAGS}
+    -DLRELEASE_PATH=${LRELEASE_PATH}
   INSTALL_COMMAND cmake -E echo "")
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
 add_subdirectory(external)