fix : apr_build error on linux and VS19
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
[中文版本使用说明](<https://github.com/Livox-SDK/Livox-SDK/blob/master/README_CN.md>)
|
||||||
|
|
||||||
# 1 Introduction
|
# 1 Introduction
|
||||||
|
|
||||||
Livox SDK is the software development kit designed for all Livox products. It is developed based on C/C++ following Livox SDK Communication Protocol, and provides easy-to-use C style API. With Livox SDK, users can quickly connect to Livox products and receive point cloud data.
|
Livox SDK is the software development kit designed for all Livox products. It is developed based on C/C++ following Livox SDK Communication Protocol, and provides easy-to-use C style API. With Livox SDK, users can quickly connect to Livox products and receive point cloud data.
|
||||||
@@ -41,12 +43,29 @@ In the Livox SDK directory, run the following commands to compile the project:
|
|||||||
```
|
```
|
||||||
git clone https://github.com/Livox-SDK/Livox-SDK.git
|
git clone https://github.com/Livox-SDK/Livox-SDK.git
|
||||||
cd Livox-SDK
|
cd Livox-SDK
|
||||||
|
```
|
||||||
|
Install apr library by:
|
||||||
|
|
||||||
|
```
|
||||||
sudo ./third_party/apr/apr_build.sh
|
sudo ./third_party/apr/apr_build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
or by:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install libapr1-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
then
|
||||||
|
|
||||||
|
```
|
||||||
cd build && cmake ..
|
cd build && cmake ..
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4.1.2 Windows 7/10
|
### 4.1.2 Windows 7/10
|
||||||
|
|
||||||
#### Dependencies
|
#### Dependencies
|
||||||
Livox SDK supports Visual Studio 2015/2017 and requires install [CMake 3.0.0+](https://cmake.org/) as dependencies.
|
Livox SDK supports Visual Studio 2015/2017 and requires install [CMake 3.0.0+](https://cmake.org/) as dependencies.
|
||||||
|
|
||||||
|
|||||||
@@ -42,12 +42,31 @@ sudo apt install cmake pkg-config
|
|||||||
```
|
```
|
||||||
git clone https://github.com/Livox-SDK/Livox-SDK.git
|
git clone https://github.com/Livox-SDK/Livox-SDK.git
|
||||||
cd Livox-SDK
|
cd Livox-SDK
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
安装 apr 库通过:
|
||||||
|
|
||||||
|
```
|
||||||
sudo ./third_party/apr/apr_build.sh
|
sudo ./third_party/apr/apr_build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
或者通过:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install libapr1-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
然后:
|
||||||
|
|
||||||
|
```
|
||||||
cd build && cmake ..
|
cd build && cmake ..
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4.1.2 Windows 7/10
|
### 4.1.2 Windows 7/10
|
||||||
|
|
||||||
#### 依赖
|
#### 依赖
|
||||||
Livox SDK 支持 Visual Studio 2015/2017,需要安装 [CMake 3.0.0+](https://cmake.org/) 依赖。
|
Livox SDK 支持 Visual Studio 2015/2017,需要安装 [CMake 3.0.0+](https://cmake.org/) 依赖。
|
||||||
|
|
||||||
|
|||||||
Vendored
+12
@@ -50,6 +50,18 @@ if defined VS150COMNTOOLS (
|
|||||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
|
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if defined VS160COMNTOOLS (
|
||||||
|
call "%VS160COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
|
||||||
|
) else if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||||
|
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
|
||||||
|
) else if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||||
|
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
|
||||||
|
) else if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||||
|
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
|
||||||
|
) else if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||||
|
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
|
||||||
|
)
|
||||||
|
|
||||||
echo start to build.
|
echo start to build.
|
||||||
|
|
||||||
pushd %~dp0apr-1.6.5
|
pushd %~dp0apr-1.6.5
|
||||||
|
|||||||
Vendored
+4
@@ -59,4 +59,8 @@ make install
|
|||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
if [ ! -d "/usr/local/lib/pkgconfig" ]; then
|
||||||
|
mkdir /usr/local/lib/pkgconfig
|
||||||
|
fi
|
||||||
|
|
||||||
cp /usr/local/apr/lib/pkgconfig/apr-1.pc /usr/local/lib/pkgconfig/
|
cp /usr/local/apr/lib/pkgconfig/apr-1.pc /usr/local/lib/pkgconfig/
|
||||||
|
|||||||
Reference in New Issue
Block a user