diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2018-10-22 15:28:09 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2018-10-23 12:24:49 -0400 |
commit | b79590e490a364d13ca2d96ccccf8d5e5145af22 (patch) | |
tree | df6d32b94eb9fb78e89256c8ebad0a575c900794 | |
parent | 3ebb3b69defb2ee7cd322f51dc28fe662ba414cd (diff) |
document how to build with cmake, and how to build the Python bindings
-rw-r--r-- | README.rst | 50 |
1 files changed, 47 insertions, 3 deletions
@@ -13,13 +13,30 @@ ratchet, as specified in `<docs/megolm.rst>`_. 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 --------------- |