-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathReadme.txt
51 lines (43 loc) · 1.81 KB
/
Readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
### Building the MPEG-H 3D Audio Low Complexity Profile Encoder using Cmake
Users can also use cmake to build for `x86`, `x86_64`, `armv7`, `armv8` and Windows (MSVS project) platforms.
The binaries get generated in libmpeghe/build/bin folder.
##### To build for native platform, run the following commands:
```
$ mkdir cmake_build
$ cd cmake_build
$ cmake ..
$ make
```
##### Cross-compiling
Ensure to edit the file toolchain_<arch>.cmake to set proper paths in host for corresponding platforms:
# Example: ARMv7
# Specify the cross compiler path in toolchain_armv7.cmake
SET(CMAKE_C_COMPILER /<Path>/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /<Path>/arm-linux-gnueabihf-g++)
# Specify target environment path in toolchain_armv7.cmake
SET(CMAKE_FIND_ROOT_PATH <Path>/arm-linux-gnueabihf)
Run the following commands to cross compile for `x86`, `ARMv7` or `ARMv8`:
```
$ mkdir cmake_build
$ cd cmake_build
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain_<arch>.cmake
$ make
```
##### Building on Windows
To create MSVS project files for the MPEG-H 3D Audio Low Complexity Profile encoder from cmake, run the following commands:
```
$ mkdir cmake_build
$ cd cmake_build
$ cmake -G "Visual Studio 15 2017" ..
```
Above command will create Win32 version of workspace
To create MSVS project files for Win64 version from cmake, run the following commands:
```
$ mkdir cmake_build
$ cd cmake_build
$ cmake -G "Visual Studio 15 2017 Win64" ..
```
The above command creates MSVS 2017 project files. If the version is different, modify the generator name accordingly.
Note: This Cmake creates debug version for msvs and release version for other platforms.
For msvs ,it can be manually converted to release mode in the solution configuration
For other platforms adding "-g" for the Cflag in the Cmakelists will set the debug version.