# vine ### Preparing to Build (Linux, not Tizen) #### mDNSresponder DNS-SD is used for network service discovery. Download mDNresponder tarball in https://opensource.apple.com/tarballs/mDNSResponder/ and install it. The recommended version for Vine is 878.70.2. #### libwebsockets libwebsockets is used for providing client and server. Vine provides a prebuilt static library for libwebsockets by default. Please refer to [third-party/prebuilt](./third-party/prebuilt) directory for details. Otherwise, you can use build libwebsockets manually. Download libwebsockets tarball in https://github.com/warmcat/libwebsockets/releases and install it. The recommended version for Vine is 3.2.0 or later. **NOTE**: Vine uses poll() to handle events. So, You have to set LWS_WITH_EXTERNAL_POLL option. cmake . -DLWS_WITH_EXTERNAL_POLL=ON #### googlemock (Optional) You can build with unit tests. Unit test codes of vine have a dependency on googlemock. To build unit tests, you have to prepare the googlemock shared library. ### Build You have to tell the build system where libvine.so and vine.h is installed. Use -DLIB_DIR for libvine.so and -DINCLUDE_DIR for vine.h cmake . -DLIB_DIR=${LIB_DIR} -DINCLUDE_DIR=${INCLUDE_DIR} Use WITH_VINE_TEST to build with vine test programs. You have to tell the build system where the executables (vine-test) is installed. Use -DBIN_DIR for the executables. cmake . -DLIB_DIR=${LIB_DIR} -DINCLUDE_DIR=${INCLUDE_DIR} -DBIN_DIR=${BIN_DIR} -DWITH_VINE_TEST Use WITH_UNITTEST to build with unit tests. cmake . -DLIB_DIR=${LIB_DIR} -DINCLUDE_DIR=${INCLUDE_DIR} -DWITH_UNITTEST=ON