blob: 2447fa837ffa50e4f11c3c75df2d4e7c695e6bd1 [file] [log] [blame]
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
from waflib import Logs, Utils, Task, TaskGen
top = '..'
def configure(conf):
conf.load(['gnu_dirs', 'qt5'])
conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
uselib_store='NDN_CXX', mandatory=True)
conf.define('RESOURCES_DIR', Utils.subst_vars("${DATAROOTDIR}/nfd-control-center", conf.env))
if Utils.unversioned_sys_platform() == "darwin":
conf.define('OSX_BUILD', 1)
def build(bld):
app = bld(
features=['qt5', 'cxxprogram', 'cxx'],
includes = ".. .",
use = "NDN_CXX BOOST QT5CORE QT5DBUS QT5QML QT5WIDGETS",
defines = "WAF",
source = bld.path.ant_glob(['*.cpp', '**/*.qrc', '**/*.ui', '**/*.qrc']),
)
if Utils.unversioned_sys_platform() != "darwin":
app.target = "../nfd-control-center",
bld(features = "subst",
source = 'nfd-control-center.desktop.in',
target = 'nfd-control-center.desktop',
BINARY = "nfd-control-center",
install_path = "${DATAROOTDIR}/nfd-control-center"
)
bld.install_files("${DATAROOTDIR}/nfd-control-center",
bld.path.ant_glob(['Resources/*']))
else:
app.target = "../NFD Control Center"
app.mac_app = True
app.mac_plist = '../osx/Info.plist'
app.mac_resources = [i.path_from(bld.path)
for i in bld.path.parent.ant_glob('osx/Resources/*')]