2021-12-31 03:46:27 +01:00
|
|
|
# @begin:license
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015-2021, Ben Niemann <pink@odahoda.de>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# @end:license
|
|
|
|
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
def configure(ctx):
|
|
|
|
ctx.env['LIB_QNANOPAINTER'] = 'qnanopainter'
|
|
|
|
ctx.env['LIBPATH_QNANOPAINTER'] = os.path.join(ctx.bldnode.abspath(), '3rdparty')
|
|
|
|
if not ctx.options.release:
|
|
|
|
ctx.env['RPATH_QNANOPAINTER'] = os.path.join(ctx.bldnode.abspath(), '3rdparty')
|
|
|
|
ctx.env['INCLUDES_QNANOPAINTER'] = os.path.join(ctx.srcnode.abspath(), '3rdparty/qnanopainter/libqnanopainter')
|
|
|
|
ctx.env['DEFINES_QNANOPAINTER'] = [
|
|
|
|
'QNANO_QT_GL_INCLUDE=1',
|
|
|
|
'QNANO_BUILD_GL_BACKENDS=1',
|
2021-12-31 04:28:56 +01:00
|
|
|
# Using rendernode should be faster, but yields some odd behavior:
|
|
|
|
# - A parent item's clip appears to be ignored.
|
|
|
|
# - The canvas area doesn't follow parent node when moved (only gets repositioned
|
|
|
|
# when explictly updated).
|
2021-12-31 09:17:00 +01:00
|
|
|
# This seems similar: https://github.com/QUItCoding/qnanopainter/issues/22
|
2021-12-31 04:28:56 +01:00
|
|
|
#'QNANO_USE_RENDERNODE=1',
|
2021-12-31 03:46:27 +01:00
|
|
|
]
|
|
|
|
|
2022-01-01 02:30:58 +01:00
|
|
|
ctx.env['INCLUDES_DEP_SORT'] = os.path.join(ctx.srcnode.abspath(), '3rdparty/dep_sort')
|
|
|
|
|
2022-01-01 02:46:27 +01:00
|
|
|
if ctx.options.with_tests:
|
|
|
|
ctx.env['LIB_SUBPROCESS'] = 'subprocess'
|
|
|
|
ctx.env['LIBPATH_SUBPROCESS'] = os.path.join(ctx.bldnode.abspath(), '3rdparty')
|
|
|
|
if not ctx.options.release:
|
|
|
|
ctx.env['RPATH_SUBPROCESS'] = os.path.join(ctx.bldnode.abspath(), '3rdparty')
|
|
|
|
ctx.env['INCLUDES_SUBPROCESS'] = os.path.join(ctx.srcnode.abspath(), '3rdparty/subprocess/src/cpp')
|
|
|
|
|
|
|
|
|
2021-12-31 03:46:27 +01:00
|
|
|
def build(ctx):
|
|
|
|
ctx.shlib(
|
|
|
|
target='qnanopainter',
|
|
|
|
features='qt5 cxx cxxshlib',
|
|
|
|
source=[
|
|
|
|
'qnanopainter/libqnanopainter/nanovg/nanovg.c',
|
|
|
|
'qnanopainter/libqnanopainter/libqnanopainterdata.qrc',
|
|
|
|
'qnanopainter/libqnanopainter/qnanopainter.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanocolor.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanolineargradient.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanoimagepattern.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanoimage.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanofont.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanoradialgradient.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanoboxgradient.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanowindow.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/private/qnanodebug.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanoquickitem.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/qnanoquickitempainter.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/private/qnanobackendgl2.cpp',
|
|
|
|
'qnanopainter/libqnanopainter/private/qnanobackendgl3.cpp',
|
|
|
|
],
|
|
|
|
moc=[
|
2021-12-31 04:28:56 +01:00
|
|
|
#'qnanopainter/libqnanopainter/nanovg/nanovg.h',
|
|
|
|
#'qnanopainter/libqnanopainter/private/qnanobrush.h',
|
|
|
|
#'qnanopainter/libqnanopainter/qnanopainter.h',
|
|
|
|
#'qnanopainter/libqnanopainter/qnanocolor.h',
|
|
|
|
#'qnanopainter/libqnanopainter/qnanolineargradient.h',
|
|
|
|
#'qnanopainter/libqnanopainter/qnanoimagepattern.h',
|
|
|
|
#'qnanopainter/libqnanopainter/qnanoimage.h',
|
|
|
|
#'qnanopainter/libqnanopainter/qnanofont.h',
|
|
|
|
#'qnanopainter/libqnanopainter/qnanoradialgradient.h',
|
|
|
|
#'qnanopainter/libqnanopainter/qnanoboxgradient.h',
|
|
|
|
#'qnanopainter/libqnanopainter/private/qnanodataelement.h',
|
|
|
|
#'qnanopainter/libqnanopainter/private/qnanobackend.h',
|
|
|
|
#'qnanopainter/libqnanopainter/private/qnanobackendfactory.h',
|
2021-12-31 03:46:27 +01:00
|
|
|
'qnanopainter/libqnanopainter/qnanowindow.h',
|
2021-12-31 04:28:56 +01:00
|
|
|
#'qnanopainter/libqnanopainter/private/qnanodebug.h',
|
2021-12-31 03:46:27 +01:00
|
|
|
'qnanopainter/libqnanopainter/qnanoquickitem.h',
|
2021-12-31 04:28:56 +01:00
|
|
|
#'qnanopainter/libqnanopainter/qnanoquickitempainter.h',
|
|
|
|
#'qnanopainter/libqnanopainter/private/qnanobackendgl2.h',
|
|
|
|
#'qnanopainter/libqnanopainter/private/qnanobackendgl3.h',
|
2021-12-31 03:46:27 +01:00
|
|
|
],
|
|
|
|
includes=['qnanopainter/libqnanopainter/'],
|
|
|
|
defines=ctx.env['DEFINES_QNANOPAINTER'],
|
|
|
|
cxxflags=['-Wno-misleading-indentation'],
|
|
|
|
uselib='QT5QUICK',
|
|
|
|
vnum='1',
|
|
|
|
)
|
|
|
|
|
2022-01-01 02:46:27 +01:00
|
|
|
if ctx.options.with_tests:
|
|
|
|
ctx.shlib(
|
|
|
|
target='subprocess',
|
|
|
|
features='cxx cxxshlib',
|
|
|
|
source=[
|
|
|
|
'subprocess/src/cpp/subprocess/CowData.cpp',
|
|
|
|
'subprocess/src/cpp/subprocess/PipeVar.cpp',
|
|
|
|
'subprocess/src/cpp/subprocess/ProcessBuilder.cpp',
|
|
|
|
'subprocess/src/cpp/subprocess/ProcessBuilder_posix.cpp',
|
|
|
|
'subprocess/src/cpp/subprocess/ProcessBuilder_windows.cpp',
|
|
|
|
'subprocess/src/cpp/subprocess/environ.cpp',
|
|
|
|
'subprocess/src/cpp/subprocess/pipe.cpp',
|
|
|
|
'subprocess/src/cpp/subprocess/shell_utils.cpp',
|
|
|
|
'subprocess/src/cpp/subprocess/utf8_to_utf16.cpp',
|
|
|
|
],
|
|
|
|
includes=['subprocess/src/cpp'],
|
|
|
|
vnum='1',
|
|
|
|
)
|