Add support for builds on ubuntu

This commit is contained in:
Naoto Kondo
2021-05-29 23:17:30 +09:00
parent d5b8a237fc
commit 52bc0f2301
2 changed files with 23 additions and 5 deletions

View File

@@ -2,22 +2,34 @@
NewTek NDI Python wrapper
## Setup
### Windows and mac
### Windows, mac, ubuntu
Donwload and install NDI SDK.
https://ndi.tv/sdk/
### Arch Linux
```
yay ndi-sdk
yay -S ndi-sdk
```
## Clone and build
## Clone
```
git clone https://github.com/buresu/ndi-python.git --recursive
```
## Build
```
cd /path/to/build
cmake /path/to/project
cmake --build /path/to/build --config Release
```
For ubuntu you need to set the SDK directory in NDI_SDK_DIR.
And build as follows.
```
cmake /path/to/project -DNDI_SDK_DIR=/path/to/ndisdk
cmake --build /path/to/build --config Release
```
After build copy ndi-python binary and NDI binary to execute directory.
Enjoy!

View File

@@ -20,7 +20,13 @@ elseif(APPLE)
set(NDI_FOUND FALSE)
endif()
elseif(UNIX)
if(EXISTS "/usr/include/Processing.NDI.Lib.h")
if(EXISTS "${NDI_SDK_DIR}/include/Processing.NDI.Lib.h")
set(NDI_FOUND TRUE)
set(NDI_DIR ${NDI_SDK_DIR})
set(NDI_INCLUDE_DIR "${NDI_DIR}/include")
set(NDI_LIBRARY_DIR "${NDI_DIR}/lib/x86_64-linux-gnu")
set(NDI_LIBS "ndi")
elseif(EXISTS "/usr/include/Processing.NDI.Lib.h")
set(NDI_FOUND TRUE)
set(NDI_DIR "/usr")
set(NDI_INCLUDE_DIR "${NDI_DIR}/include")
@@ -28,7 +34,7 @@ elseif(UNIX)
set(NDI_LIBS "ndi")
else()
set(NDI_FOUND FALSE)
endif()
endif()
endif()
include(FindPackageHandleStandardArgs)