Skip to content

Commit

Permalink
Try to fix the deflate linking on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Cercos-Pita <[email protected]>
  • Loading branch information
sanguinariojoe committed Jul 18, 2023
1 parent 58621ff commit e88b0c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DLIBDEFLATE_BUILD_SHARED_LIB=OFF -DLIBDEFLATE_USE_SHARED_LIB=OFF -DBUILD_SHARED_LIBS=OFF ../libdeflate &&
cmake --build ./ --config Release --clean-first &&
cmake --install ./ --config Release &&
if [[ -f ../openexr.install/lib/deflatestatic.lib ]]; then cp ../openexr.install/lib/deflatestatic.lib ../openexr.install/lib/deflate.lib; fi &&
cd .. &&
echo "Installing Imath-3.1.9..." &&
cd imath.build &&
Expand All @@ -36,7 +35,7 @@ jobs:
cd .. &&
echo "Installing OpenEXR..." &&
cd openexr.build &&
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -DOPENEXR_INSTALL_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF ../ &&
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -DOPENEXR_INSTALL_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DOPENEXR_FORCE_INTERNAL_DEFLATE=ON ../ &&
cmake --build ./ --config Release --clean-first &&
cmake --install ./ --config Release &&
cd ..
Expand Down
6 changes: 3 additions & 3 deletions src/wrappers/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
f'Iex-{version_major}_{version_minor}',
f'Imath-3_1',
f'OpenEXRCore-{version_major}_{version_minor}',
f'deflate',
]
f'deflate']
definitions = [('PYOPENEXR_VERSION_MAJOR', f'{version_major}'),
('PYOPENEXR_VERSION_MINOR', f'{version_minor}'),
('PYOPENEXR_VERSION_PATCH', f'{version_patch}'),]
if platform.system() == "Windows":
libs_static = ['zlibstatic' if l == 'z' else l for l in libs_static]
libs_static[0] = 'zlibstatic'
libs_static[-1] = 'deflatestatic'
definitions = [('PYOPENEXR_VERSION', f'\\"{version}\\"')]
extra_compile_args = []
if platform.system() == 'Darwin':
Expand Down

0 comments on commit e88b0c2

Please sign in to comment.