Public feed #528862

Mine

public text v1 · immutable
Raw Edit
·published 2007-06-01 18:26 UTC
rendered paste body

# build the library
shared = env.SharedLibrary(
    spawn = scons.spawn.execute,
    target = os.path.join('#src', library),
    source = config.objects,
    )

AddPostAction(['#src'+os.sep+scons.swig.swig_interface_file], scons.swig.AppendToFile )
action = AddPostAction(shared, env['MT_TOOL']+' -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2')

Default(shared)

#--------------------------------------------------------------------------------
# Install Rules
#--------------------------------------------------------------------------------


installs = []
language, version = config['language']

#--------------------------------------------------------------------------------
# Install the Python module
#--------------------------------------------------------------------------------
if language == 'python':
    py_dir = os.path.join('src', 'python')
    wslib_dir = os.path.join('python', 'wslib')

    wslib_files = glob.glob(wslib_dir + os.sep + '*.py')
    wslib_files = ["#src"+os.sep+x for x in wslib_files]
    xws_files = [
        os.path.join( '#'+py_dir, 'wslib.pth' ),
        os.path.join( '#src/swig', 'xws.py' ),
    ]


    installs = [
        env.Install('#dist/%s/wslib' % config.name, wslib_files),
        env.Install('#dist/%s' % config.name, xws_files),
        ]

#--------------------------------------------------------------------------------
# Install the Perl module
#--------------------------------------------------------------------------------
if language == 'perl':
    perl_dir = os.path.join('#src', 'perl')
    files = [
        os.path.join('#src', 'perl', 'wslib.pm'),
        os.path.join('#src/swig', 'xws.pm'),
        ]

    installs = env.Install('#dist/%s' % config.name, files)

#--------------------------------------------------------------------------------
# Install the libraries
#--------------------------------------------------------------------------------
# Install the library into the dist directory
bname = os.path.join(env['SHLIBPREFIX'] + env['WSLIB_LIBRARY_NAME'])

wslib_library = env.InstallAs('#dist/%s/%s' % (config.name, library), os.path.join('#src', library))
installs.append( wslib_library )
installs.append( env.Install('#dist/%s' % config.name, bname+".pdb") )
installs.append( env.Install('#dist/%s' % config.name, bname+".map") )

# Install open ssl libraries in to the dist directory
openssl_path = config['library_deps']['openssl']
ssl_libraries = env.Install(
    '#dist/%s' % config.name, [openssl_path+os.sep+'libeay32.dll', openssl_path+os.sep+'ssleay32.dll'])
installs.append( ssl_libraries )

env.Alias('install', installs)