Skip to content

Commit

Permalink
dll
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Sep 28, 2023
1 parent 15ff4f6 commit a23ba3a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions otfmi/function_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ def _build_cwrapper(self, verbose):
"""
cmake_args = ["cmake", "."]
if sys.platform.startswith("win"):
# bits = platform.architecture()[0]
# vsplat = {"64bit": "x64", "32bit": "x86"}[bits]
cmake_args.insert(1, "-DCMAKE_GENERATOR_PLATFORM=x64")
subprocess.run(
cmake_args, capture_output=not verbose, cwd=self.workdir, check=True
Expand Down Expand Up @@ -651,6 +653,9 @@ def export_model(self, model_path, gui=False, verbose=False, binary=True, mode="
list_file = [className + extension]
if binary:
if sys.platform.startswith("win"):
if os.path.exists(os.path.join(self.workdir, "cwrapper.dll")):
list_file.append("cwrapper.dll")
# import or static lib
list_file.append("cwrapper.lib")
else:
if os.path.exists(os.path.join(self.workdir, "libcwrapper.so")):
Expand Down

0 comments on commit a23ba3a

Please sign in to comment.