Skip to content

Commit

Permalink
Avoid linking VCRUNTIME140_1 for widnows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kuelumbus committed Jun 26, 2024
1 parent a1e0b41 commit c065ec6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,19 @@ def build_rdkit(self, ext):
vcpkg_inc = vcpkg_path / "vcpkg_installed" / "x64-windows" / "include"
vcpkg_lib = vcpkg_path / "vcpkg_installed" / "x64-windows" / "lib"
if sys.platform == "win32":
# DRDK_INSTALL_STATIC_LIBS should be fixed in newer RDKit builds
options += [
"-Ax64",
# DRDK_INSTALL_STATIC_LIBS should be fixed in newer RDKit builds. Remove?
"-DRDK_INSTALL_STATIC_LIBS=OFF",
"-DRDK_INSTALL_DLLS_MSVC=ON",
# Avoid linking `VCRUNTIME140_1.dll`. https://github.com/pypa/cibuildwheel/issues/423
"-DCMAKE_CXX_FLAGS=-d2FH4-",
]

def to_win_path(pt: Path):
return str(pt).replace("\\", "/")

# Link cairo and freetype

options += [
f"-DCAIRO_INCLUDE_DIR={to_win_path(vcpkg_inc)}",
f"-DCAIRO_LIBRARY_DIR={to_win_path(vcpkg_lib)}",
Expand Down

0 comments on commit c065ec6

Please sign in to comment.