diff --git a/README.md b/README.md index 519221b..b12fc00 100644 --- a/README.md +++ b/README.md @@ -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! diff --git a/cmake/Modules/FindNDI.cmake b/cmake/Modules/FindNDI.cmake index 85238b2..6b83368 100644 --- a/cmake/Modules/FindNDI.cmake +++ b/cmake/Modules/FindNDI.cmake @@ -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)