Skip to content

Commit

Permalink
Use zlib 1.3 and download from permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Aug 24, 2023
1 parent ee6b70b commit a00c5c1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
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

0 comments on commit a00c5c1

Please sign in to comment.