From b79590e490a364d13ca2d96ccccf8d5e5145af22 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Mon, 22 Oct 2018 15:28:09 -0400 Subject: document how to build with cmake, and how to build the Python bindings --- README.rst | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 767bf7a..b05de38 100644 --- a/README.rst +++ b/README.rst @@ -13,13 +13,30 @@ ratchet, as specified in ``_. Building -------- -To build olm as a shared library run: +To build olm as a shared library run either: + +.. code:: bash + + cmake . -Bbuild + cmake --build build + +or: .. code:: bash make -To run the tests run: +Using cmake is the preferred method for building the shared library; the +Makefile may be removed in the future. + +To run the tests when using cmake, run: + +.. code:: bash + + cd build/tests + ctest . + +To run the tests when using make, run: .. code:: bash @@ -49,12 +66,39 @@ To build the Xcode workspace for Objective-C bindings, run: pod install open OLMKit.xcworkspace -To build olm as a static library (which still needs libstdc++ dynamically) run: +To build the Python bindings, first build olm as a shared library as above, and +then run: + +.. code:: bash + + cd python + make + +to make both the Python 2 and Python 3 bindings. To make only one version, use +``make olm-python2`` or ``make olm-python3`` instead of just ``make``. + +To build olm as a static library (which still needs libstdc++ dynamically) run +either: + +.. code:: bash + + cmake . -Bbuild -DBUILD_SHARED_LIBS=NO + cmake --build build + +or .. code:: bash make static +The library can also be used as a dependency with CMake using: + +.. code:: cmake + + find_package(Olm::Olm REQUIRED) + target_link_libraries(my_exe Olm::Olm) + + Release process --------------- -- cgit v1.2.3