buresu / ndi-python

NewTek NDI Python wrapper
MIT License
133 stars 30 forks source link

Add support for CMAKE to compile on aarch64-rpi4 #16

Closed eftSharptooth closed 2 years ago

eftSharptooth commented 2 years ago

The current FindNDI.cmake will compile fine on aarch64-rpi4, but requires modification to include the arch. Could we add it as a supported aarch for building, as it works just fine when modifications are made.

example modification to FindNDI.cmake that worked: set(NDI_ARCH "aarch64-rpi4")

set(NDI_LIBRARY_DIR "${NDI_DIR}/lib/${NDI_ARCH}-linux-gnueabi")

Currently the cmake file does not do arch, only 32 or 64 bit, as far as I can tell.

buresu commented 2 years ago

Yes, I think we can it. I have rpi4 and I will try to work on it this weekend.

eftSharptooth commented 2 years ago

Thank you! As I said, I think the most difficult change will be detection during cmake, it does already compile fine with the changes above.

buresu commented 2 years ago

Sorry for the late update. I have updated FindNDI.cmake so that aarch64 is automatically detected. If the compiler is aarch64, the NDI_ARCH variable will be set to aarch64-rpi4-linux-gnueabi. And you can also explicitly specify NDI_ARCH.

env CMAKE_ARGS="-DNDI_SDK_DIR=/path/to/ndisdk -DNDI_ARCH=arm-rpi4-linux-gnueabihf" python setup.py build

I haven't confirmed running with rp4 yet, but I will try it if I have time.

eftSharptooth commented 2 years ago

Thank you for the update!

buresu commented 2 years ago

I have confirmed works with rpi4 aarch64. And pip install works correctly. This issue will be closed, if you have problems please open another issue.