Added scripts and debugged cmake to make compile windows ready. Now it compiles, bug the problem is, we have DLL load failed
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3f0d9f4b00
commit
ad864ddb4a
@ -3,27 +3,9 @@ if(WIN32)
|
|||||||
|
|
||||||
# set(miniconda_dir ${home}\\Miniconda3)
|
# set(miniconda_dir ${home}\\Miniconda3)
|
||||||
message("Building for Windows")
|
message("Building for Windows")
|
||||||
include_directories(
|
|
||||||
..\\rtaudio
|
|
||||||
C:\\mingw\\mingw64\\include\\OpenBLAS
|
|
||||||
link_directories(${home}\\miniconda3\\Library\\include)
|
|
||||||
)
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH} $miniconda_dir\\Lib\\cmake")
|
|
||||||
# include(
|
|
||||||
add_definitions(-DMS_WIN64)
|
|
||||||
link_directories(C:\\mingw\\mingw64\\lib)
|
|
||||||
link_directories(C:\\mingw\\mingw64\\bin)
|
|
||||||
link_directories(..\\rtaudio)
|
|
||||||
link_directories(${home}\\Miniconda3)
|
|
||||||
add_definitions(-DHAS_RTAUDIO_WIN_WASAPI_API)
|
add_definitions(-DHAS_RTAUDIO_WIN_WASAPI_API)
|
||||||
else() # Linux compile
|
else() # Linux compile
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wfatal-errors")
|
|
||||||
include_directories(/usr/local/include/rtaudio)
|
|
||||||
include_directories(/usr/include/rtaudio)
|
|
||||||
link_directories(/usr/local/lib)
|
|
||||||
# This should become optional later on, and be added to the windows list as
|
|
||||||
# well.
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
# The last argument here takes care of calling SIGABRT when an integer overflow
|
|
||||||
# occures.
|
|
||||||
|
3
scripts/configure_cmake_msys2.sh
Normal file
3
scripts/configure_cmake_msys2.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
cmake . -G"MinGW Makefiles" -DLASP_HAS_ULDAQ=OFF -DPython3_ROOT_DIR=C:\\winpython\\python-3.10.9.amd64
|
23
scripts/install_msys2_builddeps.sh
Normal file
23
scripts/install_msys2_builddeps.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# set default options for invoking pacman (in CI this variable is already set globally)
|
||||||
|
if [ -z $CI ]; then
|
||||||
|
PACMAN_OPTIONS="--needed --noconfirm"
|
||||||
|
fi
|
||||||
|
arch=mingw-w64-x86_64
|
||||||
|
|
||||||
|
|
||||||
|
pacman -S ${PACMAN_OPTIONS} make
|
||||||
|
|
||||||
|
deps="gcc make toolchain ccache cmake openblas pybind11 fftw"
|
||||||
|
for dep in $deps; do
|
||||||
|
pacman -S ${PACMAN_OPTIONS} ${arch}-${dep}
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# install Python modules not provided as MSYS2/MinGW packages
|
||||||
|
#PACKAGES=""
|
||||||
|
#for arch in $(eval echo $ARCH); do
|
||||||
|
#/mingw64/bin/pip3 install --upgrade ${PACKAGES}
|
||||||
|
#done
|
33
setup.py
33
setup.py
@ -1,26 +1,31 @@
|
|||||||
import glob, os
|
import glob, os
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
if 'Linux' in platform.platform():
|
pf = platform.platform()
|
||||||
|
|
||||||
|
if 'Linux' in pf:
|
||||||
ext_name_glob = 'lasp_cpp.cpython*'
|
ext_name_glob = 'lasp_cpp.cpython*'
|
||||||
extensions = list(glob.glob('src/lasp/' + ext_name_glob))
|
|
||||||
|
|
||||||
# Split of path from file.
|
# Split of path from file.
|
||||||
ext_names = [os.path.split(a)[1] for a in extensions]
|
extensions = list(glob.glob('src/lasp/' + ext_name_glob))
|
||||||
|
elif 'Windows' in pf:
|
||||||
print(extensions)
|
ext_name_glob = 'lasp_cpp.cp*.pyd'
|
||||||
if len(extensions) == 0:
|
# Split of path from file.
|
||||||
raise RuntimeError('Please first run CMake to build extension')
|
extensions = list(glob.glob('src\\lasp/' + ext_name_glob))
|
||||||
elif len(extensions) > 1:
|
|
||||||
raise RuntimeError('Too many extension files found')
|
|
||||||
|
|
||||||
pkgdata = ext_names
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise RuntimeError('Not yet Windows-proof')
|
raise RuntimeError('Not yet Windows-proof')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print(extensions)
|
||||||
|
ext_names = [os.path.split(a)[1] for a in extensions]
|
||||||
|
|
||||||
|
if len(extensions) == 0:
|
||||||
|
raise RuntimeError('Please first run CMake to build extension')
|
||||||
|
elif len(extensions) > 1:
|
||||||
|
raise RuntimeError('Too many extension files found')
|
||||||
|
|
||||||
|
pkgdata = ext_names
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Topic :: Scientific/Engineering",
|
"Topic :: Scientific/Engineering",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
|
Loading…
Reference in New Issue
Block a user