aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2019-11-30 02:09:14 +0000
committerBertrand Jacquin <bertrand@jacquin.bzh>2022-07-18 00:14:37 +0100
commitc927623016a946cddf6ba4e255cc9208929fa117 (patch)
treefc865087f2273b69bc6021ef335628332b948990
parentUse gentoo dev-libs/randomx (diff)
downloadmonero-c927623016a946cddf6ba4e255cc9208929fa117.tar.xz
translations: use host compilerv0.18.0.0
Do not pass target compiler and compiler flags as generate_translations_header need to be created using host compiler and compiler flags
-rw-r--r--CMakeLists.txt4
-rw-r--r--translations/CMakeLists.txt4
2 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b05c087cf..ef980115c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -671,7 +671,9 @@ 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_TOOLCHAIN_FILE=${CMAKE_CURRENT_BINARY_DIR}/translations.cmake
+ -DLRELEASE_PATH=${LRELEASE_PATH}
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "")
include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
add_subdirectory(external)
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
index 3b43360f8..35fcae544 100644
--- a/translations/CMakeLists.txt
+++ b/translations/CMakeLists.txt
@@ -30,6 +30,10 @@ cmake_minimum_required(VERSION 3.5)
project(translations)
+# Ensure LDFLAGS for target are not propagated here since target are
+# meant for host
+UNSET(ENV{LDFLAGS})
+
# when crosscompiling import the executable targets from a file
IF(CMAKE_CROSSCOMPILING)
message(WARNING "CrossCompiling")