1*4882a593SmuzhiyunFrom 84dea8284c521f08508bb2dcbc99db3b5d3438fd Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> 3*4882a593SmuzhiyunDate: Thu, 27 Aug 2020 17:32:09 +0200 4*4882a593SmuzhiyunSubject: [PATCH] gnuradio-runtime_pmt: dont hardcode 5*4882a593Smuzhiyun INTERFACE_INCLUDE_DIRECTORIES 6*4882a593Smuzhiyun 7*4882a593Smuzhiyungnuradio-runtimeTargets.cmake and gnuradio-pmtTargets.cmake are filled 8*4882a593Smuzhiyunusing CMAKE_INSTALL_PREFIX for INSTALL_INTERFACE. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunSince CMAKE_INSTALL_PREFIX, in buildroot, is set to /usr, these files contains 11*4882a593Smuzhiyunpath to host system. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunWith BR2_COMPILER_PARANOID_UNSAFE_PATH package using gnuradio fails with: 14*4882a593Smuzhiyunarm-linux-gnueabihf-g++: ERROR: unsafe header/library path used in cross-compilation: '-isystem' '/usr/include' 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunBy simply providing 'include', produced .cmake contains: 17*4882a593SmuzhiyunINTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" 18*4882a593Smuzhiyuninstead of 19*4882a593SmuzhiyunINTERFACE_INCLUDE_DIRECTORIES "/usr/include" 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun[Upstream status: https://github.com/gnuradio/gnuradio/pull/3737] 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunSigned-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> 24*4882a593Smuzhiyun--- 25*4882a593Smuzhiyun gnuradio-runtime/lib/CMakeLists.txt | 2 +- 26*4882a593Smuzhiyun gnuradio-runtime/lib/pmt/CMakeLists.txt | 2 +- 27*4882a593Smuzhiyun 2 files changed, 2 insertions(+), 2 deletions(-) 28*4882a593Smuzhiyun 29*4882a593Smuzhiyundiff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt 30*4882a593Smuzhiyunindex 5aa90a5e1..fc32f473b 100644 31*4882a593Smuzhiyun--- a/gnuradio-runtime/lib/CMakeLists.txt 32*4882a593Smuzhiyun+++ b/gnuradio-runtime/lib/CMakeLists.txt 33*4882a593Smuzhiyun@@ -214,7 +214,7 @@ target_link_libraries(gnuradio-runtime PUBLIC 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun target_include_directories(gnuradio-runtime 36*4882a593Smuzhiyun PUBLIC 37*4882a593Smuzhiyun- $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include> 38*4882a593Smuzhiyun+ $<INSTALL_INTERFACE:include> 39*4882a593Smuzhiyun $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include> 40*4882a593Smuzhiyun $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include> 41*4882a593Smuzhiyun PRIVATE 42*4882a593Smuzhiyundiff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt 43*4882a593Smuzhiyunindex 9fb98d0fc..6dfcd945c 100644 44*4882a593Smuzhiyun--- a/gnuradio-runtime/lib/pmt/CMakeLists.txt 45*4882a593Smuzhiyun+++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt 46*4882a593Smuzhiyun@@ -33,7 +33,7 @@ target_link_libraries(gnuradio-pmt 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun target_include_directories(gnuradio-pmt 49*4882a593Smuzhiyun PUBLIC 50*4882a593Smuzhiyun- $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include> 51*4882a593Smuzhiyun+ $<INSTALL_INTERFACE:include> 52*4882a593Smuzhiyun $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include> 53*4882a593Smuzhiyun PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ 54*4882a593Smuzhiyun ) 55*4882a593Smuzhiyun-- 56*4882a593Smuzhiyun2.26.2 57*4882a593Smuzhiyun 58