Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #28 from fardjad/master

Added Node >= v0.9.0 and node-gyp support
  • Loading branch information...
commit 1575184a057b0378ae7ca501614e7f941c4ad411 2 parents d66d4e3 + 2721066
@fjakobs fjakobs authored
Showing with 53 additions and 1 deletion.
  1. +47 −0 binding.gyp
  2. +2 −0  hosts/node-o3/sh_node.cc
  3. +4 −1 package.json
View
47 binding.gyp
@@ -0,0 +1,47 @@
+{
+ "targets": [
+ {
+ "target_name": "o3",
+ "include_dirs": [
+ "include",
+ "hosts",
+ "modules",
+ "deps"
+ ],
+ "sources": [
+ "hosts/node-o3/sh_node.cc",
+ "hosts/node-o3/sh_node_libs.cc"
+ ],
+ "cflags_cc!": ["-fno-exceptions"],
+ "conditions": [
+ ["OS==\"win\"", {
+ # TODO: Add Windows libraries
+ }, {
+ "libraries": [
+ "<!@(xml2-config --libs)"
+ ]
+ }],
+ ["OS==\"mac\"", {
+ "xcode_settings": {
+ "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
+ "OTHER_CFLAGS": [
+ "<!@(xml2-config --cflags)",
+ "-O3",
+ "-msse2",
+ "-ffast-math",
+ "-fexceptions"
+ ]
+ }
+ }, {
+ "cflags": [
+ "<!@(xml2-config --cflags)",
+ "-O3",
+ "-msse2",
+ "-ffast-math",
+ "-fexceptions"
+ ]
+ }]
+ ]
+ }
+ ]
+}
View
2  hosts/node-o3/sh_node.cc
@@ -19,6 +19,7 @@
#define O3_NODE
//#define O3_V8_GLUE
#include <v8.h>
+#include <node.h>
#include <o3.h>
#include <js/js.h>
//#include <buffer/buffer.h>
@@ -61,3 +62,4 @@ init (Handle<Object> target)
}
+NODE_MODULE(o3, init)
View
5 package.json
@@ -1,5 +1,8 @@
{
"name": "o3-xml",
"version": "0.1.0",
- "private": true
+ "private": true,
+ "engines" : {
+ "node" : ">= 0.6.0"
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.