gyp: qualify library variable
Use prefixed variable name for better control over dependencies.
This commit is contained in:
parent
280469f4fe
commit
7301d21e46
@ -3,7 +3,7 @@
|
|||||||
'visibility%': 'hidden', # V8's visibility setting
|
'visibility%': 'hidden', # V8's visibility setting
|
||||||
'target_arch%': 'ia32', # set v8's target architecture
|
'target_arch%': 'ia32', # set v8's target architecture
|
||||||
'host_arch%': 'ia32', # set v8's host architecture
|
'host_arch%': 'ia32', # set v8's host architecture
|
||||||
'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
|
'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
|
||||||
'component%': 'static_library', # NB. these names match with what V8 expects
|
'component%': 'static_library', # NB. these names match with what V8 expects
|
||||||
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
|
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
|
||||||
'gcc_version%': 'unknown',
|
'gcc_version%': 'unknown',
|
||||||
@ -19,7 +19,7 @@
|
|||||||
'msvs_settings': {
|
'msvs_settings': {
|
||||||
'VCCLCompilerTool': {
|
'VCCLCompilerTool': {
|
||||||
'target_conditions': [
|
'target_conditions': [
|
||||||
['library=="static_library"', {
|
['uv_library=="static_library"', {
|
||||||
'RuntimeLibrary': 1, # static debug
|
'RuntimeLibrary': 1, # static debug
|
||||||
}, {
|
}, {
|
||||||
'RuntimeLibrary': 3, # DLL debug
|
'RuntimeLibrary': 3, # DLL debug
|
||||||
@ -56,7 +56,7 @@
|
|||||||
'msvs_settings': {
|
'msvs_settings': {
|
||||||
'VCCLCompilerTool': {
|
'VCCLCompilerTool': {
|
||||||
'target_conditions': [
|
'target_conditions': [
|
||||||
['library=="static_library"', {
|
['uv_library=="static_library"', {
|
||||||
'RuntimeLibrary': 0, # static release
|
'RuntimeLibrary': 0, # static release
|
||||||
}, {
|
}, {
|
||||||
'RuntimeLibrary': 2, # debug release
|
'RuntimeLibrary': 2, # debug release
|
||||||
|
|||||||
@ -88,8 +88,8 @@ if __name__ == '__main__':
|
|||||||
if not any(a.startswith('-Dtarget_arch=') for a in args):
|
if not any(a.startswith('-Dtarget_arch=') for a in args):
|
||||||
args.append('-Dtarget_arch=%s' % host_arch())
|
args.append('-Dtarget_arch=%s' % host_arch())
|
||||||
|
|
||||||
if not any(a.startswith('-Dlibrary=') for a in args):
|
if not any(a.startswith('-Duv_library=') for a in args):
|
||||||
args.append('-Dlibrary=static_library')
|
args.append('-Duv_library=static_library')
|
||||||
|
|
||||||
if not any(a.startswith('-Dcomponent=') for a in args):
|
if not any(a.startswith('-Dcomponent=') for a in args):
|
||||||
args.append('-Dcomponent=static_library')
|
args.append('-Dcomponent=static_library')
|
||||||
|
|||||||
@ -37,7 +37,7 @@ $(BUILDDIR)/$(BUILDTYPE)/s5-proxy: $(BUILDDIR)/Makefile $(SOURCES)
|
|||||||
|
|
||||||
$(BUILDDIR)/Makefile: ../../common.gypi build.gyp
|
$(BUILDDIR)/Makefile: ../../common.gypi build.gyp
|
||||||
$(GYP) \
|
$(GYP) \
|
||||||
-Dlibrary=static_library \
|
-Duv_library=static_library \
|
||||||
-Goutput_dir=. \
|
-Goutput_dir=. \
|
||||||
-I../../common.gypi \
|
-I../../common.gypi \
|
||||||
-f make \
|
-f make \
|
||||||
|
|||||||
8
uv.gyp
8
uv.gyp
@ -31,7 +31,7 @@
|
|||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'libuv',
|
'target_name': 'libuv',
|
||||||
'type': '<(library)',
|
'type': '<(uv_library)',
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'include',
|
'include',
|
||||||
'src/',
|
'src/',
|
||||||
@ -167,10 +167,10 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['library=="shared_library"', {
|
['uv_library=="shared_library"', {
|
||||||
'cflags': [ '-fPIC' ],
|
'cflags': [ '-fPIC' ],
|
||||||
}],
|
}],
|
||||||
['library=="shared_library" and OS!="mac"', {
|
['uv_library=="shared_library" and OS!="mac"', {
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
# Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR
|
# Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR
|
||||||
# in src/version.c
|
# in src/version.c
|
||||||
@ -265,7 +265,7 @@
|
|||||||
[ 'OS in "mac freebsd dragonflybsd openbsd netbsd".split()', {
|
[ 'OS in "mac freebsd dragonflybsd openbsd netbsd".split()', {
|
||||||
'sources': [ 'src/unix/kqueue.c' ],
|
'sources': [ 'src/unix/kqueue.c' ],
|
||||||
}],
|
}],
|
||||||
['library=="shared_library"', {
|
['uv_library=="shared_library"', {
|
||||||
'defines': [ 'BUILDING_UV_SHARED=1' ]
|
'defines': [ 'BUILDING_UV_SHARED=1' ]
|
||||||
}],
|
}],
|
||||||
# FIXME(bnoordhuis or tjfontaine) Unify this, it's extremely ugly.
|
# FIXME(bnoordhuis or tjfontaine) Unify this, it's extremely ugly.
|
||||||
|
|||||||
@ -99,7 +99,7 @@ exit /b 1
|
|||||||
|
|
||||||
:have_gyp
|
:have_gyp
|
||||||
if not defined PYTHON set PYTHON="python"
|
if not defined PYTHON set PYTHON="python"
|
||||||
%PYTHON% gyp_uv.py -Dtarget_arch=%target_arch% -Dlibrary=%library%
|
%PYTHON% gyp_uv.py -Dtarget_arch=%target_arch% -Duv_library=%library%
|
||||||
if errorlevel 1 goto create-msvs-files-failed
|
if errorlevel 1 goto create-msvs-files-failed
|
||||||
if not exist uv.sln goto create-msvs-files-failed
|
if not exist uv.sln goto create-msvs-files-failed
|
||||||
echo Project files generated.
|
echo Project files generated.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user