summaryrefslogtreecommitdiff
path: root/libs/clearlooks-newer/SConscript
blob: ca527c70da8db05903a4f87af3bf6041c5aac99f (plain)
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
# -*- python -*-

import os.path
import glob

libclearlooks_files = [
	'animation.c',
	'cairo-support.c',
        'clearlooks_draw.c',
	'clearlooks_draw_glossy.c',
	'clearlooks_draw_gummy.c',
	'clearlooks_draw_inverted.c',
	'clearlooks_rc_style.c',
	'clearlooks_style.c',
	'clearlooks_theme_main.c',
	'support.c',
	'widget-information.c'
	]

Import ('env install_prefix')

clearlooks = env.Clone()

clearlooks.Replace(CCFLAGS = ' `pkg-config --cflags gtk+-2.0 cairo` ',
                   LINKFLAGS = ' `pkg-config --libs gtk+-2.0 cairo` ')

if env['GTKOSX']:
    clearlooks.Append (CCFLAGS = '-DGTKOSX')

libclearlooks = clearlooks.SharedLibrary('clearlooks', libclearlooks_files) 
usable_libclearlooks = clearlooks.Install ('engines', libclearlooks)

if env['GTKOSX']:
    # GTK looks only for foo.so, not foo.dylib
    print ("GTKOSX part");
    really_usable_module = clearlooks.Command ('engines/libclearlooks.so', usable_libclearlooks, 'ln -s libclearlooks.dylib libclearlooks.so', chdir=1)
    Default (really_usable_module)
else:
    print ("non-GTKOSX part");
    Default (usable_libclearlooks)

env.Alias('install', env.Install (
        os.path.join(install_prefix,env['LIBDIR'], 'ardour2', 'engines'),
        libclearlooks))

env.Alias('tarball', env.Distribute (env['DISTTREE'],
                                     [ 'SConscript', 'bits.c'] +
                                    libclearlooks_files +
                                    glob.glob('*.h')
                                    ))