-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSConscript
40 lines (30 loc) · 1.22 KB
/
SConscript
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
Import( 'project', 'libs' )
### Define global flags for the whole project
# depending on the platform and compilation mode
xml2epubFlags = {
'LIBPATH': [project.inOutputLib()],
'CCFLAGS': project.CC['warning3'],
'CPPDEFINES':[],
}
if project.env['mode'] == 'production' :
# In 'production' mode set a flag XML2EPUB_PRODUCTION
xml2epubFlags['CPPDEFINES'].append( 'XML2EPUB_PRODUCTION' )
# If your compiler as a visibility flag, hide all plugin internal things
if 'visibilityhidden' in project.CC:
xml2epubFlags['SHCCFLAGS'] = [project.CC['visibilityhidden']]
# If your compiler as a flag to mark undefined flags as error in shared libraries
if 'sharedNoUndefined' in project.CC:
xml2epubFlags['SHLINKFLAGS'] = [project.CC['sharedNoUndefined']]
# Creates a dependency target without associated code or compiled object,
# but only associated with compilation flags
xml2epub = project.ObjectLibrary( 'xml2epubDefault', envFlags=xml2epubFlags )
# Set this object library as a default library for all targets
project.commonLibs.append( xml2epub )
### Load all SConscript files (in the correct order)
SConscript(
project.scanFiles( [
'libraries/common',
'libraries/converter',
'apps',
], accept=['SConscript'] )
)