Skip to content

Commit

Permalink
add gyp files for building without messing with visual studio UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Jan 6, 2012
1 parent 78f2eec commit e6b1f79
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 1 deletion.
69 changes: 69 additions & 0 deletions build.gyp
@@ -0,0 +1,69 @@

{
'variables': {
'node_module_sources': [
"src/database.cc",
"src/node_sqlite3.cc",
"src/statement.cc",
"deps/sqlite3/sqlite3.c"
],
'node_root': '/usr/local',
'node_root_win': 'c:\\node',
},
'targets': [
{
'target_name': 'node_sqlite3',
'product_name': 'node_sqlite3',
'type': 'loadable_module',
'product_prefix': '',
'product_extension':'node',
'sources': [
'<@(node_module_sources)',
],
'defines': [
'PLATFORM="<(OS)"',
'_LARGEFILE_SOURCE',
'_FILE_OFFSET_BITS=64',
],
'conditions': [
[ 'OS=="mac"', {
'libraries': [
'-undefined dynamic_lookup'
],
'include_dirs': [
'src/',
'<@(node_root)/include/node',
'<@(node_root)/include',
],
}],
[ 'OS=="win"', {
'defines': [
'PLATFORM="win32"',
'_LARGEFILE_SOURCE',
'_FILE_OFFSET_BITS=64',
'_WINDOWS',
'BUILDING_NODE_EXTENSION'
],
'libraries': [
'node.lib',
],
'include_dirs': [
'deps\\sqlite3\\',
'<@(node_root_win)\\deps\\v8\\include',
'<@(node_root_win)\\src',
'<@(node_root_win)\\deps\\uv\\include',
],
'msvs_settings': {
'VCLinkerTool': {
'AdditionalLibraryDirectories': [
'<@(node_root_win)\\Release\\lib',
'<@(node_root_win)\\Release',
],
},
},
},
], # windows
] # condition
}, # targets
],
}
2 changes: 1 addition & 1 deletion node-sqlite3.sln
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "node_sqlite3", "node-sqlite3.vcxproj", "{2018883C-427E-4E54-B1CB-9A232C3B2844}"
EndProject
Global
Expand Down
Binary file modified node-sqlite3.suo
Binary file not shown.
8 changes: 8 additions & 0 deletions vcbuild.bat
@@ -0,0 +1,8 @@
del build.sln
python gyp/gyp build.gyp --depth=. -f msvs -G msvs_version=2010
msbuild build.sln
copy Default\\node_sqlite3.node lib\\node_sqlite3.node
rem test!
rem set NODE_PATH=lib
rem node node_modules\expresso\bin\expresso
rem node -e "console.log(require('eio'))"

0 comments on commit e6b1f79

Please sign in to comment.