Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
k-ujihara committed Mar 2, 2021
1 parent 993e6fa commit 7350e77
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
33 changes: 26 additions & 7 deletions build_rdkit_csharp.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
)
from xml.etree.ElementTree import ElementTree, SubElement

_BUILD_STATIC_LIB = False

logging.basicConfig(level=logging.DEBUG)
project_name: str = "RDKit.DotNetWrap"

Expand Down Expand Up @@ -520,9 +522,9 @@ def build_rdkit(self) -> None:
_curdir = os.path.abspath(os.curdir)
os.chdir(self.rdkit_csharp_build_path)
try:
# self._patch_i_files()
# self._make_rdkit_cmake()
# self._build_rdkit_native()
self._patch_i_files()
self._make_rdkit_cmake()
self._build_rdkit_native()
self._copy_dlls()
finally:
os.chdir(_curdir)
Expand Down Expand Up @@ -599,18 +601,35 @@ def f_test():
"-DRDK_BUILD_INCHI_SUPPORT=ON",
"-DRDK_BUILD_AVALON_SUPPORT=ON",
"-DBoost_NO_BOOST_CMAKE=ON",
f"-DRDK_BUILD_TEST_GZIP={f_test()}",
]

if self.get_rdkit_version() >= 2020091:
# needs followings after 2020_09_1
args += [
"-DRDK_SWIG_STATIC=OFF",
"-DRDK_INSTALL_STATIC_LIBS=OFF",
f"-DRDK_BUILD_TEST_GZIP={f_test()}",
"-DRDK_USE_URF=ON",
]
if get_os() == "win":
args += ["-DRDK_INSTALL_DLLS_MSVC=ON"]
args += [
"-DRDK_SWIG_STATIC=OFF",
"-DRDK_INSTALL_STATIC_LIBS=OFF",
]
if get_os() == "win":
args += ["-DRDK_INSTALL_DLLS_MSVC=ON"]
if get_os() == "linux":
if _BUILD_STATIC_LIB:
args += [
"-DRDK_SWIG_STATIC=ON",
"-DRDK_INSTALL_STATIC_LIBS=ON"
"-DBOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu",
"-DBOOST_ROOT=/usr",
"-DBoost_USE_STATIC_LIBS=ON",
]
else:
args += [
"-DRDK_SWIG_STATIC=OFF",
"-DRDK_INSTALL_STATIC_LIBS=OFF",
]
if self.get_rdkit_version() >= 2020091:
# freetype supports starts from 2020_09_1
if self.config.freetype_path:
Expand Down
2 changes: 1 addition & 1 deletion myApp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bin/Release/net5.0/myApp
for Windows
```bash
dotnet build -c Release
bin\\Release\\net5.0\\myApp.exe
bin\Release\net5.0\myApp.exe
```

Above prints below.
Expand Down

0 comments on commit 7350e77

Please sign in to comment.