File: wscript_build

package info (click to toggle)
lvtk 1.2.0~dfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,308 kB
  • ctags: 2,439
  • sloc: python: 13,036; cpp: 5,029; makefile: 42; ansic: 15
file content (63 lines) | stat: -rw-r--r-- 1,754 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python

''' This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licence as published by
the Free Software Foundation, either version 3 of the Licence, 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
file COPYING for more details. '''

import os
import lv2

buildme = not bld.env.TOOLS_DISABLED and not bld.env.EXAMPLES_DISABLED
builduis = bld.env.BUILD_EXAMPLE_UIS

if buildme:
	examples = ["workhorse", "silence", "beep"]
	first_plugin = True
	
	for slug in examples:
		
		bld(rule="../build/tools/ttl2c ${SRC} ${TGT}", \
			source=slug+'.ttl', \
			target=slug+'.h')
	
		bld.add_group()

		res = ["%s.ttl" % slug]
		if True == first_plugin:
			res += ["manifest.ttl.in"]
			first_plugin = False

		plugin = bld.shlib (
			lv2_bundle	  =	 True,
			lv2_resources = res,
			lv2_target    = "lvtk.lv2",
			name          = slug,
			target        = slug,
			source        = "%s.cpp" % slug,
			includes      = ["../build/examples"],
			use           = bld.env.LIB_LVTK_PLUGIN,
			LIB_EXT		  = bld.env.pluginlib_EXT
		)
		
		# Build the plugin gui (if able)
		uislug = slug + "_ui"
		uisrc  = uislug + ".cpp"
		
		if builduis and bld.path.find_resource(uisrc):
			ui = bld.shlib(
				lv2_bundle	  =	True,
				lv2_target    = "lvtk.lv2",
				name          = uislug,
				target        = uislug,
				source        = uisrc,
				cxxflags       = ['-Wl,-z,nodelete'],
				includes      = ["../build/examples"],
				use           = [bld.env.LIB_LVTK_UI, "gtkmm"],
				LIB_EXT		  = bld.env.pluginlib_EXT
			)