From 00cb8ff4084d635d3a929cb41b8d853f6c4baf76 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Tue, 12 Jan 2016 10:08:56 +0100 Subject: Fix hvacplugin cross-compilation issue due to wrong path in CMakeLists.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes a cross-compilation issue with hvacplugin. The absolute path set for Boost_INCLUDE_DIRS is not cross-compilation save. According to https://cmake.org/Wiki/CMake:How_To_Find_Libraries we better use find_package(Boost REQUIRED) . Otherwise bitbake might fail with: ERROR: QA Issue: hvacplugin: The compile log indicates that host include and/or library paths were used. Please check the log .../hvacplugin/0.1-r0/temp/log.do_compile' for more information. [compile-host-path] ERROR: QA run found fatal errors. Please consider fixing them. ERROR: Function failed: do_package_qa Due to: cc1plus: warning: include location "/usr/include/boost" is unsafe for cross-compilation [-Wpoison-system-directories] Author: Jan-Simon Möller Signed-off-by: Manuel Bachmann --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52afae4..9e772ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ pkg_check_modules(gio gio-2.0) pkg_check_modules(gio-unix gio-unix-2.0) pkg_check_modules(json-c json-c) pkg_check_modules(amb automotive-message-broker) -set(Boost_INCLUDE_DIRS /usr/include/boost) +find_package(Boost REQUIRED) include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/plugins/common ${Boost_INCLUDE_DIRS} ${json-c_INCLUDE_DIRS} ${amb_INCLUDE_DIRS}) -- cgit 1.2.3-korg