From d02c08cea20848ce290020887d1d7f92bc6705f8 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 27 Apr 2020 17:43:04 +0200 Subject: [PATCH] Only build svg2qvg when not cross-compiling Ideally we should use "option(host_build)", but that seems complicated. In addition, some toolchains don't include libQt5Svg.so, so we cannot build the tool then anyhow. --- examples/automotive/automotive.pro | 9 +++++++-- examples/qvgviewer/qvgviewer.pro | 9 +++++++-- tools/tools.pro | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/examples/automotive/automotive.pro b/examples/automotive/automotive.pro index cfb7b8bd..85884812 100644 --- a/examples/automotive/automotive.pro +++ b/examples/automotive/automotive.pro @@ -59,8 +59,13 @@ SVGSOURCES = \ # writing application project files. ########### -# Convert path to shell path, otherwise it fails on Windows. -SVG2QVG=$$shell_path($${QSK_OUT_ROOT}/tools/bin/svg2qvg) +cross_compile { + # for now just assume that a desktop version of the tool is in the path + SVG2QVG=svg2qvg +} else { + # Convert path to shell path, otherwise it fails on Windows. + SVG2QVG=$$shell_path($${QSK_OUT_ROOT}/tools/bin/svg2qvg) +} svg2qvg.name = SVG compiler svg2qvg.input = SVGSOURCES diff --git a/examples/qvgviewer/qvgviewer.pro b/examples/qvgviewer/qvgviewer.pro index fac0c2de..ae94cd44 100644 --- a/examples/qvgviewer/qvgviewer.pro +++ b/examples/qvgviewer/qvgviewer.pro @@ -16,8 +16,13 @@ SVGSOURCES = \ svg/01.08.05q.svg \ svg/01.25.18.svg -# Convert path to shell path, otherwise it fails on Windows. -SVG2QVG=$$shell_path($${QSK_OUT_ROOT}/tools/bin/svg2qvg) +cross_compile { + # for now just assume that a desktop version of the tool is in the path + SVG2QVG=svg2qvg +} else { + # Convert path to shell path, otherwise it fails on Windows. + SVG2QVG=$$shell_path($${QSK_OUT_ROOT}/tools/bin/svg2qvg) +} svg2qvg.name = SVG compiler svg2qvg.input = SVGSOURCES diff --git a/tools/tools.pro b/tools/tools.pro index 19cc6bcb..22b195e3 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -qtHaveModule(svg) { +qtHaveModule(svg):!cross_compile { SUBDIRS += \ svg2qvg