File: SConscript

package info (click to toggle)
gpick 0.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,400 kB
  • ctags: 3,306
  • sloc: cpp: 22,216; python: 740; ansic: 476; yacc: 252; lex: 197; makefile: 49; xml: 11; sh: 8
file content (58 lines) | stat: -rw-r--r-- 2,000 bytes parent folder | download
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
#!/usr/bin/env python

import os
import sys

from tools.gpick import *

Import('*')
local_env = env.Clone()

if not local_env.GetOption('clean') and not env['TOOLCHAIN'] == 'msvc':
	local_env.ParseConfig('pkg-config --cflags --libs $GTK_PC')
	local_env.ParseConfig('pkg-config --cflags --libs $LUA_PC')
	if env['DOWNLOAD_RESENE_COLOR_LIST']:
		local_env.ParseConfig('pkg-config --libs $CURL_PC')

if local_env['ENABLE_NLS']:
	local_env.Append(
		CPPDEFINES = ['ENABLE_NLS'],
	)

sources = local_env.Glob('*.cpp') + local_env.Glob('dynv/*.cpp') + local_env.Glob('transformation/*.cpp')

objects = []
objects.append(SConscript(['version/SConscript'], exports='env'))
objects.append(SConscript(['gtk/SConscript'], exports='env'))
objects.append(SConscript(['layout/SConscript'], exports='env'))
objects.append(SConscript(['internationalisation/SConscript'], exports='env'))
objects.append(SConscript(['dbus/SConscript'], exports='env'))
objects.append(SConscript(['tools/SConscript'], exports='env'))

if env['EXPERIMENTAL_CSS_PARSER']:
	parser_objects, generated_files = SConscript(['cssparser/SConscript'], exports='env')
	objects.append(parser_objects)
else:
	generated_files = []

objects.append(SConscript(['color_names/SConscript'], exports='env'))

if env['TOOLCHAIN'] == 'msvc':
	local_env.Append(LIBS = ['glib-2.0', 'gtk-win32-2.0', 'gobject-2.0', 'gdk-win32-2.0', 'cairo', 'gdk_pixbuf-2.0', 'lua5.2', 'expat2.1', 'pango-1.0', 'pangocairo-1.0', 'intl'])

if local_env['BUILD_TARGET'] == 'win32':
	if not (env['TOOLCHAIN'] == 'msvc'):
		local_env.Append(LINKFLAGS = '-mwindows')
		local_env.Append(LIBS=['expat'])
	else:
		local_env.Append(LINKFLAGS = ['/SUBSYSTEM:WINDOWS', '/ENTRY:mainCRTStartup'], CPPDEFINES = ['XML_STATIC'])
	objects.append(SConscript(['winres/SConscript'], exports='env'))
elif local_env['BUILD_TARGET'] == 'linux2':
	local_env.Append(LIBS=['rt', 'expat'])

executable = local_env.Program(
	'gpick',
	source = [sources, objects])

Return('executable', 'generated_files')