1 From 2f29b6dea548be861e6f1d0be1b0b7f83a2b3037 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= <dl9pf@gmx.de>
3 Date: Mon, 4 Jan 2016 02:19:24 +0100
4 Subject: [PATCH] Fix boost include statement
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 This patch fixes a cross-compilation issue with hvacplugin.
10 The absolute path set for Boost_INCLUDE_DIRS is not
11 cross-compilation save.
12 According to https://cmake.org/Wiki/CMake:How_To_Find_Libraries
13 we better use find_package(Boost REQUIRED) .
15 Otherwise bitbake might fail with:
16 ERROR: QA Issue: hvacplugin: The compile log indicates that
17 host include and/or library paths were used.
18 Please check the log .../hvacplugin/0.1-r0/temp/log.do_compile'
19 for more information. [compile-host-path]
20 ERROR: QA run found fatal errors. Please consider fixing them.
21 ERROR: Function failed: do_package_qa
24 cc1plus: warning: include location "/usr/include/boost" is unsafe
25 for cross-compilation [-Wpoison-system-directories]
27 Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
29 CMakeLists.txt | 3 ++-
30 1 file changed, 2 insertions(+), 1 deletion(-)
32 diff --git a/CMakeLists.txt b/CMakeLists.txt
33 index f8d0e5b..f100736 100644
36 @@ -6,7 +6,8 @@ pkg_check_modules(gio gio-2.0)
37 pkg_check_modules(gio-unix gio-unix-2.0)
38 pkg_check_modules(json-c json-c)
39 pkg_check_modules(amb automotive-message-broker)
40 -set(Boost_INCLUDE_DIRS /usr/include/boost)
41 +#set(Boost_INCLUDE_DIRS /usr/include/boost)
42 +find_package(Boost REQUIRED)
44 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})