aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2019-11-30 02:09:14 +0000
committerBertrand Jacquin <bertrand@jacquin.bzh>2021-06-06 03:17:41 +0100
commitc7c86612d86b4ccc10cce5c7f7f3b0c79764619f (patch)
treef4f41a6e77aac8c7f79f12b8edc90b5bd33d47ac
parentbuild: remove duplicate comment (diff)
downloadmonero-c7c86612d86b4ccc10cce5c7f7f3b0c79764619f.tar.xz
translations: use host compilerv0.17.2.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.txt10
-rw-r--r--translations/CMakeLists.txt4
2 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c8d8dffb..04ac580f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -467,7 +467,15 @@ 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_C_FLAGS=$ENV{BUILD_CFLAGS}
+ -DCMAKE_CXX_COMPILER=$ENV{BUILD_CXX}
+ -DCMAKE_CXX_FLAGS=$ENV{BUILD_CXXFLAGS}
+ -DCMAKE_EXE_LINKER_FLAGS=$ENV{BUILD_LDFLAGS}
+ -DCMAKE_MODULE_LINKER_FLAGS=$ENV{BUILD_LDFLAGS}
+ -DCMAKE_SHARED_LINKER_FLAGS=$ENV{BUILD_LDFLAGS}
+ -DLRELEASE_PATH=${LRELEASE_PATH}
INSTALL_COMMAND cmake -E echo "")
include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
add_subdirectory(external)
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
index 0081746f2..6ad90a2c9 100644
--- a/translations/CMakeLists.txt
+++ b/translations/CMakeLists.txt
@@ -30,6 +30,10 @@ cmake_minimum_required(VERSION 2.8.7)
project(translations)
+# Ensure LDFLAGS for target are not propaged 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")