-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: Update build instructions for release
- Loading branch information
Showing
1 changed file
with
38 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,71 @@ | ||
# Building | ||
|
||
uvgRTP is built using [CMake](https://cmake.org) and a 64-bit compiler is required for compilation. uvgRTP can be built on both Linux and Windows. | ||
uvgRTP RTP library uses CMake to generate build files and you must use 64-bit compiler to build uvgRTP. uvgRTP supports building on both Linux and Windows. | ||
|
||
Alternatively, uvgRTP can be built with QtCreator (see uvgRTP.pro). | ||
Alternatively, uvgRTP can also be built with QtCreator for Qt applications (see uvgRTP.pro). | ||
|
||
NOTE: There has been some issues with a specific version of Visual Studio 2017 compilation on Windows due to Creators Updates as target platform x64 may not be available. | ||
Please use some other way of compiling uvgRTP, such as QtCreator, is you face this issue. | ||
NOTE: There are with a specific version of Visual Studio 2017 compilation due to Creators Updates resulting in target platform x64 not being available. Please use another version of Visual Studio or some other way of compiling uvgRTP if you face this issue. | ||
|
||
## Dependencies | ||
|
||
uvgRTP uses [Crypto++](https://www.cryptopp.com/) for SRTP/ZRTP support. It is possible to use uvgRTP without Crypto++. | ||
uvgRTP uses [Crypto++](https://www.cryptopp.com/) for SRTP/ZRTP support. It is also possible to use uvgRTP without Crypto++. uvgRTP uses [*__has_include*](https://en.cppreference.com/w/cpp/preprocessor/include) to detect if Crypto++ is present in the file system. Thus, SRTP/ZRTP is automatically enabled/disabled based whether it's found in the file system. | ||
|
||
uvgRTP uses [*__has_include*](https://en.cppreference.com/w/cpp/preprocessor/include) to detect if Crypto++ is present in the file system. Thus, SRTP/ZRTP is automatically enabled/disabled based whether it's found in the file system requiring no extra work from the user. | ||
|
||
If, for some reason, you have Crypto++ available but would like to disable SRTP/ZRTP anyway, plase compile uvgRTP with `-DDISABLE_CRYPTO=1`, see the example below for more details. | ||
If for some reason you have Crypto++ available but would like to disable SRTP/ZRTP anyway, please compile uvgRTP with `-DDISABLE_CRYPTO=1`. See the instructions below for more details. | ||
|
||
## CMake Build Instructions | ||
|
||
Install CMake, on Windows make sure it is found in PATH. On Windows you can use Git Bash or other console to the run commands. | ||
Install [CMake](https://cmake.org) and on Windows make sure it is found in PATH. You can use Git Bash or other command terminals to the run the CMake commands on Windows. | ||
|
||
### Generating build files | ||
|
||
Create build folder | ||
First, create a folder for build scripts: | ||
|
||
`mkdir build && cd build` | ||
``` | ||
mkdir build && cd build | ||
``` | ||
|
||
### Run CMake | ||
|
||
`cmake ..` | ||
Then run CMake with command: | ||
|
||
``` | ||
cmake .. | ||
``` | ||
|
||
Alternatively, if you want to disable Crypto++, use command: | ||
``` | ||
cmake -DDISABLE_CRYPTO=1 .. | ||
``` | ||
|
||
### Visual Studio | ||
|
||
Alternatively, if you want to disable Crypto | ||
##### Building | ||
|
||
`cmake -DDISABLE_CRYPTO=1 ..` | ||
After you have created the build files with CMake, open the solution and build the x64 version of uvgRTP. | ||
|
||
### Building on Windows | ||
##### Linking to an application | ||
|
||
Use Visual Studio. | ||
Add the compiled uvgRTP + headers (and Crypto++ if desired) to the Visual Studio project Configuration Properties of the application. | ||
|
||
### Linking uvgRTP on Windows | ||
### Linux | ||
|
||
? | ||
|
||
### Building on Linux | ||
##### Building | ||
|
||
Run the following commands: | ||
``` | ||
make | ||
sudo make install | ||
``` | ||
|
||
### Linking uvgRTP on Linux | ||
|
||
With Crypto++ | ||
|
||
`g++ main.cc -luvgrtp -lpthread -lcryptopp` | ||
##### Linking | ||
|
||
Without Crypto++ | ||
If you have compiled uvgRTP to use Crypto++, use the following command: | ||
``` | ||
g++ main.cc -luvgrtp -lpthread -lcryptopp | ||
``` | ||
|
||
`g++ main.cc -luvgrtp -lpthread` | ||
Or if you are not using Crypto++: | ||
``` | ||
g++ main.cc -luvgrtp -lpthread | ||
``` |