-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Move CMake build instructions out of README
- Loading branch information
Showing
2 changed files
with
35 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Setup | ||
|
||
Ubuntu 20.04 is used for testing. Other Linux distributions may or may not work. Adjust the commands below accordingly. | ||
|
||
## Install the package prerequisites. | ||
|
||
``` | ||
sudo apt install -y libusb-1.0-0-dev libclang-dev llvm-dev \ | ||
ninja-build zlib1g-dev python3-pip cmake \ | ||
libavformat-dev libavutil-dev pcregrep patchelf | ||
pip install lit | ||
rustup install nightly | ||
``` | ||
|
||
## Configure with CMake | ||
|
||
*Note*: Adjust paths to your version of Clang/LLVM | ||
|
||
``` | ||
mkdir build && pushd build | ||
cmake .. \ | ||
-DClang_DIR=/usr/lib/cmake/clang-12 \ | ||
-DLLVM_DIR=/usr/lib/llvm-12/cmake \ | ||
-DLLVM_EXTERNAL_LIT=`which lit` \ | ||
-G Ninja | ||
``` | ||
|
||
## Build and run the tests | ||
|
||
*Note*: Pass `-v` to ninja to see build commands and output from failing tests. | ||
|
||
``` | ||
ninja check-ia2 | ||
``` |