Skip to content

Commit 4bd79bc

Browse files
committed
docs: update documentation to show how to use CMake
Update the documentation to reference the CMake build infrastructure rather than autotools for the non-Darwin targets. Once the Darwin build is switched over, the entire build process can be described in a single block.
1 parent 9ec74ed commit 4bd79bc

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

Diff for: INSTALL.md

+21-9
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,21 @@ libdispatch for /usr/lib/system on OS X El Capitan:
129129
Typical configuration line for FreeBSD 8.x and 9.x to build libdispatch with
130130
clang and blocks support:
131131
132-
sh autogen.sh
133-
./configure CC=clang --with-blocks-runtime=/usr/local/lib
134-
make check
132+
```
133+
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DWITH_BLOCKS_RUNTIME=/usr/local/lib <path-to-source>
134+
ninja
135+
ninja test
136+
```
137+
138+
### Building for android
139+
140+
Note that this assumes that you are building on Linux. It requires that you
141+
have the android NDK available. It has been tested against API Level 21.
142+
143+
```
144+
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_NDK=<path to android NDK> <path-to-source>
145+
ninja
146+
```
135147
136148
### Building and installing for Linux
137149
@@ -140,19 +152,19 @@ on Ubuntu; currently supported versions are 14.04, 15.10 and 16.04.
140152
141153
1. The first thing to do is install required packages:
142154
143-
`sudo apt-get install autoconf libtool pkg-config clang systemtap-sdt-dev libbsd-dev linux-libc-dev`
155+
`sudo apt-get install cmake ninja-build clang systemtap-sdt-dev libbsd-dev linux-libc-dev`
144156
145157
Note: compiling libdispatch requires clang 3.8 or better and
146158
the gold linker. If the default clang on your Ubuntu version is
147159
too old, see http://apt.llvm.org/ to install a newer version.
148160
On older Ubuntu releases, you may need to install binutils-gold
149161
to get the gold linker.
150162
151-
2. Build (as in the general instructions above)
163+
2. Build
152164
153165
```
154-
sh autogen.sh
155-
./configure
156-
make
157-
make install
166+
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ <path-to-source>
167+
ninja
168+
ninja install
158169
```
170+

0 commit comments

Comments
 (0)