From 56d0513a880005da850968ea5bf6d5c645761c06 Mon Sep 17 00:00:00 2001 From: Mohammad Taha Bin Firoz Date: Fri, 2 Sep 2022 18:41:13 +0500 Subject: [PATCH] broken cross compile work around added (#129) * broken cross compile work around added * Added comments for context * Move CMAKE_FIND_ROOT_PATH_MODE_PROGRAM before project to prevent make from sysroot being used. Signed-off-by: Taha Firoz mtahafiroz@gmail.com --- AUTHORS | 1 + templates/app/CMakeLists.txt.tmpl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 8f2d7dc..c5093b1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,3 +7,4 @@ Sony Group Corporation Michael Lamers (info@devmil.de) Andrea Daoud (andreadaoud6@gmail.com) +Taha Firoz (mtahafiroz@gmail.com) diff --git a/templates/app/CMakeLists.txt.tmpl b/templates/app/CMakeLists.txt.tmpl index 72807e3..fafa1ae 100644 --- a/templates/app/CMakeLists.txt.tmpl +++ b/templates/app/CMakeLists.txt.tmpl @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 3.15) +# stop cmake from taking make from CMAKE_SYSROOT +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) project(runner LANGUAGES CXX) set(BINARY_NAME "{{projectName}}") @@ -10,7 +12,6 @@ set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") # Basically we use this include when we got the following error: # fatal error: 'bits/c++config.h' file not found include_directories(SYSTEM ${FLUTTER_SYSTEM_INCLUDE_DIRECTORIES}) -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)