fix : apr_build error on linux and VS19

This commit is contained in:
Livox-SDK
2020-05-16 18:06:00 +08:00
parent 37b9848f0a
commit a45ca59e04
4 changed files with 54 additions and 0 deletions
+19
View File
@@ -1,3 +1,5 @@
[中文版本使用说明](<https://github.com/Livox-SDK/Livox-SDK/blob/master/README_CN.md>)
# 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.
@@ -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
cd Livox-SDK
```
Install apr library by:
```
sudo ./third_party/apr/apr_build.sh
```
or by:
```
sudo apt install libapr1-dev
```
then
```
cd build && cmake ..
make
sudo make install
```
### 4.1.2 Windows 7/10
#### Dependencies
Livox SDK supports Visual Studio 2015/2017 and requires install [CMake 3.0.0+](https://cmake.org/) as dependencies.
+19
View File
@@ -42,12 +42,31 @@ sudo apt install cmake pkg-config
```
git clone https://github.com/Livox-SDK/Livox-SDK.git
cd Livox-SDK
```
安装 apr 库通过:
```
sudo ./third_party/apr/apr_build.sh
```
或者通过:
```
sudo apt install libapr1-dev
```
然后:
```
cd build && cmake ..
make
sudo make install
```
### 4.1.2 Windows 7/10
#### 依赖
Livox SDK 支持 Visual Studio 2015/2017,需要安装 [CMake 3.0.0+](https://cmake.org/) 依赖。
+12
View File
@@ -48,6 +48,18 @@ if defined VS150COMNTOOLS (
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
) else if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" (
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.
+4
View File
@@ -59,4 +59,8 @@ make install
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/