recommend using cmake more strongly
This commit is contained in:
parent
201f139523
commit
0e7c0a5613
2 changed files with 38 additions and 26 deletions
6
Makefile
6
Makefile
|
@ -186,6 +186,12 @@ lib: $(RELEASE_TARGET)
|
||||||
.PHONY: lib
|
.PHONY: lib
|
||||||
|
|
||||||
$(RELEASE_TARGET): $(RELEASE_OBJECTS)
|
$(RELEASE_TARGET): $(RELEASE_OBJECTS)
|
||||||
|
@echo
|
||||||
|
@echo '****************************************************************************'
|
||||||
|
@echo '* WARNING: Building olm with make is deprecated. Please use cmake instead. *'
|
||||||
|
@echo '****************************************************************************'
|
||||||
|
@echo
|
||||||
|
|
||||||
$(CXX) $(LDFLAGS) --shared -fPIC \
|
$(CXX) $(LDFLAGS) --shared -fPIC \
|
||||||
$(OLM_LDFLAGS) \
|
$(OLM_LDFLAGS) \
|
||||||
$(OUTPUT_OPTION) $(RELEASE_OBJECTS)
|
$(OUTPUT_OPTION) $(RELEASE_OBJECTS)
|
||||||
|
|
58
README.md
58
README.md
|
@ -11,35 +11,37 @@ ratchet, as specified in [docs/megolm.md](docs/megolm.md).
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
To build olm as a shared library run either:
|
To build olm as a shared library run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake . -Bbuild
|
cmake . -Bbuild
|
||||||
cmake --build build
|
cmake --build build
|
||||||
```
|
```
|
||||||
|
|
||||||
or:
|
To run the tests, run:
|
||||||
|
|
||||||
```bash
|
|
||||||
make
|
|
||||||
```
|
|
||||||
|
|
||||||
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:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd build/tests
|
cd build/tests
|
||||||
ctest .
|
ctest .
|
||||||
```
|
```
|
||||||
To run the tests when using make, run:
|
|
||||||
|
To build olm as a static library (which still needs libstdc++ dynamically) run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make test
|
cmake . -Bbuild -DBUILD_SHARED_LIBS=NO
|
||||||
|
cmake --build build
|
||||||
```
|
```
|
||||||
|
|
||||||
To build the JavaScript bindings, install emscripten from http://kripken.github.io/emscripten-site/ and then run:
|
The library can also be used as a dependency with CMake using:
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
find_package(Olm::Olm REQUIRED)
|
||||||
|
target_link_libraries(my_exe Olm::Olm)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Bindings
|
||||||
|
|
||||||
|
To build the JavaScript bindings, install emscripten from https://emscripten.org/ and then run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make js
|
make js
|
||||||
|
@ -74,27 +76,31 @@ make
|
||||||
to make both the Python 2 and Python 3 bindings. To make only one version, use
|
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``.
|
``make olm-python2`` or ``make olm-python3`` instead of just ``make``.
|
||||||
|
|
||||||
To build olm as a static library (which still needs libstdc++ dynamically) run
|
### Using make instead of cmake
|
||||||
either:
|
|
||||||
|
**WARNING:** Using cmake is the preferred method for building the olm library;
|
||||||
|
the Makefile may be removed in the future or have functionality removed. In
|
||||||
|
addition, the Makefile may make certain assumptions about your system and is
|
||||||
|
not as well tested.
|
||||||
|
|
||||||
|
To build olm as a dynamic library, run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake . -Bbuild -DBUILD_SHARED_LIBS=NO
|
make
|
||||||
cmake --build build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
To run the tests, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make test
|
||||||
|
```
|
||||||
|
|
||||||
|
To build olm as a static library, run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make static
|
make static
|
||||||
```
|
```
|
||||||
|
|
||||||
The library can also be used as a dependency with CMake using:
|
|
||||||
|
|
||||||
```cmake
|
|
||||||
find_package(Olm::Olm REQUIRED)
|
|
||||||
target_link_libraries(my_exe Olm::Olm)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Bindings
|
## Bindings
|
||||||
|
|
||||||
libolm can be used in different environments using bindings. In addition to the
|
libolm can be used in different environments using bindings. In addition to the
|
||||||
|
|
Loading…
Reference in a new issue