Skip to content

Commit

Permalink
work in progress : compilation on mac #29
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Jul 4, 2017
1 parent 33bbe5c commit a9fcaf8
Show file tree
Hide file tree
Showing 6 changed files with 3,430 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ lib/binding
npm-debug*
occt-*

bower_components
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ script:
- >
if [[ -z $TRAVIS_ELECTRON_VERSION ]]; then
export LD_LIBRARY_PATH=`pwd`/occt-7.1.0./lib
export DYLD_LIBRARY_PATH=`pwd`/occt-7.1.0./lib
node ./
npm test
else
Expand Down
115 changes: 100 additions & 15 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,34 @@
"targets": [
{
"target_name": "occ",

"conditions": [
[
"OS=='linux'", {
"OS=='mac'",
{
"xcode_settings": {
"OTHER_CFLAGS" : [
"-O3",
"-frtti",
"-Wno-ignored-qualifiers",
"-Wno-unused-variable",
"-Wno-reorder",
"-Wno-extra"
],
"OTHER_LDFLAGS" : [

]
},
"library_dirs": [
"<!(pwd)/occt-7.1.0/lib",
],
"include_dirs": [
"<!(pwd)/occt-7.1.0/include/opencascade",
"<!(node -e \"require('nan')\")"
],},
],
[
"OS=='linux'",
{
"cflags!": [
"-fno-exceptions"
],
Expand Down Expand Up @@ -40,20 +64,18 @@
"include_dirs": [
"<!(pwd)/occt-7.1.0/include/opencascade",
"<!(node -e \"require('nan')\")"
],

}
],}
],
[
"OS=='win'", {
"OS=='win'",
{
"library_dirs": [
"./occt-7.1.0/win64/vc14/lib",
],
"include_dirs": [
"./occt-7.1.0/inc",
"<!(node -e \"require('nan')\")"
],
}
],}
]
],

Expand Down Expand Up @@ -112,7 +134,7 @@
"OCE_HAVE_CLIMITS"
],
"libraries+": [
"-Wl,-rpath=<(OOO)",
"-Wl",
"-lTKBO<(dbg)",
"-lTKBool<(dbg)",
"-lTKBRep<(dbg)",
Expand Down Expand Up @@ -165,8 +187,71 @@
"dependencies": [
"<(module_name)"
],
"conditions": [[
"OS=='linux'",
"conditions": [
["OS=='mac'",
{
"variables": {
"bin_folder": "./occt-7.1.0/lib"
},
"copies": [
{
"files": [
"<(bin_folder)/libTKBO.7.dylib",
"<(bin_folder)/libTKBool.7.dylib",
"<(bin_folder)/libTKBRep.7.dylib",
"<(bin_folder)/libTKernel.7.dylib",
"<(bin_folder)/libTKFeat.7.dylib",
"<(bin_folder)/libTKFillet.7.dylib",
"<(bin_folder)/libTKG2d.7.dylib",
"<(bin_folder)/libTKG3d.7.dylib",
"<(bin_folder)/libTKGeomAlgo.7.dylib",
"<(bin_folder)/libTKGeomBase.7.dylib",
"<(bin_folder)/libTKIGES.7.dylib",

"<(bin_folder)/libTKMath.7.dylib",
"<(bin_folder)/libTKMesh.7.dylib",
"<(bin_folder)/libTKOffset.7.dylib",
"<(bin_folder)/libTKPrim.7.dylib",
"<(bin_folder)/libTKShHealing.7.dylib",
"<(bin_folder)/libTKSTEP.7.dylib",
"<(bin_folder)/libTKSTEP209.7.dylib",
"<(bin_folder)/libTKSTEPAttr.7.dylib",
"<(bin_folder)/libTKSTEPBase.7.dylib",
"<(bin_folder)/libTKSTL.7.dylib",
"<(bin_folder)/libTKTopAlgo.7.dylib",
"<(bin_folder)/libTKXSBase.7.dylib",

"<(bin_folder)/libTKBO.7.1.0.dylib",
"<(bin_folder)/libTKBool.7.1.0.dylib",
"<(bin_folder)/libTKBRep.7.1.0.dylib",
"<(bin_folder)/libTKernel.7.1.0.dylib",
"<(bin_folder)/libTKFeat.7.1.0.dylib",
"<(bin_folder)/libTKFillet.7.1.0.dylib",
"<(bin_folder)/libTKG2d.7.1.0.dylib",
"<(bin_folder)/libTKG3d.7.1.0.dylib",
"<(bin_folder)/libTKGeomAlgo.7.1.0.dylib",
"<(bin_folder)/libTKGeomBase.7.1.0.dylib",
"<(bin_folder)/libTKIGES.7.1.0.dylib",

"<(bin_folder)/libTKMath.7.1.0.dylib",
"<(bin_folder)/libTKMesh.7.1.0.dylib",
"<(bin_folder)/libTKOffset.7.1.0.dylib",
"<(bin_folder)/libTKPrim.7.1.0.dylib",
"<(bin_folder)/libTKShHealing.7.1.0.dylib",
"<(bin_folder)/libTKSTEP.7.1.0.dylib",
"<(bin_folder)/libTKSTEP209.7.1.0.dylib",
"<(bin_folder)/libTKSTEPAttr.7.1.0.dylib",
"<(bin_folder)/libTKSTEPBase.7.1.0.dylib",
"<(bin_folder)/libTKSTL.7.1.0.dylib",
"<(bin_folder)/libTKTopAlgo.7.1.0.dylib",
"<(bin_folder)/libTKXSBase.7.1.0.dylib",


] ,
"destination": "<(module_path)"
}]
}],
["OS=='linux'",
{
"variables": {
"bin_folder": "./occt-7.1.0/lib"
Expand Down Expand Up @@ -222,8 +307,8 @@
] ,
"destination": "<(module_path)"
}]
}],[
"OS=='win'",
}],
["OS=='win'",
{
"variables": {
"bin_folder": 'occt-7.1.0/win64/vc14/bin'
Expand Down Expand Up @@ -309,8 +394,8 @@
"destination": "<(module_path)"
}
]
}
]]
}]
]
}
]
}
Loading

0 comments on commit a9fcaf8

Please sign in to comment.