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à!