Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 37 additions & 15 deletions addon.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
'node_engine_include_dir%': 'deps/v8/include',
'node_host_binary%': 'node',
'node_with_ltcg%': 'true',
'os_type%': '<!(node -p "require(\'os\').type()")',
},
'target_defaults': {
'type': 'loadable_module',
Expand Down Expand Up @@ -165,23 +166,44 @@
]
}
}
}],
# Detect MSYS2/MinGW vs MSVC based on os.type()
[ 'os_type.startswith("MINGW")', {
# MSYS2/MinGW/GCC libraries
'libraries': [
'-lkernel32',
'-luser32',
'-lgdi32',
'-lwinspool',
'-lcomdlg32',
'-ladvapi32',
'-lshell32',
'-lole32',
'-loleaut32',
'-luuid',
'-lodbc32',
'-lDelayImp',
'-lnode',
],
}, {
# MSVC libraries (Windows_NT)
'libraries': [
'-lkernel32.lib',
'-luser32.lib',
'-lgdi32.lib',
'-lwinspool.lib',
'-lcomdlg32.lib',
'-ladvapi32.lib',
'-lshell32.lib',
'-lole32.lib',
'-loleaut32.lib',
'-luuid.lib',
'-lodbc32.lib',
'-ldelayimp.lib',
'-l"<(node_lib_file)"'
],
}]
],
'libraries': [
'-lkernel32.lib',
'-luser32.lib',
'-lgdi32.lib',
'-lwinspool.lib',
'-lcomdlg32.lib',
'-ladvapi32.lib',
'-lshell32.lib',
'-lole32.lib',
'-loleaut32.lib',
'-luuid.lib',
'-lodbc32.lib',
'-ldelayimp.lib',
'-l"<(node_lib_file)"'
],
'msvs_disabled_warnings': [
# warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
# needs to have dll-interface to be used by
Expand Down
Loading
Loading