File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 'targets' : [{
33 'target_name' : 'node-tensorflow' ,
44 'sources' : ['src/api.cc' ],
5- "include_dirs" : [
5+
6+ 'libraries' : [
7+ "<!@(pkg-config --libs protobuf)"
8+ ],
9+
10+ 'include_dirs' : [
611 # All c++ dependencies goes here
712 "src/includes" ,
813
1318 # Include NAN
1419 "<!(node -e \" require('nan')\" )"
1520 ],
21+
1622 "conditions" : [
1723 [ "OS==\" mac\" " , {
1824 "xcode_settings" : {
1925 "OTHER_CFLAGS" : [
2026 "-mmacosx-version-min=10.7" ,
2127 "-std=c++11" ,
22- "-stdlib=libc++"
28+ "-stdlib=libc++" ,
29+ "<!@(pkg-config --cflags opencv)" ,
2330 ],
2431 "GCC_ENABLE_CPP_RTTI" : "YES" ,
2532 "GCC_ENABLE_CPP_EXCEPTIONS" : "YES"
2633 }
2734 }]
2835 ],
29- "cflags!" : [ "-fno-exceptions" ]
36+ 'cflags' : [
37+ "<!@(pkg-config --cflags protobuf)"
38+ ],
39+ 'cflags!' : [
40+ "-fno-exceptions"
41+ ]
3042 }]
3143}
Original file line number Diff line number Diff line change @@ -258,10 +258,15 @@ bazel build //tensorflow/core
258258# Compile photobuf
259259cd " google/protobuf"
260260echo " "
261- echo " = Compiling Google's protobuf"
262- ./autogen.sh
263- make
264- bazel build
261+ echo " = Installing Google's protobuf"
262+ if ! pkg-config protobuf --exists; then
263+ ./autogen.sh
264+ make
265+ make check
266+ make install
267+ else
268+ echo " == Skipped. Already installed."
269+ fi
265270
266271#
267272# Copy essential files to ./src/includes
You can’t perform that action at this time.
0 commit comments