diff --git a/CMakeLists.txt b/CMakeLists.txt index a927c4c..9884276 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,12 +36,12 @@ install( LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX} ) if(WIN32) -install( - FILES - "${NDI_DIR}/Bin/x64/Processing.NDI.Lib.x64.dll" - "${NDI_DIR}/Bin/x64/Processing.NDI.Lib.Licenses.txt" - DESTINATION ${CMAKE_INSTALL_PREFIX} -) + install( + FILES + "${NDI_DIR}/Bin/x64/Processing.NDI.Lib.x64.dll" + "${NDI_DIR}/Bin/x64/Processing.NDI.Lib.Licenses.txt" + DESTINATION ${CMAKE_INSTALL_PREFIX} + ) elseif(UNIX) file(GLOB DLL "${NDI_LIBRARY_DIR}/libndi.so*") file(GLOB LICENSE "${NDI_LICENSE_DIR}/*.txt") diff --git a/NDIlib/__init__.py b/NDIlib/__init__.py index 7694367..223ea1a 100644 --- a/NDIlib/__init__.py +++ b/NDIlib/__init__.py @@ -1 +1,6 @@ +import os + +if os.name == 'nt': + os.add_dll_directory(os.path.dirname(__file__)) + from .NDIlib import * diff --git a/cmake/Modules/FindNDI.cmake b/cmake/Modules/FindNDI.cmake index b66f354..dec4f67 100644 --- a/cmake/Modules/FindNDI.cmake +++ b/cmake/Modules/FindNDI.cmake @@ -5,6 +5,7 @@ if(WIN32) string(REPLACE "\\" "/" NDI_DIR "${NDI_DIR}") set(NDI_INCLUDE_DIR "${NDI_DIR}/Include") set(NDI_LIBRARY_DIR "${NDI_DIR}/Lib/x64") + set(NDI_LICENSE_DIR "${NDI_DIR}/Lib/x64") set(NDI_LIBS "Processing.NDI.Lib.x64") else() set(NDI_FOUND FALSE)