Skip to content

Instantly share code, notes, and snippets.

@bvanderveen
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvanderveen/460e2aa6822755abe4ce to your computer and use it in GitHub Desktop.
Save bvanderveen/460e2aa6822755abe4ce to your computer and use it in GitHub Desktop.
How I complied libonion on OS X

How I compiled libonion on OS X

First, deps.

$ brew install libev

Edit CMakeLists.txt and set the following to false:

  • ONION_USE_PAM
  • ONION_USE_PTHREADS
  • ONION_USE_GC
  • ONION_EXAMPLES
  • ONION_USE_BINDINGS_CPP

I also commented out the tools and test build. So the bottom of the files looks like

#add_subdirectory(tools)

SET(OTEMPLATE otemplate)
SET(OPACK opack)

#if (${ONION_EXAMPLES})
#   add_subdirectory(examples)
#endif (${ONION_EXAMPLES})

#if (${ONION_USE_TESTS})
#   enable_testing()
#endif(${ONION_USE_TESTS})

#add_subdirectory(tests)

Then build in the cmake way:

$ mkdir build
$ cd build
$ cmake -DCMAKE_INCLUDE_PATH=/usr/local/Cellar/ -DCMAKE_INSTALL_PREFIX=/opt/onion ..
$ make
$ make install

Voilà!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment