build-style/cmake: also fix -isystem for Ninja

Discovered by cross-build failure of gnuradio-osmosdr.

While we're at it, fix flags.make in batch.
This commit is contained in:
Đoàn Trần Công Danh 2021-02-20 12:16:56 +07:00
parent f610253281
commit 8e102f22ce

View file

@ -67,8 +67,12 @@ _EOF
CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
cmake ${cmake_args} ${configure_args} ${wrksrc}/${build_wrksrc}
# Replace -isystem with -I for Qt4 and Qt5 packages
find -name flags.make -exec sed -i "{}" -e"s;-isystem;-I;g" \;
# Replace -isystem with -I
if [ "$CMAKE_GENERATOR" = "Unix Makefiles" ]; then
find . -name flags.make -exec sed -i -e 's/-isystem/-I/g' +
elif [ "$CMAKE_GENERATOR" = Ninja ]; then
sed -i -e 's/-isystem/-I/g' build.ninja
fi
}
do_build() {