Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use zlib 1.3 and download from permalink #393

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ThirdParty/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cvode-6.4.1/
libxml2-2.10.3/
zlib-1.2.13/
zlib-1.3/
13 changes: 7 additions & 6 deletions ThirdParty/build_zlib.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import os
import tarfile
from pathlib import Path
from subprocess import check_call

from fmpy.util import download_file
from fmpy import extract


archive = download_file('https://www.zlib.net/zlib1213.zip',
checksum='d233fca7cf68db4c16dc5287af61f3cd01ab62495224c66639ca3da537701e42')
archive = download_file('https://www.zlib.net/fossils/zlib-1.3.tar.gz',
checksum='ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e')

root = Path(__file__).parent

extract(archive, root)
with tarfile.open(archive) as tf:
tf.extractall(root)

build_dir = root / 'zlib-1.2.13' / 'build'
build_dir = root / 'zlib-1.3' / 'build'

install_prefix = build_dir / 'install'

Expand All @@ -33,7 +34,7 @@
args +
['-B', build_dir,
'-D', f'CMAKE_INSTALL_PREFIX={ install_prefix }',
root / 'zlib-1.2.13']
root / 'zlib-1.3']
)

check_call([
Expand Down
4 changes: 2 additions & 2 deletions fmusim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ cmake_minimum_required (VERSION 3.17)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)

set(LIBXML2_DIR ${CMAKE_SOURCE_DIR}/ThirdParty/libxml2-2.10.3/build/install/)
set(ZLIB_DIR ${CMAKE_SOURCE_DIR}/ThirdParty/zlib-1.2.13/build/install/)
set(ZLIB_SRC_DIR ${CMAKE_SOURCE_DIR}/ThirdParty/zlib-1.2.13/)
set(ZLIB_DIR ${CMAKE_SOURCE_DIR}/ThirdParty/zlib-1.3/build/install/)
set(ZLIB_SRC_DIR ${CMAKE_SOURCE_DIR}/ThirdParty/zlib-1.3/)
set(CVODE_DIR ${CMAKE_SOURCE_DIR}/ThirdParty/cvode-6.4.1/build/install/)

if (WIN32)
Expand Down
Loading