build pip package for windows

This commit is contained in:
Naoto Kondo
2022-03-21 17:21:53 +09:00
parent b82b43cb7e
commit 6a5cb93ba6
3 changed files with 12 additions and 6 deletions

View File

@@ -36,12 +36,12 @@ install(
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}
)
if(WIN32)
install(
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")

View File

@@ -1 +1,6 @@
import os
if os.name == 'nt':
os.add_dll_directory(os.path.dirname(__file__))
from .NDIlib import *

View File

@@ -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)