Fix cross-compile to consider CMAKE_CROSSCOMPILING_EMULATOR

When CMAKE_CROSSCOMPILING_EMULATOR is defined, a cross-compile
can be made, however with native (emulated) execution possible.

This commit takes those points in the build system that
execute built targets natively and allow these to be executed
in a crosscompile if CMAKE_CROSSCOMPILING_EMULATOR is defined.

Closes #1805
This commit is contained in:
Justin Jagieniak 2021-04-14 10:17:16 +02:00 committed by Daniel Black
commit 1715fef107
7 changed files with 13 additions and 13 deletions

View file

@ -405,7 +405,7 @@ if(NOT ${GRN_WITH_MECAB} STREQUAL "no")
set(MECAB_LIBRARIES libmecab)
else()
set(GRN_MECAB_CONFIG "mecab-config" CACHE FILEPATH "mecab-config path")
if(NOT CMAKE_CROSSCOMPILING)
if(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
find_program(GRN_MECAB_CONFIG_ABSOLUTE_PATH "${GRN_MECAB_CONFIG}")
endif()
if(EXISTS "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}")