mirror of
https://git.datalinker.icu/kijai/ComfyUI-Hunyuan3DWrapper.git
synced 2025-12-09 21:04:32 +08:00
32 lines
911 B
Python
Executable File
32 lines
911 B
Python
Executable File
from setuptools import setup, Extension
|
|
from setuptools.command.build_ext import build_ext
|
|
import sys
|
|
import os
|
|
import pybind11
|
|
class BuildExt(build_ext):
|
|
def build_extensions(self):
|
|
if sys.platform == 'win32':
|
|
# Windows-specific compiler flags
|
|
for ext in self.extensions:
|
|
ext.extra_compile_args = ['/O2', '/Wall']
|
|
else:
|
|
# Linux/Mac flags
|
|
for ext in self.extensions:
|
|
ext.extra_compile_args = ['-O3', '-Wall', '-fPIC']
|
|
build_ext.build_extensions(self)
|
|
|
|
setup(
|
|
name="mesh_processor",
|
|
ext_modules=[
|
|
Extension(
|
|
"mesh_processor",
|
|
["mesh_processor.cpp"],
|
|
include_dirs=[
|
|
pybind11.get_include(),
|
|
pybind11.get_include(user=True)
|
|
],
|
|
language='c++'
|
|
),
|
|
],
|
|
cmdclass={'build_ext': BuildExt},
|
|
) |