Closed aewallin closed 5 years ago
Hi!
I want to take a stab at this, I have got it working on my own machine, but with some "hacks" / hardcoded paths. But it's a start ;)
I am also working on G-Code producing tools in JavaScript (https://github.com/makercam) They really are just "toys" at the moment, but they work for what I want to do.
I want to experiment with opencamlib and provide node.js bindings for it.
I have forked your repository and added it to travis.ci, you can follow along with the progress here:
https://github.com/vespakoen/opencamlib https://travis-ci.com/vespakoen/opencamlib
Thanks for your awesome repository, blog and efforts to make open source cnc'ing better!
I have got the OSX build compiling on travis as well, but with hardcoded paths, and I broke the linux build.
Some notes:
ocl.revision()
which fail, I cannot find an implementation of thisset(OpenMP_CXX_FLAGS "-fopenmp=libomp")
, will have to check this again what is going wrong there-std=c++11
compiler flag-lboost_python -lboost_system
didn't work, I had to hardcode the paths (will have to find a better way to do this)find_package(Boost COMPONENTS python)
does not work on OSX, it needs a version postfix, for example find_package(Boost COMPONENTS python27)
The last issue can be worked around with something like this code I found in some other package:
find_package(PythonInterp)
if (PYTHONINTERP_FOUND)
if (UNIX AND NOT APPLE)
if (PYTHON_VERSION_MAJOR EQUAL 3)
find_package(Boost COMPONENTS python${PYTHON_VERSION_SUFFIX})
find_package(PythonInterp 3)
find_package(PythonLibs 3 REQUIRED)
else()
find_package(Boost COMPONENTS python)
find_package(PythonInterp)
find_package(PythonLibs REQUIRED)
endif()
else()
if (PYTHON_VERSION_MAJOR EQUAL 3)
find_package(Boost COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
find_package(PythonInterp 3)
find_package(PythonLibs 3 REQUIRED)
else()
find_package(Boost COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
find_package(PythonInterp)
find_package(PythonLibs REQUIRED)
endif()
endif()
else()
message("Python not found")
endif()
Nice work! I can't test on Mac OS - so I'll just rely on other people for that..
Build is OK for me on Ubuntu LTS16.04 - I can try 18.04LTS later.
I tried it on 18.10 now as well by the way (installed xubuntu again after some years)
closing for now - seems to work on travis.
MacOS build should be possible on travis.
Could some MacOS user contribute a PR with the required travis.yml changes?