cmake: Fix and enabled shared lib support with MSVC
* Add decldll to proto * rework init to make it working for MSVC * fix test_xprs_interface build dotnet: Fix MSVC shared libs support * Fix csproj to include libortools.dll java: Fix MSVC shared_libs support * Fix runtime jar to include libortools.dll python: Fix MSVC shared_libs support * fix __init__.py.in loading for MSVC
This commit is contained in:
@@ -55,11 +55,11 @@ def _load_ortools_libs():
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
for dll in ["zlib1.dll", "abseil_dll.dll", "utf8_validity.dll", "libprotobuf.dll", "highs.dll"]:
|
||||
dll_path = os.path.join(basedir, ".libs", dll)
|
||||
if os.path.exists(dll_path):
|
||||
print(f"load {dll_path}...")
|
||||
WinDLL(dll_path)
|
||||
for dll in ["zlib1.dll", "abseil_dll.dll", "utf8_validity.dll", "re2.dll", "libprotobuf.dll", "highs.dll", "ortools.dll"]:
|
||||
dll_path = os.path.join(basedir, ".libs", dll)
|
||||
if os.path.exists(dll_path):
|
||||
print(f"load {dll_path}...")
|
||||
WinDLL(dll_path)
|
||||
|
||||
|
||||
_load_ortools_libs()
|
||||
_load_ortools_libs()
|
||||
|
||||
@@ -51,8 +51,7 @@ setup(
|
||||
],
|
||||
package_data={
|
||||
'@PYTHON_PROJECT@':[
|
||||
'.libs/*',
|
||||
$<$<STREQUAL:$<TARGET_PROPERTY:@PROJECT_NAME@,TYPE>,SHARED_LIBRARY>:'../$<TARGET_SONAME_FILE_NAME:@PROJECT_NAME@>'>
|
||||
'.libs/*'
|
||||
],
|
||||
'@PYTHON_PROJECT@.init.python':[
|
||||
'$<TARGET_FILE_NAME:init_pybind11>',
|
||||
|
||||
Reference in New Issue
Block a user