import os
import sys

env = DefaultEnvironment()

openssl_root = os.getenv('OPENSSL_ROOT')
if openssl_root is None:
    print('OPENSSL_ROOT environment variable is not set')
    sys.exit(1)

ssleay_dll = openssl_root + '/bin/ssleay32.dll'
libeay_dll = openssl_root + '/bin/libeay32.dll'

env.Install('#build/bin', [ssleay_dll, libeay_dll])
env.InstallAs('#build/lib/ssl.lib', openssl_root + '/lib/ssleay32.lib')
env.InstallAs('#build/lib/crypto.lib', openssl_root + '/lib/libeay32.lib')
