Skip to content

Commit

Permalink
Merge pull request #18 from DamonOehlman/linux
Browse files Browse the repository at this point in the history
Compilation for Linux.
  • Loading branch information
octalmage committed Mar 28, 2015
2 parents 1da2e14 + 36d1951 commit 5a3f462
Showing 1 changed file with 59 additions and 28 deletions.
87 changes: 59 additions & 28 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,30 +1,61 @@
{
"targets": [
{
"target_name": "robotjs",
"include_dirs" : [
"<!(node -e \"require('nan')\")"
],
"conditions": [
['OS == "mac"', {
'include_dirs': [
'System/Library/Frameworks/CoreFoundation.Framework/Headers',
'System/Library/Frameworks/Carbon.Framework/Headers',
'System/Library/Frameworks/ApplicationServices.framework/Headers',
'System/Library/Frameworks/OpenGL.framework/Headers',
],
"link_settings": {
"libraries": [
"-framework Carbon",
"-framework CoreFoundation",
"-framework ApplicationServices",
"-framework OpenGL"
]
}
}
]
],
"sources": ["src/robotjs.cc", "src/deadbeef_rand.c", "src/mouse.c", "src/keypress.c" , "src/keycode.c", "src/screen.c", "src/screengrab.c", "src/MMBitmap.c"]
}
]
'targets': [{
'target_name': 'robotjs',
'include_dirs': [
'<!(node -e \'require("nan")\')'
],

'cflags': [
'-Wall',
'-Wparentheses',
'-Winline',
'-Wbad-function-cast',
'-Wdisabled-optimization'
],

'conditions': [
['OS == "mac"', {
'include_dirs': [
'System/Library/Frameworks/CoreFoundation.Framework/Headers',
'System/Library/Frameworks/Carbon.Framework/Headers',
'System/Library/Frameworks/ApplicationServices.framework/Headers',
'System/Library/Frameworks/OpenGL.framework/Headers',
],
'link_settings': {
'libraries': [
'-framework Carbon',
'-framework CoreFoundation',
'-framework ApplicationServices',
'-framework OpenGL'
]
}
}],

['OS == "linux"', {
'link_settings': {
'libraries': [
'-lpng',
'-lz',
'-lX11',
'-lXtst'
]
},

'sources': [
'src/xdisplay.c'
]
}]
],

'sources': [
'src/robotjs.cc',
'src/deadbeef_rand.c',
'src/mouse.c',
'src/keypress.c',
'src/keycode.c',
'src/screen.c',
'src/screengrab.c',
'src/MMBitmap.c'
]
}]
}

0 comments on commit 5a3f462

Please sign in to comment.