Add QNanoPainter as a submodule and add it to the build script.

main
Ben Niemann 2021-12-31 03:46:27 +01:00
parent cc2405a358
commit a7afb8b878
5 changed files with 96 additions and 0 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "noisicaa/node_lib/swh/src"]
path = noisicaa/node_lib/swh/src
url = https://github.com/swh/ladspa
[submodule "3rdparty/qnanopainter"]
path = 3rdparty/qnanopainter
url = https://github.com/QUItCoding/qnanopainter

5
3rdparty/README.md vendored Normal file
View File

@ -0,0 +1,5 @@
Some of the more obscure packages, which are not available generally available in distributions.
* qlnanopainter: Library for implementing OpenGL accelerated Qt5 C++ UI components.
- Source: https://github.com/QUItCoding/qnanopainter
- License: zlib

1
3rdparty/qnanopainter vendored Submodule

@ -0,0 +1 @@
Subproject commit 963870484151ebe6ca9225e0e73588abb7e564e0

84
3rdparty/wscript vendored Normal file
View File

@ -0,0 +1,84 @@
# @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',
'QNANO_USE_RENDERNODE=1',
]
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=[
'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',
'qnanopainter/libqnanopainter/qnanowindow.h',
'qnanopainter/libqnanopainter/private/qnanodebug.h',
'qnanopainter/libqnanopainter/qnanoquickitem.h',
'qnanopainter/libqnanopainter/qnanoquickitempainter.h',
'qnanopainter/libqnanopainter/private/qnanobackendgl2.h',
'qnanopainter/libqnanopainter/private/qnanobackendgl3.h',
],
includes=['qnanopainter/libqnanopainter/'],
defines=ctx.env['DEFINES_QNANOPAINTER'],
cxxflags=['-Wno-misleading-indentation'],
uselib='QT5QUICK',
vnum='1',
)

View File

@ -163,6 +163,8 @@ def configure(ctx):
else:
ctx.env['ENABLE_COVERAGE'] = False
ctx.recurse('3rdparty')
create_config_py(ctx)
@ -379,6 +381,7 @@ def build(ctx):
with ctx.group(ctx.GRP_BUILD_TOOLS):
ctx.recurse('build_utils')
ctx.recurse('3rdparty')
ctx.recurse('bin')
ctx.recurse('data')
ctx.recurse('noisicaa')