Skip to content

Commit acf27c5

Browse files
committed
generalise handling of szip(.dll)?.a in other builds
It was set up to work when szip is unpacked from a previous build, in whuch case the libsz.a file existed. But this renaming is done in the packing step so new builds have libsz.dll.a. The need to specify the libsz path might ultimately be due to the pkg-config version but this approach works for now.
1 parent 104a22a commit acf27c5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

build.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,10 @@ echo "SET_TARGET_PROPERTIES (\${HDF5_HL_LIBSH_TARGET} PROPERTIES SUFFIX $D
12761276
echo "SET_TARGET_PROPERTIES (\${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES SUFFIX $DLLSUFFIX.dll)">> CMakeLists.txt
12771277
echo "SET_TARGET_PROPERTIES (\${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES SUFFIX $DLLSUFFIX.dll)">> CMakeLists.txt
12781278
echo "ENDIF ()" >> CMakeLists.txt
1279+
1280+
szlib=$OUTLIB/libsz.dll.a
1281+
[ -e $OUTLIB/libsz.a ] && szlib=$OUTLIB/libsz.a
1282+
12791283
mkdir MY_BUILD
12801284
cd MY_BUILD
12811285
xxrun cmake -G 'MSYS Makefiles' -Wno-dev -DCMAKE_INSTALL_PREFIX=$OUT \
@@ -1292,7 +1296,7 @@ xxrun cmake -G 'MSYS Makefiles' -Wno-dev -DCMAKE_INSTALL_PREFIX=$OUT \
12921296
-DHDF5_ENABLE_SZIP_SUPPORT=ON \
12931297
-DHDF5_ENABLE_SZIP_ENCODING=ON \
12941298
-DSZIP_INCLUDE_DIR=$OUT/include \
1295-
-DSZIP_LIBRARY=$OUT/lib/libsz.a \
1299+
-DSZIP_LIBRARY=$szlib \
12961300
..
12971301

12981302
###-DHDF5_INSTALL_CMAKE_DIR="lib/cmake" \
@@ -1334,6 +1338,10 @@ echo "SET_TARGET_PROPERTIES (\${HDF4_MF_LIBSH_TARGET} PROPERTIES SU
13341338
#echo "SET_TARGET_PROPERTIES (\${HDF4_SRC_FCSTUB_LIB_NAME} PROPERTIES SUFFIX $DLLSUFFIX.dll)">> CMakeLists.txt
13351339
#echo "SET_TARGET_PROPERTIES (\${HDF4_SRC_FORTRAN_LIB_NAME} PROPERTIES SUFFIX $DLLSUFFIX.dll)">> CMakeLists.txt
13361340
echo "ENDIF ()" >> CMakeLists.txt
1341+
1342+
szlib=$OUTLIB/libsz.dll.a
1343+
[ -e $OUTLIB/libsz.a ] && szlib=$OUTLIB/libsz.a
1344+
13371345
mkdir MY_BUILD
13381346
cd MY_BUILD
13391347
cp ../COPYING.txt ./
@@ -1350,7 +1358,7 @@ xxrun cmake -G 'Unix Makefiles' -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$O
13501358
-DHDF4_NO_PACKAGES=ON \
13511359
-DHDF4_ENABLE_NETCDF=OFF \
13521360
-DSZIP_INCLUDE_DIR=$OUT/include \
1353-
-DSZIP_LIBRARY=$OUT/lib/libsz.a \
1361+
-DSZIP_LIBRARY=$szlib \
13541362
..
13551363
xxrun gmake
13561364
xxrun gmake install

0 commit comments

Comments
 (0)