aewallin / opencamlib

open source computer aided manufacturing algorithms library
http://www.anderswallin.net/CAM
GNU Lesser General Public License v2.1
407 stars 137 forks source link

MacOS travis build #37

Closed aewallin closed 5 years ago

aewallin commented 5 years ago

MacOS build should be possible on travis.

Could some MacOS user contribute a PR with the required travis.yml changes?

vespakoen commented 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!

vespakoen commented 5 years ago

I have got the OSX build compiling on travis as well, but with hardcoded paths, and I broke the linux build.

Some notes:

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()
aewallin commented 5 years ago

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.

vespakoen commented 5 years ago

I tried it on 18.10 now as well by the way (installed xubuntu again after some years)

aewallin commented 5 years ago

closing for now - seems to work on travis.