aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGuillaume LE VAILLANT <glv@posteo.net>2018-01-04 11:26:29 +0100
committerGuillaume LE VAILLANT <glv@posteo.net>2018-01-04 11:36:29 +0100
commitf035478d357d066ed18e2667c1edc6ff9dfe384b (patch)
tree7ddaab9202e872950ba5362fdd8fc41b3b048bae /CMakeLists.txt
parentMerge pull request #3019 (diff)
downloadmonero-f035478d357d066ed18e2667c1edc6ff9dfe384b.tar.xz
Fix translations header generation when cross-compilating
Define generate_translations_header as an external project to be able to use the compilation toolchain for the host instead of the toolchain for the target.
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d451f8ad..5d63f1172 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -366,7 +366,11 @@ endif()
add_definitions(-DAUTO_INITIALIZE_EASYLOGGINGPP)
# Generate header for embedded translations
-add_subdirectory(translations)
+include(ExternalProject)
+ExternalProject_Add(generate_translations_header
+ SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations"
+ BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
+ INSTALL_COMMAND cmake -E echo "")
include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
add_subdirectory(external)