mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-18 17:40:55 +08:00
Add option to use zlib-ng as zlib library (#4487)
This commit is contained in:
parent
b823c1609d
commit
552510e906
37
.github/workflows/main-cmake-spc.yml
vendored
37
.github/workflows/main-cmake-spc.yml
vendored
@ -80,7 +80,7 @@ jobs:
|
||||
# working-directory: ${{ runner.workspace }}/build
|
||||
|
||||
build_v1_10:
|
||||
name: "gcc DBG v1.10 default API (build only)"
|
||||
name: "gcc DBG v1.10 default API"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# SETUP
|
||||
@ -140,7 +140,7 @@ jobs:
|
||||
working-directory: ${{ runner.workspace }}/build
|
||||
|
||||
build_v1_12:
|
||||
name: "gcc DBG v1.12 default API (build only)"
|
||||
name: "gcc DBG v1.12 default API"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# SETUP
|
||||
@ -199,21 +199,21 @@ jobs:
|
||||
run: ctest . --parallel 2 -C Debug -V
|
||||
working-directory: ${{ runner.workspace }}/build
|
||||
|
||||
build_v1_14:
|
||||
name: "gcc DBG v1.14 default API (build only)"
|
||||
build_zlibng:
|
||||
name: "gcc use zlib-ng filter"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# SETUP
|
||||
- name: Install Linux Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build doxygen graphviz
|
||||
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
|
||||
sudo apt install gcc-12 g++-12 gfortran-12
|
||||
echo "CC=gcc-12" >> $GITHUB_ENV
|
||||
echo "CXX=g++-12" >> $GITHUB_ENV
|
||||
echo "FC=gfortran-12" >> $GITHUB_ENV
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build doxygen graphviz
|
||||
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
|
||||
sudo apt install gcc-12 g++-12 gfortran-12
|
||||
echo "CC=gcc-12" >> $GITHUB_ENV
|
||||
echo "CXX=g++-12" >> $GITHUB_ENV
|
||||
echo "FC=gfortran-12" >> $GITHUB_ENV
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Get Sources
|
||||
uses: actions/checkout@v4.1.1
|
||||
@ -227,7 +227,7 @@ jobs:
|
||||
cd "${{ runner.workspace }}/build"
|
||||
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
|
||||
-G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DHDF5_ENABLE_ALL_WARNINGS=ON \
|
||||
-DHDF5_ENABLE_PARALLEL:BOOL=OFF \
|
||||
@ -235,13 +235,12 @@ jobs:
|
||||
-DHDF5_BUILD_FORTRAN=ON \
|
||||
-DHDF5_BUILD_JAVA=ON \
|
||||
-DHDF5_BUILD_DOC=OFF \
|
||||
-DLIBAEC_USE_LOCALCONTENT=OFF \
|
||||
-DZLIB_USE_LOCALCONTENT=OFF \
|
||||
-DLIBAEC_USE_LOCALCONTENT=ON \
|
||||
-DZLIB_USE_LOCALCONTENT=ON \
|
||||
-DHDF5_ENABLE_MIRROR_VFD:BOOL=ON \
|
||||
-DHDF5_ENABLE_DIRECT_VFD:BOOL=ON \
|
||||
-DHDF5_ENABLE_ROS3_VFD:BOOL=ON \
|
||||
-DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \
|
||||
-DDEFAULT_API_VERSION:STRING=v114 \
|
||||
-DHDF5_USE_ZLIBNG:BOOL=ON \
|
||||
$GITHUB_WORKSPACE
|
||||
shell: bash
|
||||
|
||||
@ -249,12 +248,12 @@ jobs:
|
||||
# BUILD
|
||||
#
|
||||
- name: CMake Build
|
||||
run: cmake --build . --parallel 3 --config Debug
|
||||
run: cmake --build . --parallel 3 --config Release
|
||||
working-directory: ${{ runner.workspace }}/build
|
||||
|
||||
#
|
||||
# RUN TESTS
|
||||
#
|
||||
- name: CMake Run Tests
|
||||
run: ctest . --parallel 2 -C Debug -V
|
||||
run: ctest . --parallel 2 -C Release -V
|
||||
working-directory: ${{ runner.workspace }}/build
|
||||
|
@ -9,14 +9,23 @@
|
||||
# If you do not have access to either file, you may request a copy from
|
||||
# help@hdfgroup.org.
|
||||
#
|
||||
option (USE_LIBAEC_STATIC "Use static AEC library" OFF)
|
||||
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB else search" OFF)
|
||||
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP else search" OFF)
|
||||
option (HDF5_USE_ZLIB_NG "Use zlib-ng library as zlib library" OFF)
|
||||
option (HDF5_USE_LIBAEC_STATIC "Use static AEC library" OFF)
|
||||
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF)
|
||||
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF)
|
||||
|
||||
if (NOT ZLIB_USE_LOCALCONTENT)
|
||||
set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_NAME})
|
||||
if (HDF5_USE_ZLIB_NG)
|
||||
set (ZLIB_URL ${ZLIBNG_TGZ_ORIGPATH}/${ZLIBNG_TGZ_NAME})
|
||||
else ()
|
||||
set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_NAME})
|
||||
endif ()
|
||||
else ()
|
||||
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
|
||||
if (HDF5_USE_ZLIB_NG)
|
||||
set (ZLIB_URL ${TGZPATH}/${ZLIBNG_TGZ_NAME})
|
||||
else ()
|
||||
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
|
||||
endif ()
|
||||
endif ()
|
||||
message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}")
|
||||
|
||||
@ -71,8 +80,13 @@ option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON)
|
||||
if (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
if (NOT H5_ZLIB_HEADER)
|
||||
if (NOT ZLIB_USE_EXTERNAL)
|
||||
if (HDF5_USE_ZLIB_NG)
|
||||
set (PACKAGE_NAME ${ZLIBNG_PACKAGE_NAME}${HDF_PACKAGE_EXT})
|
||||
else ()
|
||||
set (PACKAGE_NAME ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
|
||||
endif ()
|
||||
set(ZLIB_FOUND FALSE)
|
||||
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
|
||||
find_package (ZLIB NAMES ${PACKAGE_NAME} COMPONENTS static shared)
|
||||
if (NOT ZLIB_FOUND)
|
||||
find_package (ZLIB) # Legacy find
|
||||
endif ()
|
||||
@ -119,9 +133,14 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
|
||||
if (NOT SZIP_USE_EXTERNAL)
|
||||
set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC})
|
||||
set(SZIP_FOUND FALSE)
|
||||
find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
|
||||
if (NOT SZIP_FOUND)
|
||||
find_package (SZIP) # Legacy find
|
||||
find_package (libaec 1.0.5 CONFIG)
|
||||
if (SZIP_FOUND)
|
||||
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_SZIP_LIBRARIES})
|
||||
else ()
|
||||
find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
|
||||
if (NOT SZIP_FOUND)
|
||||
find_package (SZIP) # Legacy find
|
||||
endif ()
|
||||
endif ()
|
||||
set(H5_SZIP_FOUND ${SZIP_FOUND})
|
||||
if (H5_SZIP_FOUND)
|
||||
|
@ -20,9 +20,12 @@
|
||||
"ZLIB_PACKAGE_NAME": {"type": "STRING", "value": "zlib"},
|
||||
"ZLIB_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/madler/zlib/releases/download/v1.3"},
|
||||
"ZLIB_TGZ_NAME": {"type": "STRING", "value": "zlib-1.3.tar.gz"},
|
||||
"ZLIBNG_PACKAGE_NAME": {"type": "STRING", "value": "zlib-ng"},
|
||||
"ZLIBNG_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/zlib-ng/zlib-ng/archive/refs/tags"},
|
||||
"ZLIBNG_TGZ_NAME": {"type": "STRING", "value": "2.1.6.tar.gz"},
|
||||
"LIBAEC_PACKAGE_NAME": {"type": "STRING", "value": "libaec"},
|
||||
"LIBAEC_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6"},
|
||||
"LIBAEC_TGZ_NAME": {"type": "STRING", "value": "libaec-1.0.6.tar.gz"}
|
||||
"LIBAEC_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3"},
|
||||
"LIBAEC_TGZ_NAME": {"type": "STRING", "value": "libaec-1.1.3.tar.gz"}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -31,6 +34,7 @@
|
||||
"inherits": ["ci-base-tgz", "ci-CompressionVars"],
|
||||
"cacheVariables": {
|
||||
"HDF5_PACKAGE_EXTLIBS": "ON",
|
||||
"HDF5_USE_ZLIB_NG": "OFF",
|
||||
"ZLIB_USE_LOCALCONTENT": "OFF",
|
||||
"LIBAEC_USE_LOCALCONTENT": "OFF"
|
||||
}
|
||||
|
@ -28,7 +28,11 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
|
||||
FetchContent_Populate(HDF5_ZLIB)
|
||||
|
||||
# Copy an additional/replacement files into the populated source
|
||||
file(COPY ${HDF_RESOURCES_DIR}/ZLIB/CMakeLists.txt DESTINATION ${hdf5_zlib_SOURCE_DIR})
|
||||
if (HDF5_USE_ZLIB_NG)
|
||||
file(COPY ${HDF_RESOURCES_DIR}/ZLIBNG/CMakeLists.txt DESTINATION ${hdf5_zlib_SOURCE_DIR})
|
||||
else ()
|
||||
file(COPY ${HDF_RESOURCES_DIR}/ZLIB/CMakeLists.txt DESTINATION ${hdf5_zlib_SOURCE_DIR})
|
||||
endif ()
|
||||
|
||||
add_subdirectory(${hdf5_zlib_SOURCE_DIR} ${hdf5_zlib_BINARY_DIR})
|
||||
endif()
|
||||
|
@ -5,6 +5,8 @@ PROJECT (LIBAEC C)
|
||||
# Basic LIBAEC stuff here
|
||||
#-----------------------------------------------------------------------------
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set (LIBAEC_PACKAGE_EXT ${HDF_PACKAGE_EXT})
|
||||
set (HDF_USE_GNU_DIRS ${HDF5_USE_GNU_DIRS})
|
||||
@ -20,10 +22,12 @@ if (WINDOWS)
|
||||
endif ()
|
||||
|
||||
if (NOT WINDOWS)
|
||||
TEST_BIG_ENDIAN (WORDS_BIGENDIAN)
|
||||
include(TestBigEndian)
|
||||
test_big_endian(WORDS_BIGENDIAN)
|
||||
endif ()
|
||||
|
||||
# Check for __builtin_clzll for faster decoding
|
||||
include(CheckCSourceCompiles)
|
||||
check_c_source_compiles(
|
||||
"int main(void)\n{return __builtin_clzll(1LL);}"
|
||||
HAVE_DECL___BUILTIN_CLZLL)
|
||||
@ -36,6 +40,13 @@ return _BitScanReverse64(&foo, bar);}"
|
||||
HAVE_BSR64)
|
||||
endif()
|
||||
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
|
||||
if(NOT HAVE_SNPRINTF)
|
||||
check_symbol_exists(_snprintf "stdio.h" HAVE__SNPRINTF)
|
||||
check_symbol_exists(_snprintf_s "stdio.h" HAVE__SNPRINTF_S)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define some CMake variables for use later in the project
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -62,8 +73,8 @@ set (LIBAEC_LIB_TARGET "${LIBAEC_LIB_CORENAME}-static")
|
||||
set (SZIP_LIB_TARGET "${SZIP_LIB_CORENAME}-static")
|
||||
|
||||
set (libaec_VERS_MAJOR 1)
|
||||
set (libaec_VERS_MINOR 0)
|
||||
set (libaec_VERS_RELEASE 6)
|
||||
set (libaec_VERS_MINOR 1)
|
||||
set (libaec_VERS_RELEASE 3)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
set (LIBAEC_PACKAGE "libaec")
|
||||
@ -142,6 +153,10 @@ endif ()
|
||||
# Generate the aec_config.h file containing user settings needed by compilation
|
||||
#-----------------------------------------------------------------------------
|
||||
configure_file (${LIBAEC_RESOURCES_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
# Create libaec.h with current version information
|
||||
configure_file(
|
||||
"include/libaec.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libaec.h")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# All libs/tests/examples need the main include directories
|
||||
@ -157,10 +172,11 @@ set(LIBAEC_SRCS
|
||||
${LIBAEC_SRC_DIR}/encode.c
|
||||
${LIBAEC_SRC_DIR}/encode_accessors.c
|
||||
${LIBAEC_SRC_DIR}/decode.c
|
||||
${LIBAEC_SRC_DIR}/vector.c
|
||||
)
|
||||
|
||||
set (LIBAEC_PUBLIC_HEADERS
|
||||
${LIBAEC_INC_DIR}/libaec.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libaec.h
|
||||
)
|
||||
|
||||
add_library (${LIBAEC_LIB_TARGET} STATIC ${LIBAEC_SRCS} ${LIBAEC_PUBLIC_HEADERS})
|
||||
@ -224,18 +240,6 @@ endif ()
|
||||
|
||||
include (CMakePackageConfigHelpers)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check for Installation Utilities
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
set (PF_ENV_EXT "(x86)")
|
||||
find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles${PF_ENV_EXT}}\\NSIS")
|
||||
if(NOT CPACK_WIX_ROOT)
|
||||
file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
|
||||
endif ()
|
||||
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add Target(s) to CMake Install for import into other projects
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -324,145 +328,3 @@ if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
|
||||
)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check for Installation Utilities
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
set (PF_ENV_EXT "(x86)")
|
||||
find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles${PF_ENV_EXT}}\\NSIS")
|
||||
if(NOT CPACK_WIX_ROOT)
|
||||
file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
|
||||
endif()
|
||||
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
|
||||
endif ()
|
||||
|
||||
configure_file (${LIBAEC_SOURCE_DIR}/LICENSE.txt ${LIBAEC_BINARY_DIR}/LIBAEC_LICENSE.txt @ONLY)
|
||||
configure_file (${LIBAEC_SOURCE_DIR}/README.SZIP ${LIBAEC_BINARY_DIR}/LIBAEC_README.SZIP @ONLY)
|
||||
configure_file (${LIBAEC_SOURCE_DIR}/README.md ${LIBAEC_BINARY_DIR}/LIBAEC_README.md @ONLY)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the cpack variables
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
|
||||
set (CPACK_PACKAGE_VENDOR "HDF_Group")
|
||||
set (CPACK_PACKAGE_NAME "${LIBAEC_PACKAGE_NAME}")
|
||||
if (NOT WIN32 OR LIBAEC_VERS_SUBRELEASE MATCHES "^[0-9]+$")
|
||||
set (CPACK_PACKAGE_VERSION "${LIBAEC_PACKAGE_VERSION_STRING}")
|
||||
else ()
|
||||
set (CPACK_PACKAGE_VERSION "${LIBAEC_PACKAGE_VERSION}")
|
||||
endif ()
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR "${LIBAEC_PACKAGE_VERSION_MAJOR}")
|
||||
set (CPACK_PACKAGE_VERSION_MINOR "${LIBAEC_PACKAGE_VERSION_MINOR}")
|
||||
set (CPACK_PACKAGE_VERSION_PATCH "")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${LIBAEC_BINARY_DIR}/LIBAEC_LICENSE.txt")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_FILE "${LIBAEC_BINARY_DIR}/LIBAEC_README.SZIP")
|
||||
set (CPACK_RESOURCE_FILE_README "${LIBAEC_BINARY_DIR}/LIBAEC_README.md")
|
||||
set (CPACK_PACKAGE_RELOCATABLE TRUE)
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "libaec - Adaptive Entropy Coding library by Deutsches Klimarechenzentrum GmbH")
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
|
||||
|
||||
set (CPACK_GENERATOR "TGZ")
|
||||
if (WIN32)
|
||||
set (CPACK_GENERATOR "ZIP")
|
||||
|
||||
if (NSIS_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "NSIS")
|
||||
endif ()
|
||||
# Installers for 32- vs. 64-bit CMake:
|
||||
# - Root install directory (displayed to end user at installer-run time)
|
||||
# - "NSIS package/display name" (text used in the installer GUI)
|
||||
# - Registry key used to store info about the installation
|
||||
set (CPACK_NSIS_PACKAGE_NAME "${LIBAEC_PACKAGE_STRING}")
|
||||
if (CMAKE_CL_64)
|
||||
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
|
||||
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)")
|
||||
else ()
|
||||
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
|
||||
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
|
||||
endif ()
|
||||
set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
|
||||
set (CPACK_NSIS_CONTACT "${LIBAEC_PACKAGE_BUGREPORT}")
|
||||
set (CPACK_NSIS_MODIFY_PATH ON)
|
||||
set (CPACK_NSIS_PACKAGE_NAME "LIBAEC ${LIBAEC_PACKAGE_VERSION}")
|
||||
if (WIX_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "WIX")
|
||||
endif ()
|
||||
#WiX variables
|
||||
set (CPACK_WIX_UNINSTALL "1")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${LIBAEC_BINARY_DIR}/LIBAEC_LICENSE.txt")
|
||||
elseif (APPLE)
|
||||
list (APPEND CPACK_GENERATOR "STGZ")
|
||||
list (APPEND CPACK_GENERATOR "DragNDrop")
|
||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
#set (CPACK_PACKAGE_ICON "${LIBAEC_RESOURCES_DIR}/hdf.icns")
|
||||
|
||||
option (LIBAEC_PACK_MACOSX_FRAMEWORK "Package the LIBAEC Library in a Framework" OFF)
|
||||
if (LIBAEC_PACK_MACOSX_FRAMEWORK AND LIBAEC_BUILD_FRAMEWORKS)
|
||||
set (CPACK_BUNDLE_NAME "${LIBAEC_PACKAGE_STRING}")
|
||||
set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
|
||||
set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
|
||||
set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the Info.plist file for the install bundle
|
||||
#-----------------------------------------------------------------------------
|
||||
configure_file (
|
||||
${LIBAEC_RESOURCES_DIR}/CPack.Info.plist.in
|
||||
${LIBAEC_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
|
||||
)
|
||||
configure_file (
|
||||
${LIBAEC_RESOURCES_DIR}/PkgInfo.in
|
||||
${LIBAEC_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${LIBAEC_BINARY_DIR}/CMakeFiles/PkgInfo
|
||||
DESTINATION ..
|
||||
)
|
||||
endif ()
|
||||
else ()
|
||||
list (APPEND CPACK_GENERATOR "STGZ")
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
|
||||
set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
|
||||
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${LIBAEC_PACKAGE_BUGREPORT}")
|
||||
|
||||
# list (APPEND CPACK_GENERATOR "RPM")
|
||||
set (CPACK_RPM_PACKAGE_RELEASE "1")
|
||||
set (CPACK_RPM_COMPONENT_INSTALL ON)
|
||||
set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
|
||||
endif ()
|
||||
|
||||
# By default, do not warn when built on machines using only VS Express:
|
||||
if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
||||
endif ()
|
||||
include (InstallRequiredSystemLibraries)
|
||||
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${LIBAEC_BINARY_DIR};LIBAEC;libraries;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${LIBAEC_BINARY_DIR};LIBAEC;configinstall;/")
|
||||
|
||||
set (CPACK_ALL_INSTALL_TYPES Full Developer User)
|
||||
set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything")
|
||||
|
||||
set(CPACK_COMPONENTS_ALL libraries headers documents configinstall)
|
||||
|
||||
include (CPack)
|
||||
|
||||
cpack_add_component_group(Runtime)
|
||||
|
||||
cpack_add_component (libraries
|
||||
DISPLAY_NAME "LIBAEC Libraries"
|
||||
REQUIRED
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
cpack_add_component (configinstall
|
||||
DISPLAY_NAME "LIBAEC CMake files"
|
||||
DEPENDS libraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
@ -1,36 +1,6 @@
|
||||
#cmakedefine WORDS_BIGENDIAN
|
||||
#cmakedefine01 HAVE_DECL___BUILTIN_CLZLL
|
||||
#cmakedefine01 HAVE_BSR64
|
||||
#cmakedefine HAVE_BSR64
|
||||
#cmakedefine HAVE_SNPRINTF
|
||||
#cmakedefine HAVE__SNPRINTF
|
||||
#cmakedefine HAVE__SNPRINTF_S
|
||||
|
||||
/* Name of package */
|
||||
#cmakedefine LIBAEC_PACKAGE "@LIBAEC_PACKAGE@"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#cmakedefine LIBAEC_PACKAGE_BUGREPORT "@LIBAEC_PACKAGE_BUGREPORT@"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#cmakedefine LIBAEC_PACKAGE_NAME "@LIBAEC_PACKAGE_NAME@"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#cmakedefine LIBAEC_PACKAGE_STRING "@LIBAEC_PACKAGE_STRING@"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#cmakedefine LIBAEC_PACKAGE_TARNAME "@LIBAEC_PACKAGE_TARNAME@"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#cmakedefine LIBAEC_PACKAGE_VERSION "@LIBAEC_PACKAGE_VERSION@"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#cmakedefine STDC_HEADERS @STDC_HEADERS@
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "@LIBAEC_PACKAGE_VERSION@"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#cmakedefine const
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#cmakedefine size_t
|
||||
|
@ -1,42 +1,15 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
# LIBAEC Version file for install directory
|
||||
#-----------------------------------------------------------------------------
|
||||
set(PACKAGE_VERSION_MAJOR @PROJECT_VERSION_MAJOR@)
|
||||
set(PACKAGE_VERSION_MINOR @PROJECT_VERSION_MINOR@)
|
||||
set(PACKAGE_VERSION_PATCH @PROJECT_VERSION_PATCH@)
|
||||
set(PACKAGE_VERSION @PROJECT_VERSION@)
|
||||
|
||||
set (PACKAGE_VERSION "@LIBAEC_VERSION_STRING@")
|
||||
|
||||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
|
||||
# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION OR
|
||||
PACKAGE_VERSION_MAJOR GREATER PACKAGE_FIND_VERSION_MAJOR)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
if ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@LIBAEC_VERSION_MAJOR@")
|
||||
|
||||
# exact match for version @LIBAEC_VERSION_MAJOR@.@LIBAEC_VERSION_MINOR@
|
||||
if ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@LIBAEC_VERSION_MINOR@")
|
||||
|
||||
# compatible with any version @LIBAEC_VERSION_MAJOR@.@LIBAEC_VERSION_MINOR@.x
|
||||
set (PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
|
||||
if ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@LIBAEC_VERSION_RELEASE@")
|
||||
set (PACKAGE_VERSION_EXACT TRUE)
|
||||
|
||||
if ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@LIBAEC_VERSION_SUBRELEASE@")
|
||||
# not using this yet
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
set (PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
|
||||
return()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
||||
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
|
||||
|
@ -1,59 +1,101 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
# LIBAEC Config file for compiling against LIBAEC build directory
|
||||
#-----------------------------------------------------------------------------
|
||||
@PACKAGE_INIT@
|
||||
# libaec-config.cmake
|
||||
# ----------------
|
||||
#
|
||||
# Finds the AEC library, specify the starting search path in libaec_ROOT.
|
||||
#
|
||||
# Static vs. shared
|
||||
# -----------------
|
||||
# To make use of the static library instead of the shared one, one needs
|
||||
# to set the variable libaec_USE_STATIC_LIBS to ON before calling find_package.
|
||||
# Example:
|
||||
# set(libaec_USE_STATIC_LIBS ON)
|
||||
# find_package(libaec CONFIG)
|
||||
#
|
||||
# This will define the following variables:
|
||||
#
|
||||
# libaec_FOUND - True if the system has the AEC library.
|
||||
# libaec_VERSION - The version of the AEC library which was found.
|
||||
# SZIP_FOUND - True if the system has the SZIP library.
|
||||
# SZIP_VERSION - The version of the SZIP library which was found.
|
||||
# SZIP_LIBRARIES - All the required libraries to make use of SZIP.
|
||||
#
|
||||
# and the following imported targets:
|
||||
#
|
||||
# libaec::aec - The AEC library.
|
||||
# libaec::sz - The SZIP compatible version of the AEC library.
|
||||
|
||||
string(TOUPPER @LIBAEC_PACKAGE@ LIBAEC_PACKAGE_NAME)
|
||||
|
||||
set (${LIBAEC_PACKAGE_NAME}_VALID_COMPONENTS static shared)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# User Options
|
||||
#-----------------------------------------------------------------------------
|
||||
set (${LIBAEC_PACKAGE_NAME}_ENABLE_ENCODING @LIBAEC_ENABLE_ENCODING@)
|
||||
set (${LIBAEC_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
|
||||
set (${LIBAEC_PACKAGE_NAME}_EXPORT_LIBRARIES @LIBAEC_LIBRARIES_TO_EXPORT@)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Directories
|
||||
#-----------------------------------------------------------------------------
|
||||
set (${LIBAEC_PACKAGE_NAME}_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
||||
|
||||
set (${LIBAEC_PACKAGE_NAME}_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@")
|
||||
set_and_check (${LIBAEC_PACKAGE_NAME}_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Version Strings
|
||||
#-----------------------------------------------------------------------------
|
||||
set (${LIBAEC_PACKAGE_NAME}_VERSION_STRING @LIBAEC_VERSION_STRING@)
|
||||
set (${LIBAEC_PACKAGE_NAME}_VERSION_MAJOR @LIBAEC_VERSION_MAJOR@)
|
||||
set (${LIBAEC_PACKAGE_NAME}_VERSION_MINOR @LIBAEC_VERSION_MINOR@)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Don't include targets if this file is being picked up by another
|
||||
# project which has already build LIBAEC as a subproject
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT TARGET "@LIBAEC_PACKAGE@")
|
||||
include (@PACKAGE_SHARE_INSTALL_DIR@/@LIBAEC_PACKAGE@@LIBAEC_PACKAGE_EXT@-targets.cmake)
|
||||
find_path(libaec_INCLUDE_DIR NAMES libaec.h DOC "AEC include directory")
|
||||
find_path(SZIP_INCLUDE_DIR NAMES szlib.h DOC "SZIP include directory")
|
||||
if (libaec_USE_STATIC_LIBS)
|
||||
if (MSVC)
|
||||
find_library(libaec_LIBRARY NAMES aec-static.lib DOC "AEC library")
|
||||
find_library(SZIP_LIBRARY NAMES szip-static.lib DOC "SZIP compatible version of the AEC library")
|
||||
else ()
|
||||
find_library(libaec_LIBRARY NAMES libaec.a DOC "AEC library")
|
||||
find_library(SZIP_LIBRARY NAMES libsz.a DOC "SZIP compatible version of the AEC library")
|
||||
endif ()
|
||||
else ()
|
||||
find_library(libaec_LIBRARY NAMES aec DOC "AEC library")
|
||||
find_library(SZIP_LIBRARY NAMES sz szip DOC "SZIP compatible version of the AEC library")
|
||||
endif ()
|
||||
|
||||
# Handle default component(static) :
|
||||
if (NOT ${LIBAEC_PACKAGE_NAME}_FIND_COMPONENTS)
|
||||
set (${LIBAEC_PACKAGE_NAME}_FIND_COMPONENTS static)
|
||||
set (${LIBAEC_PACKAGE_NAME}_FIND_REQUIRED_static true)
|
||||
# Check version here
|
||||
if (libaec_INCLUDE_DIR AND libaec_LIBRARY)
|
||||
set(libaec_VERSION "@PROJECT_VERSION@")
|
||||
set(SZIP_VERSION "2.0.1")
|
||||
endif ()
|
||||
|
||||
# Handle requested components:
|
||||
list (REMOVE_DUPLICATES ${LIBAEC_PACKAGE_NAME}_FIND_COMPONENTS)
|
||||
foreach (comp IN LISTS ${LIBAEC_PACKAGE_NAME}_FIND_COMPONENTS)
|
||||
list (FIND ${LIBAEC_PACKAGE_NAME}_EXPORT_LIBRARIES "@LIBAEC_LIB_CORENAME@-${comp}" HAVE_COMP)
|
||||
if (${HAVE_COMP} LESS 0)
|
||||
set (${LIBAEC_PACKAGE_NAME}_${comp}_FOUND 0)
|
||||
else ()
|
||||
set (${LIBAEC_PACKAGE_NAME}_${comp}_FOUND 1)
|
||||
string(TOUPPER ${LIBAEC_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY)
|
||||
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @LIBAEC_LIB_CORENAME@-${comp})
|
||||
include(FindPackageHandleStandardArgs)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE_CURRENT_LIST_FILE}")
|
||||
find_package_handle_standard_args(libaec
|
||||
FOUND_VAR libaec_FOUND
|
||||
REQUIRED_VARS libaec_LIBRARY libaec_INCLUDE_DIR SZIP_LIBRARY SZIP_INCLUDE_DIR
|
||||
VERSION_VAR libaec_VERSION
|
||||
CONFIG_MODE
|
||||
)
|
||||
|
||||
if (libaec_FOUND)
|
||||
if (libaec_USE_STATIC_LIBS)
|
||||
add_library(libaec::aec STATIC IMPORTED)
|
||||
else ()
|
||||
add_library(libaec::aec SHARED IMPORTED)
|
||||
target_compile_definitions(libaec::aec INTERFACE LIBAEC_SHARED)
|
||||
if (MSVC)
|
||||
set_target_properties(libaec::aec PROPERTIES
|
||||
IMPORTED_IMPLIB "${libaec_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
set_target_properties(libaec::aec PROPERTIES
|
||||
IMPORTED_LOCATION "${libaec_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libaec_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
check_required_components (${LIBAEC_PACKAGE_NAME})
|
||||
# SZIP
|
||||
if (libaec_USE_STATIC_LIBS)
|
||||
add_library(libaec::sz STATIC IMPORTED)
|
||||
else ()
|
||||
add_library(libaec::sz SHARED IMPORTED)
|
||||
target_compile_definitions(libaec::sz INTERFACE LIBAEC_SHARED)
|
||||
if (MSVC)
|
||||
set_target_properties(libaec::sz PROPERTIES
|
||||
IMPORTED_IMPLIB "${SZIP_LIBRARY}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
set_target_properties(libaec::sz PROPERTIES
|
||||
IMPORTED_LOCATION "${SZIP_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SZIP_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
# Set SZIP variables.
|
||||
set(SZIP_FOUND TRUE)
|
||||
set(SZIP_LIBRARIES "${SZIP_LIBRARY}")
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(
|
||||
libaec_LIBRARY
|
||||
libaec_INCLUDE_DIR
|
||||
SZIP_LIBRARY
|
||||
SZIP_INCLUDE_DIR
|
||||
)
|
||||
|
@ -1,5 +1,9 @@
|
||||
cmake_minimum_required (VERSION 3.12)
|
||||
PROJECT (ZLIB C)
|
||||
cmake_minimum_required(VERSION 3.12.0)
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
|
||||
project(ZLIB C)
|
||||
|
||||
set(VERSION "1.3")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Basic ZLIB stuff here
|
||||
@ -16,12 +20,6 @@ if (WINDOWS)
|
||||
set (HAVE_STDDEF_H 1)
|
||||
set (HAVE_SYS_TYPES_H 1)
|
||||
endif ()
|
||||
#
|
||||
# Check for unistd.h
|
||||
#
|
||||
check_include_file(unistd.h Z_HAVE_UNISTD_H)
|
||||
CHECK_FUNCTION_EXISTS (memcpy HAVE_MEMCPY)
|
||||
CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define some CMake variables for use later in the project
|
||||
@ -29,66 +27,6 @@ CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
|
||||
set (ZLIB_RESOURCES_DIR ${HDF_RESOURCES_DIR}/ZLIB)
|
||||
set (ZLIB_SRC_DIR ${ZLIB_SOURCE_DIR})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the core names of all the libraries
|
||||
#-----------------------------------------------------------------------------
|
||||
set (ZLIB_LIB_CORENAME "zlib")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the true names of all the libraries if customized by external project
|
||||
#-----------------------------------------------------------------------------
|
||||
set (ZLIB_LIB_NAME "${ZLIB_EXTERNAL_LIB_PREFIX}${ZLIB_LIB_CORENAME}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the target names of all the libraries
|
||||
#-----------------------------------------------------------------------------
|
||||
set (ZLIB_LIB_TARGET "${ZLIB_LIB_CORENAME}-static")
|
||||
|
||||
set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc)
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein ${ZLIB_PC} @ONLY)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generate the zconf.h file containing user settings needed by compilation
|
||||
#-----------------------------------------------------------------------------
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
|
||||
|
||||
if (DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
|
||||
set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# parse the full version number from zlib.h and include in ZLIB_VERS_INFO
|
||||
#-----------------------------------------------------------------------------
|
||||
file (READ ${ZLIB_SRC_DIR}/zlib.h _zlib_h_contents)
|
||||
string (REGEX REPLACE ".*#define[ \t]+ZLIB_VER_MAJOR[ \t]+([0-9]*).*$"
|
||||
"\\1" ZLIB_VERS_MAJOR ${_zlib_h_contents})
|
||||
string (REGEX REPLACE ".*#define[ \t]+ZLIB_VER_MINOR[ \t]+([0-9]*).*$"
|
||||
"\\1" ZLIB_VERS_MINOR ${_zlib_h_contents})
|
||||
string (REGEX REPLACE ".*#define[ \t]+ZLIB_VER_REVISION[ \t]+([0-9]*).*$"
|
||||
"\\1" ZLIB_VERS_RELEASE ${_zlib_h_contents})
|
||||
string (REGEX REPLACE ".*#define[ \t]+ZLIB_VER_SUBREVISION[ \t]+([0-9]*).*$"
|
||||
"\\1" ZLIB_VERS_SUBRELEASE ${_zlib_h_contents})
|
||||
#message (STATUS "VERSION: ${ZLIB_VERS_MAJOR}.${ZLIB_VERS_MINOR}.${ZLIB_VERS_RELEASE}-${ZLIB_VERS_SUBRELEASE}")
|
||||
string (REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([0-9A-Za-z.]+)\".*"
|
||||
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
|
||||
#message (STATUS "VERSION: ${ZLIB_FULL_VERSION}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
set (ZLIB_PACKAGE "zlib")
|
||||
set (ZLIB_PACKAGE_NAME "ZLIB")
|
||||
set (ZLIB_PACKAGE_VERSION "${ZLIB_VERS_MAJOR}.${ZLIB_VERS_MINOR}")
|
||||
set (ZLIB_PACKAGE_VERSION_MAJOR "${ZLIB_VERS_MAJOR}.${ZLIB_VERS_MINOR}")
|
||||
set (ZLIB_PACKAGE_VERSION_MINOR "${ZLIB_VERS_RELEASE}")
|
||||
set (ZLIB_PACKAGE_STRING "${ZLIB_PACKAGE_NAME} ${ZLIB_PACKAGE_VERSION}-${ZLIB_VERS_SUBRELEASE}")
|
||||
set (ZLIB_PACKAGE_TARNAME "zlib")
|
||||
set (ZLIB_PACKAGE_URL "http://www.hdfgroup.org")
|
||||
set (ZLIB_PACKAGE_BUGREPORT "help@hdfgroup.org")
|
||||
set (ZLIB_PACKAGE_SOVERSION "${ZLIB_VERS_MAJOR}.${ZLIB_VERS_MINOR}.${ZLIB_VERS_RELEASE}")
|
||||
set (ZLIB_PACKAGE_SOVERSION_MAJOR "${ZLIB_VERS_MAJOR}")
|
||||
|
||||
|
||||
HDF_DIR_PATHS(${ZLIB_PACKAGE_NAME})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Targets built within this project are exported at Install time for use
|
||||
# by other projects
|
||||
@ -97,51 +35,9 @@ if (NOT ZLIB_EXPORTED_TARGETS)
|
||||
set (ZLIB_EXPORTED_TARGETS "zlib-targets")
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# To include a library in the list exported by the project AT BUILD TIME,
|
||||
# add it to this variable. This is NOT used by Make Install, but for projects
|
||||
# which include zlib as a sub-project within their build tree
|
||||
#-----------------------------------------------------------------------------
|
||||
set_global_variable (ZLIB_LIBRARIES_TO_EXPORT "")
|
||||
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# When building utility executables that generate other (source) files :
|
||||
# we make use of the following variables defined in the root CMakeLists.
|
||||
# Certain systems may add /Debug or /Release to output paths
|
||||
# and we need to call the executable from inside the CMake configuration
|
||||
#-----------------------------------------------------------------------------
|
||||
set (EXE_EXT "")
|
||||
if (WIN32)
|
||||
set (EXE_EXT ".exe")
|
||||
add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions (-D_CONSOLE)
|
||||
add_definitions (-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif ()
|
||||
|
||||
if (MSVC)
|
||||
set (CMAKE_MFC_FLAG 0)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Compiler specific flags : Shouldn't there be compiler tests for these
|
||||
#-----------------------------------------------------------------------------
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -Wno-strict-prototypes -Wno-implicit-function-declaration")
|
||||
endif ()
|
||||
if (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -Wno-implicit-function-declaration")
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# This is in here to help some of the GCC based IDES like Eclipse
|
||||
# and code blocks parse the compiler errors and warnings better.
|
||||
#-----------------------------------------------------------------------------
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
|
||||
endif ()
|
||||
HDF_DIR_PATHS(ZLIB)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# All libs/tests/examples need the main include directories
|
||||
@ -150,13 +46,79 @@ set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES
|
||||
"${ZLIB_BINARY_DIR};${ZLIB_SOURCE_DIR};${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
||||
)
|
||||
|
||||
include(CheckTypeSize)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||
|
||||
#
|
||||
# Check to see if we have large file support
|
||||
#
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
|
||||
# We add these other definitions here because CheckTypeSize.cmake
|
||||
# in CMake 2.4.x does not automatically do so and we want
|
||||
# compatibility with CMake 2.4.x.
|
||||
if(HAVE_SYS_TYPES_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
|
||||
endif()
|
||||
if(HAVE_STDINT_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
|
||||
endif()
|
||||
if(HAVE_STDDEF_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
|
||||
endif()
|
||||
check_type_size(off64_t OFF64_T)
|
||||
if(HAVE_OFF64_T)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE=1)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
||||
|
||||
#
|
||||
# Check for fseeko
|
||||
#
|
||||
check_function_exists(fseeko HAVE_FSEEKO)
|
||||
if(NOT HAVE_FSEEKO)
|
||||
add_definitions(-DNO_FSEEKO)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Check for unistd.h
|
||||
#
|
||||
check_include_file(unistd.h Z_HAVE_UNISTD_H)
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions (-D_CONSOLE)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
# If we're doing an out of source build and the user has a zconf.h
|
||||
# in their source tree...
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
|
||||
message(STATUS "Renaming")
|
||||
message(STATUS " ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h")
|
||||
message(STATUS "to 'zconf.h.included' because this file is included with zlib")
|
||||
message(STATUS "but CMake generates it automatically in the build directory.")
|
||||
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)
|
||||
endif()
|
||||
endif()
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
||||
|
||||
|
||||
#============================================================================
|
||||
# zlib
|
||||
#============================================================================
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define zlib Library
|
||||
#-----------------------------------------------------------------------------
|
||||
set(ZLIB_PUBLIC_HDRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
|
||||
zlib.h
|
||||
@ -190,77 +152,47 @@ set(ZLIB_SRCS
|
||||
zutil.c
|
||||
)
|
||||
|
||||
if(NOT MINGW)
|
||||
set(ZLIB_DLL_SRCS
|
||||
win32/zlib1.rc # If present will override custom build rule below.
|
||||
)
|
||||
endif()
|
||||
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
|
||||
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
|
||||
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
if(ASM686)
|
||||
set(ZLIB_ASMS contrib/asm686/match.S)
|
||||
elseif (AMD64)
|
||||
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
|
||||
endif ()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV)
|
||||
set_source_files_properties (${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if(ASM686)
|
||||
enable_language(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx86/inffas32.asm
|
||||
contrib/masmx86/match686.asm
|
||||
)
|
||||
elseif (AMD64)
|
||||
enable_language(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx64/gvmat64.asm
|
||||
contrib/masmx64/inffasx64.asm
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV -DASMINF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
COMMAND ${CMAKE_RC_COMPILER}
|
||||
-D GCC_WINDRES
|
||||
-I ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I ${CMAKE_CURRENT_BINARY_DIR}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
|
||||
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
||||
endif()
|
||||
|
||||
add_library (${ZLIB_LIB_TARGET} STATIC ${ZLIB_SRCS} ${ZLIB_PRIVATE_HDRS} ${ZLIB_PUBLIC_HDRS})
|
||||
add_library(zlib-static STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
if (MSVC AND CMAKE_CL_64)
|
||||
set_target_properties (${ZLIB_LIB_TARGET} PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
|
||||
set_target_properties (zlib-static PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
|
||||
endif ()
|
||||
target_include_directories(${ZLIB_LIB_TARGET} PRIVATE "${CMAKE_BINARY_DIR}")
|
||||
TARGET_C_PROPERTIES (${ZLIB_LIB_TARGET} STATIC)
|
||||
target_link_libraries (${ZLIB_LIB_TARGET} PRIVATE ${LINK_LIBS})
|
||||
H5_SET_LIB_OPTIONS (${ZLIB_LIB_TARGET} ${ZLIB_LIB_NAME} STATIC 0)
|
||||
set_target_properties(${ZLIB_LIB_TARGET} PROPERTIES
|
||||
target_include_directories(zlib-static PRIVATE "${CMAKE_BINARY_DIR}")
|
||||
set_target_properties(zlib-static PROPERTIES
|
||||
PUBLIC_HEADER ""
|
||||
LINKER_LANGUAGE C
|
||||
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
||||
)
|
||||
set_global_variable (ZLIB_LIBRARIES_TO_EXPORT ${ZLIB_LIB_TARGET})
|
||||
set (install_targets ${ZLIB_LIB_TARGET})
|
||||
set_global_variable (ZLIB_LIBRARIES_TO_EXPORT "zlib-static")
|
||||
set (install_targets zlib-static)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Compiler specific flags : Shouldn't there be compiler tests for these
|
||||
#-----------------------------------------------------------------------------
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(zlib-static PRIVATE -Wno-strict-prototypes -Wno-implicit-function-declaration)
|
||||
endif ()
|
||||
if (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
|
||||
target_compile_options(zlib-static PRIVATE -Wno-implicit-function-declaration)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# This is in here to help some of the GCC based IDES like Eclipse
|
||||
# and code blocks parse the compiler errors and warnings better.
|
||||
#-----------------------------------------------------------------------------
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(zlib-static PRIVATE -fmessage-length=0)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add Target(s) to CMake Install for import into other projects
|
||||
#-----------------------------------------------------------------------------
|
||||
if (ZLIB_EXPORTED_TARGETS)
|
||||
INSTALL_TARGET_PDB (${ZLIB_LIB_TARGET} ${ZLIB_INSTALL_BIN_DIR} libraries)
|
||||
INSTALL_TARGET_PDB (zlib-static ${ZLIB_INSTALL_BIN_DIR} libraries)
|
||||
|
||||
install (
|
||||
TARGETS
|
||||
@ -277,57 +209,6 @@ endif ()
|
||||
|
||||
include (CMakePackageConfigHelpers)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check for Installation Utilities
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
set (PF_ENV_EXT "(x86)")
|
||||
find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles${PF_ENV_EXT}}\\NSIS")
|
||||
if(NOT CPACK_WIX_ROOT)
|
||||
file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
|
||||
endif ()
|
||||
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add Target(s) to CMake Install for import into other projects
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT ZLIB_EXTERNALLY_CONFIGURED)
|
||||
install (
|
||||
EXPORT ${ZLIB_EXPORTED_TARGETS}
|
||||
DESTINATION ${ZLIB_INSTALL_CMAKE_DIR}
|
||||
FILE ${ZLIB_PACKAGE}${ZLIB_PACKAGE_EXT}-targets.cmake
|
||||
NAMESPACE ${PACKAGE_NAMESPACE}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Export all exported targets to the build tree for use by parent project
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT ZLIB_EXTERNALLY_CONFIGURED)
|
||||
export (
|
||||
TARGETS ${ZLIB_LIBRARIES_TO_EXPORT} ${ZLIB_LIB_DEPENDENCIES}
|
||||
FILE ${ZLIB_PACKAGE}${ZLIB_PACKAGE_EXT}-targets.cmake
|
||||
NAMESPACE ${PACKAGE_NAMESPACE}
|
||||
)
|
||||
export (PACKAGE ${ZLIB_PACKAGE}${ZLIB_PACKAGE_EXT})
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set includes needed for build
|
||||
#-----------------------------------------------------------------------------
|
||||
set (ZLIB_INCLUDES_BUILD_TIME
|
||||
${ZLIB_SRC_DIR} ${ZLIB_BINARY_DIR}
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set variables needed for installation
|
||||
#-----------------------------------------------------------------------------
|
||||
set (ZLIB_VERSION_STRING ${ZLIB_PACKAGE_VERSION})
|
||||
set (ZLIB_VERSION_MAJOR ${ZLIB_PACKAGE_VERSION_MAJOR})
|
||||
set (ZLIB_VERSION_MINOR ${ZLIB_PACKAGE_VERSION_MINOR})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the zlib-config.cmake file for the build directory
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -336,7 +217,7 @@ set (SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/${ZLIB_INSTALL_CMAKE_DIR}" )
|
||||
set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
configure_package_config_file (
|
||||
${ZLIB_RESOURCES_DIR}/zlib-config.cmake.in
|
||||
"${ZLIB_BINARY_DIR}/${ZLIB_PACKAGE}${ZLIB_PACKAGE_EXT}-config.cmake"
|
||||
"${ZLIB_BINARY_DIR}/zlib-config.cmake"
|
||||
INSTALL_DESTINATION "${ZLIB_INSTALL_CMAKE_DIR}"
|
||||
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
|
||||
INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
@ -350,13 +231,13 @@ set (SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${ZLIB_INSTALL_CMAKE_DIR}" )
|
||||
set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" )
|
||||
configure_package_config_file (
|
||||
${ZLIB_RESOURCES_DIR}/zlib-config.cmake.in
|
||||
"${ZLIB_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${ZLIB_PACKAGE}${ZLIB_PACKAGE_EXT}-config.cmake"
|
||||
"${ZLIB_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/zlib-config.cmake"
|
||||
INSTALL_DESTINATION "${ZLIB_INSTALL_CMAKE_DIR}"
|
||||
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
|
||||
)
|
||||
if (NOT ZLIB_EXTERNALLY_CONFIGURED)
|
||||
install (
|
||||
FILES ${ZLIB_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${ZLIB_PACKAGE}${ZLIB_PACKAGE_EXT}-config.cmake
|
||||
FILES ${ZLIB_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/zlib-config.cmake
|
||||
DESTINATION ${ZLIB_INSTALL_CMAKE_DIR}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
@ -368,160 +249,37 @@ endif ()
|
||||
if (NOT ZLIB_EXTERNALLY_CONFIGURED)
|
||||
configure_file (
|
||||
${ZLIB_RESOURCES_DIR}/zlib-config-version.cmake.in
|
||||
${ZLIB_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${ZLIB_PACKAGE}${ZLIB_PACKAGE_EXT}-config-version.cmake @ONLY
|
||||
${ZLIB_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/zlib-config-version.cmake @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${ZLIB_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${ZLIB_PACKAGE}${ZLIB_PACKAGE_EXT}-config-version.cmake
|
||||
FILES ${ZLIB_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/zlib-config-version.cmake
|
||||
DESTINATION ${ZLIB_INSTALL_CMAKE_DIR}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check for Installation Utilities
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
set (PF_ENV_EXT "(x86)")
|
||||
find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles${PF_ENV_EXT}}\\NSIS")
|
||||
if(NOT CPACK_WIX_ROOT)
|
||||
file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
|
||||
endif()
|
||||
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the LICENSE.txt file for the windows binary package
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
configure_file (${ZLIB_SOURCE_DIR}/LICENSE ${ZLIB_BINARY_DIR}/ZLIB_LICENSE.txt @ONLY)
|
||||
else ()
|
||||
configure_file (${ZLIB_SOURCE_DIR}/LICENSE ${ZLIB_BINARY_DIR}/ZLIB_LICENSE @ONLY)
|
||||
endif ()
|
||||
configure_file (${ZLIB_SOURCE_DIR}/README ${ZLIB_BINARY_DIR}/ZLIB_README @ONLY)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the cpack variables
|
||||
# Add Target(s) to CMake Install for import into other projects
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT ZLIB_EXTERNALLY_CONFIGURED)
|
||||
set (CPACK_PACKAGE_VENDOR "HDF_Group")
|
||||
set (CPACK_PACKAGE_NAME "${ZLIB_PACKAGE_NAME}")
|
||||
if (NOT WIN32 OR ZLIB_VERS_SUBRELEASE MATCHES "^[0-9]+$")
|
||||
set (CPACK_PACKAGE_VERSION "${ZLIB_PACKAGE_VERSION_STRING}")
|
||||
else ()
|
||||
set (CPACK_PACKAGE_VERSION "${ZLIB_PACKAGE_VERSION}")
|
||||
endif ()
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR "${ZLIB_PACKAGE_VERSION_MAJOR}")
|
||||
set (CPACK_PACKAGE_VERSION_MINOR "${ZLIB_PACKAGE_VERSION_MINOR}")
|
||||
set (CPACK_PACKAGE_VERSION_PATCH "")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${ZLIB_BINARY_DIR}/ZLIB_LICENSE")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_FILE "${ZLIB_BINARY_DIR}/ZLIB_README")
|
||||
set (CPACK_RESOURCE_FILE_README "${ZLIB_BINARY_DIR}/ZLIB_README")
|
||||
set (CPACK_PACKAGE_RELOCATABLE TRUE)
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "zlib Installation")
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
|
||||
|
||||
set (CPACK_GENERATOR "TGZ")
|
||||
if (WIN32)
|
||||
set (CPACK_GENERATOR "ZIP")
|
||||
|
||||
if (NSIS_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "NSIS")
|
||||
endif ()
|
||||
# Installers for 32- vs. 64-bit CMake:
|
||||
# - Root install directory (displayed to end user at installer-run time)
|
||||
# - "NSIS package/display name" (text used in the installer GUI)
|
||||
# - Registry key used to store info about the installation
|
||||
set (CPACK_NSIS_PACKAGE_NAME "${ZLIB_PACKAGE_STRING}")
|
||||
if (CMAKE_CL_64)
|
||||
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
|
||||
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)")
|
||||
else ()
|
||||
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
|
||||
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
|
||||
endif ()
|
||||
set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
|
||||
set (CPACK_NSIS_CONTACT "${ZLIB_PACKAGE_BUGREPORT}")
|
||||
set (CPACK_NSIS_MODIFY_PATH ON)
|
||||
set (CPACK_NSIS_PACKAGE_NAME "ZLIB ${ZLIB_PACKAGE_VERSION}")
|
||||
if (WIX_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "WIX")
|
||||
endif ()
|
||||
#WiX variables
|
||||
set (CPACK_WIX_UNINSTALL "1")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${ZLIB_BINARY_DIR}/ZLIB_LICENSE.txt")
|
||||
elseif (APPLE)
|
||||
list (APPEND CPACK_GENERATOR "STGZ")
|
||||
list (APPEND CPACK_GENERATOR "DragNDrop")
|
||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
#set (CPACK_PACKAGE_ICON "${ZLIB_RESOURCES_DIR}/hdf.icns")
|
||||
|
||||
option (ZLIB_PACK_MACOSX_FRAMEWORK "Package the ZLIB Library in a Framework" OFF)
|
||||
if (ZLIB_PACK_MACOSX_FRAMEWORK AND ZLIB_BUILD_FRAMEWORKS)
|
||||
set (CPACK_BUNDLE_NAME "${ZLIB_PACKAGE_STRING}")
|
||||
set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
|
||||
set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
|
||||
set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the Info.plist file for the install bundle
|
||||
#-----------------------------------------------------------------------------
|
||||
configure_file (
|
||||
${ZLIB_RESOURCES_DIR}/CPack.Info.plist.in
|
||||
${ZLIB_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
|
||||
)
|
||||
configure_file (
|
||||
${ZLIB_RESOURCES_DIR}/PkgInfo.in
|
||||
${ZLIB_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${ZLIB_BINARY_DIR}/CMakeFiles/PkgInfo
|
||||
DESTINATION ..
|
||||
)
|
||||
endif ()
|
||||
else ()
|
||||
list (APPEND CPACK_GENERATOR "STGZ")
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
|
||||
set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
|
||||
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${ZLIB_PACKAGE_BUGREPORT}")
|
||||
|
||||
# list (APPEND CPACK_GENERATOR "RPM")
|
||||
set (CPACK_RPM_PACKAGE_RELEASE "1")
|
||||
set (CPACK_RPM_COMPONENT_INSTALL ON)
|
||||
set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
|
||||
endif ()
|
||||
|
||||
# By default, do not warn when built on machines using only VS Express:
|
||||
if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
||||
endif ()
|
||||
include (InstallRequiredSystemLibraries)
|
||||
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${ZLIB_BINARY_DIR};ZLIB;libraries;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${ZLIB_BINARY_DIR};ZLIB;configinstall;/")
|
||||
|
||||
set (CPACK_ALL_INSTALL_TYPES Full Developer User)
|
||||
set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything")
|
||||
|
||||
set(CPACK_COMPONENTS_ALL libraries headers documents configinstall)
|
||||
|
||||
include (CPack)
|
||||
|
||||
cpack_add_component_group(Runtime)
|
||||
|
||||
cpack_add_component (libraries
|
||||
DISPLAY_NAME "ZLIB Libraries"
|
||||
REQUIRED
|
||||
GROUP Runtime
|
||||
INSTALL_TYPES Full Developer User
|
||||
install (
|
||||
EXPORT ${ZLIB_EXPORTED_TARGETS}
|
||||
DESTINATION ${ZLIB_INSTALL_CMAKE_DIR}
|
||||
FILE zlib-targets.cmake
|
||||
NAMESPACE ${PACKAGE_NAMESPACE}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
cpack_add_component (configinstall
|
||||
DISPLAY_NAME "ZLIB CMake files"
|
||||
DEPENDS libraries
|
||||
GROUP Development
|
||||
INSTALL_TYPES Full Developer User
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Export all exported targets to the build tree for use by parent project
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT ZLIB_EXTERNALLY_CONFIGURED)
|
||||
export (
|
||||
TARGETS ${ZLIB_LIBRARIES_TO_EXPORT}
|
||||
FILE zlib-targets.cmake
|
||||
NAMESPACE ${PACKAGE_NAMESPACE}
|
||||
)
|
||||
export (PACKAGE zlib)
|
||||
endif ()
|
||||
|
||||
|
@ -40,6 +40,9 @@
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define crc32_combine_gen z_crc32_combine_gen
|
||||
# define crc32_combine_gen64 z_crc32_combine_gen64
|
||||
# define crc32_combine_op z_crc32_combine_op
|
||||
# define crc32_z z_crc32_z
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
@ -240,7 +243,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef Z_SOLO
|
||||
typedef unsigned long z_size_t;
|
||||
# ifdef _WIN64
|
||||
typedef unsigned long long z_size_t;
|
||||
# else
|
||||
typedef unsigned long z_size_t;
|
||||
# endif
|
||||
#else
|
||||
# define z_longlong long long
|
||||
# if defined(NO_SIZE_T)
|
||||
@ -351,6 +358,9 @@
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
@ -469,11 +479,18 @@ typedef uLong FAR uLongf;
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#ifndef Z_HAVE_UNISTD_H
|
||||
# ifdef __WATCOMC__
|
||||
# define Z_HAVE_UNISTD_H
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Z_HAVE_UNISTD_H
|
||||
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# if defined(Z_HAVE_UNISTD_H)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
@ -509,7 +526,7 @@ typedef uLong FAR uLongf;
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# if defined(_WIN32) && !defined(__GNUC__)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
|
@ -10,7 +10,6 @@ set (${ZLIB_PACKAGE_NAME}_VALID_COMPONENTS static shared)
|
||||
#-----------------------------------------------------------------------------
|
||||
# User Options
|
||||
#-----------------------------------------------------------------------------
|
||||
set (${ZLIB_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
|
||||
set (${ZLIB_PACKAGE_NAME}_EXPORT_LIBRARIES @ZLIB_LIBRARIES_TO_EXPORT@)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
1271
config/cmake/ZLIBNG/CMakeLists.txt
Normal file
1271
config/cmake/ZLIBNG/CMakeLists.txt
Normal file
File diff suppressed because it is too large
Load Diff
26
config/cmake/ZLIBNG/CPack.Info.plist.in
Normal file
26
config/cmake/ZLIBNG/CPack.Info.plist.in
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@CPACK_PACKAGE_FILE_NAME@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@CPACK_BUNDLE_ICON@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@CPACK_PACKAGE_VERSIO@</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@CPACK_SHORT_VERSION_STRING@</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
206
config/cmake/ZLIBNG/zconf.h.in
Normal file
206
config/cmake/ZLIBNG/zconf.h.in
Normal file
@ -0,0 +1,206 @@
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
#include "zlib_name_mangling.h"
|
||||
|
||||
#if !defined(_WIN32) && defined(__WIN32__)
|
||||
# define _WIN32
|
||||
#endif
|
||||
|
||||
/* Clang macro for detecting declspec support
|
||||
* https://clang.llvm.org/docs/LanguageExtensions.html#has-declspec-attribute
|
||||
*/
|
||||
#ifndef __has_declspec_attribute
|
||||
# define __has_declspec_attribute(x) 0
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# define MAX_MEM_LEVEL 9
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MIN_WBITS
|
||||
# define MIN_WBITS 8 /* 256 LZ77 window */
|
||||
#endif
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# define OF(args) args
|
||||
#endif
|
||||
|
||||
#ifdef ZLIB_INTERNAL
|
||||
# define Z_INTERNAL ZLIB_INTERNAL
|
||||
#endif
|
||||
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
#if defined(ZLIB_DLL) && (defined(_WIN32) || (__has_declspec_attribute(dllexport) && __has_declspec_attribute(dllimport)))
|
||||
# ifdef Z_INTERNAL
|
||||
# define Z_EXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define Z_EXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
#if defined(ZLIB_WINAPI) && defined(_WIN32)
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# define Z_EXPORT WINAPI
|
||||
# define Z_EXPORTVA WINAPIV
|
||||
#endif
|
||||
|
||||
#ifndef Z_EXTERN
|
||||
# define Z_EXTERN extern
|
||||
#endif
|
||||
#ifndef Z_EXPORT
|
||||
# define Z_EXPORT
|
||||
#endif
|
||||
#ifndef Z_EXPORTVA
|
||||
# define Z_EXPORTVA
|
||||
#endif
|
||||
|
||||
/* Conditional exports */
|
||||
#define ZNG_CONDEXPORT Z_INTERNAL
|
||||
|
||||
/* For backwards compatibility */
|
||||
|
||||
#ifndef ZEXTERN
|
||||
# define ZEXTERN Z_EXTERN
|
||||
#endif
|
||||
#ifndef ZEXPORT
|
||||
# define ZEXPORT Z_EXPORT
|
||||
#endif
|
||||
#ifndef ZEXPORTVA
|
||||
# define ZEXPORTVA Z_EXPORTVA
|
||||
#endif
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
/* Legacy zlib typedefs for backwards compatibility. Don't assume stdint.h is defined. */
|
||||
typedef unsigned char Byte;
|
||||
typedef Byte Bytef;
|
||||
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
typedef char charf;
|
||||
typedef int intf;
|
||||
typedef uInt uIntf;
|
||||
typedef uLong uLongf;
|
||||
|
||||
typedef void const *voidpc;
|
||||
typedef void *voidpf;
|
||||
typedef void *voidp;
|
||||
|
||||
typedef unsigned int z_crc_t;
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by configure/cmake/etc */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef NEED_PTRDIFF_T /* may be set to #if 1 by configure/cmake/etc */
|
||||
typedef PTRDIFF_TYPE ptrdiff_t;
|
||||
#endif
|
||||
|
||||
#include <sys/types.h> /* for off_t */
|
||||
|
||||
#include <stddef.h> /* for wchar_t and NULL */
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(__MSYS__)
|
||||
# define z_off64_t _off64_t
|
||||
# elif defined(_WIN32) && !defined(__GNUC__)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef size_t z_size_t;
|
||||
|
||||
#endif /* ZCONF_H */
|
42
config/cmake/ZLIBNG/zlib-config-version.cmake.in
Normal file
42
config/cmake/ZLIBNG/zlib-config-version.cmake.in
Normal file
@ -0,0 +1,42 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
# ZLIB Version file for install directory
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
set (PACKAGE_VERSION "@ZLIB_VERSION_STRING@")
|
||||
|
||||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
if ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@ZLIB_VERSION_MAJOR@")
|
||||
|
||||
# exact match for version @ZLIB_VERSION_MAJOR@.@ZLIB_VERSION_MINOR@
|
||||
if ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@ZLIB_VERSION_MINOR@")
|
||||
|
||||
# compatible with any version @ZLIB_VERSION_MAJOR@.@ZLIB_VERSION_MINOR@.x
|
||||
set (PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
|
||||
if ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@ZLIB_VERSION_RELEASE@")
|
||||
set (PACKAGE_VERSION_EXACT TRUE)
|
||||
|
||||
if ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@ZLIB_VERSION_SUBRELEASE@")
|
||||
# not using this yet
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
set (PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
||||
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
|
57
config/cmake/ZLIBNG/zlib-config.cmake.in
Normal file
57
config/cmake/ZLIBNG/zlib-config.cmake.in
Normal file
@ -0,0 +1,57 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
# ZLIB Config file for compiling against ZLIB build directory
|
||||
#-----------------------------------------------------------------------------
|
||||
@PACKAGE_INIT@
|
||||
|
||||
string(TOUPPER @ZLIB_PACKAGE@ ZLIB_PACKAGE_NAME)
|
||||
|
||||
set (${ZLIB_PACKAGE_NAME}_VALID_COMPONENTS static shared)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# User Options
|
||||
#-----------------------------------------------------------------------------
|
||||
set (${ZLIB_PACKAGE_NAME}_EXPORT_LIBRARIES @ZLIB_LIBRARIES_TO_EXPORT@)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Directories
|
||||
#-----------------------------------------------------------------------------
|
||||
set (${ZLIB_PACKAGE_NAME}_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
||||
|
||||
set (${ZLIB_PACKAGE_NAME}_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@")
|
||||
set_and_check (${ZLIB_PACKAGE_NAME}_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Version Strings
|
||||
#-----------------------------------------------------------------------------
|
||||
set (${ZLIB_PACKAGE_NAME}_VERSION_STRING @ZLIB_VERSION_STRING@)
|
||||
set (${ZLIB_PACKAGE_NAME}_VERSION_MAJOR @ZLIB_VERSION_MAJOR@)
|
||||
set (${ZLIB_PACKAGE_NAME}_VERSION_MINOR @ZLIB_VERSION_MINOR@)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Don't include targets if this file is being picked up by another
|
||||
# project which has already built ZLIB as a subproject
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT TARGET "@ZLIB_PACKAGE@")
|
||||
include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE@@ZLIB_PACKAGE_EXT@-targets.cmake)
|
||||
endif ()
|
||||
|
||||
# Handle default component(static) :
|
||||
if (NOT ${ZLIB_PACKAGE_NAME}_FIND_COMPONENTS)
|
||||
set (${ZLIB_PACKAGE_NAME}_FIND_COMPONENTS static)
|
||||
set (${ZLIB_PACKAGE_NAME}_FIND_REQUIRED_static true)
|
||||
endif ()
|
||||
|
||||
# Handle requested components:
|
||||
list (REMOVE_DUPLICATES ${ZLIB_PACKAGE_NAME}_FIND_COMPONENTS)
|
||||
foreach (comp IN LISTS ${ZLIB_PACKAGE_NAME}_FIND_COMPONENTS)
|
||||
list (FIND ${ZLIB_PACKAGE_NAME}_EXPORT_LIBRARIES "@ZLIB_LIB_CORENAME@-${comp}" HAVE_COMP)
|
||||
if (${HAVE_COMP} LESS 0)
|
||||
set (${ZLIB_PACKAGE_NAME}_${comp}_FOUND 0)
|
||||
else ()
|
||||
set (${ZLIB_PACKAGE_NAME}_${comp}_FOUND 1)
|
||||
string(TOUPPER ${ZLIB_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY)
|
||||
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @ZLIB_LIB_CORENAME@-${comp})
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
check_required_components (${ZLIB_PACKAGE_NAME})
|
@ -53,12 +53,18 @@ set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent"
|
||||
set (ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE)
|
||||
set (ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE)
|
||||
|
||||
set (ZLIBNG_PACKAGE_NAME "zlib-ng" CACHE STRING "Name of ZLIBNG package" FORCE)
|
||||
set (ZLIBNG_TGZ_NAME "2.1.6.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
|
||||
set (ZLIBNG_TGZ_ORIGPATH "https://github.com/zlib-ng/zlib-ng/archive/refs/tags" CACHE STRING "Use ZLIBNG from original location" FORCE)
|
||||
set (ZLIBNG_GIT_URL "https://github.com/zlib-ng/zlib-ng.git" CACHE STRING "Use ZLIBNG from GitHub repository" FORCE)
|
||||
set (ZLIBNG_GIT_BRANCH "develop" CACHE STRING "" FORCE)
|
||||
|
||||
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
|
||||
set (LIBAEC_TGZ_NAME "libaec-1.0.6.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
|
||||
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE)
|
||||
set (LIBAEC_TGZ_NAME "libaec-1.1.3.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
|
||||
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3" CACHE STRING "Use LIBAEC from original location" FORCE)
|
||||
set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
|
||||
set (LIBAEC_GIT_URL "https://github.com/MathisRosenhauer/libaec.git" CACHE STRING "Use LIBAEC from GitHub repository" FORCE)
|
||||
set (LIBAEC_GIT_BRANCH "v1.0.6" CACHE STRING "" FORCE)
|
||||
set (LIBAEC_GIT_BRANCH "v1.1.3" CACHE STRING "" FORCE)
|
||||
|
||||
########################
|
||||
# API test options
|
||||
|
@ -21,7 +21,7 @@ set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
|
||||
|
||||
set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace (can be empty)" FORCE)
|
||||
|
||||
set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
|
||||
set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build C++ support" FORCE)
|
||||
|
||||
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
|
||||
|
||||
@ -57,11 +57,21 @@ set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
|
||||
set (ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
|
||||
set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use ZLIB from original location" FORCE)
|
||||
set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
|
||||
set (ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE)
|
||||
set (ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE)
|
||||
|
||||
set (ZLIBNG_PACKAGE_NAME "zlib-ng" CACHE STRING "Name of ZLIBNG package" FORCE)
|
||||
set (ZLIBNG_TGZ_NAME "2.1.6.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
|
||||
set (ZLIBNG_TGZ_ORIGPATH "https://github.com/zlib-ng/zlib-ng/archive/refs/tags" CACHE STRING "Use ZLIBNG from original location" FORCE)
|
||||
set (ZLIBNG_GIT_URL "https://github.com/zlib-ng/zlib-ng.git" CACHE STRING "Use ZLIBNG from GitHub repository" FORCE)
|
||||
set (ZLIBNG_GIT_BRANCH "develop" CACHE STRING "" FORCE)
|
||||
|
||||
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
|
||||
set (LIBAEC_TGZ_NAME "libaec-1.0.6.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
|
||||
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE)
|
||||
set (LIBAEC_TGZ_NAME "libaec-1.1.3.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
|
||||
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3" CACHE STRING "Use LIBAEC from original location" FORCE)
|
||||
set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
|
||||
set (LIBAEC_GIT_URL "https://github.com/MathisRosenhauer/libaec.git" CACHE STRING "Use LIBAEC from GitHub repository" FORCE)
|
||||
set (LIBAEC_GIT_BRANCH "v1.1.3" CACHE STRING "" FORCE)
|
||||
|
||||
set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
|
||||
|
||||
|
@ -59,19 +59,19 @@ HDF Group recommends using the ctest script mode to build HDF5.
|
||||
-------------------------------------------------------------------------
|
||||
Individual files needed as mentioned in this document
|
||||
-------------------------------------------------------------------------
|
||||
CMake build script from https://github.com/HDFGroup/hdf5/tree/master/config/cmake/scripts:
|
||||
CTestScript.cmake
|
||||
Download from https://github.com/HDFGroup/hdf5/tree/master/config/cmake/scripts:
|
||||
CTestScript.cmake -- CMake build script
|
||||
|
||||
Configuration files from https://github.com/HDFGroup/hdf5/tree/master/config/cmake/scripts:
|
||||
HDF5config.cmake
|
||||
HDF5options.cmake
|
||||
HDF5config.cmake -- CMake configuration script
|
||||
HDF5options.cmake -- CMake configuration options script
|
||||
|
||||
External compression plugin libraries from https://github.com/HDFGroup/hdf5_plugins:
|
||||
hdf5_plugins.tar.gz
|
||||
|
||||
External compression szip and zlib libraries:
|
||||
ZLIB "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz"
|
||||
LIBAEC "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6/libaec-1.0.6.tar.gz"
|
||||
ZLIBNG "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.6.tar.gz"
|
||||
LIBAEC "https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3/libaec-1.1.3.tar.gz"
|
||||
-------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
@ -531,12 +531,18 @@ These five steps are described in detail below.
|
||||
set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
|
||||
set (ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE)
|
||||
set (ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE)
|
||||
set (HDF5_USE_ZLIB_NG OFF CACHE BOOL "Use zlib-ng library as zlib library" FORCE)
|
||||
set (ZLIBNG_PACKAGE_NAME "zlib-ng" CACHE STRING "Name of ZLIBNG package" FORCE)
|
||||
set (ZLIBNG_TGZ_NAME "2.1.6.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
|
||||
set (ZLIBNG_TGZ_ORIGPATH "https://github.com/zlib-ng/zlib-ng/archive/refs/tags" CACHE STRING "Use ZLIBNG from original location" FORCE)
|
||||
set (ZLIBNG_GIT_URL "https://github.com/zlib-ng/zlib-ng.git" CACHE STRING "Use ZLIBNG from GitHub repository" FORCE)
|
||||
set (ZLIBNG_GIT_BRANCH "develop" CACHE STRING "" FORCE)
|
||||
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
|
||||
set (LIBAEC_TGZ_NAME "libaec-1.0.6.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
|
||||
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE)
|
||||
set (LIBAEC_TGZ_NAME "libaec-1.1.3.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
|
||||
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3" CACHE STRING "Use LIBAEC from original location" FORCE)
|
||||
set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
|
||||
set (LIBAEC_GIT_URL "https://github.com/MathisRosenhauer/libaec.git" CACHE STRING "Use LIBAEC from GitHub repository" FORCE)
|
||||
set (LIBAEC_GIT_BRANCH "v1.0.6" CACHE STRING "" FORCE)
|
||||
set (LIBAEC_GIT_BRANCH "v1.1.3" CACHE STRING "" FORCE)
|
||||
########################
|
||||
# API test options
|
||||
########################
|
||||
@ -927,16 +933,21 @@ HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF
|
||||
HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF
|
||||
HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON
|
||||
|
||||
ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB else search" OFF
|
||||
ZLIB_TGZ_ORIGPATH "Use ZLIB from original location" "https://github.com/madler/zlib/releases/download/v1.2.13"
|
||||
ZLIB_TGZ_NAME "Use ZLIB from original compressed file" "zlib-1.2.13.tar.gz"
|
||||
if (HDF5_USE_ZLIB_NG)
|
||||
ZLIBNG_USE_EXTERNAL "Use External Library Building for ZLIBNG" OFF
|
||||
ZLIBNG_TGZ_ORIGPATH "Use ZLIBNG from original location" "https://github.com/zlib-ng/zlib-ng/releases/tag/2.1.6"
|
||||
ZLIBNG_TGZ_NAME "Use ZLIBNG from original compressed file" "2.1.6.tar.gz"
|
||||
else
|
||||
ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF
|
||||
ZLIB_TGZ_ORIGPATH "Use ZLIB from original location" "https://github.com/madler/zlib/releases/download/v1.2.13"
|
||||
ZLIB_TGZ_NAME "Use ZLIB from original compressed file" "zlib-1.2.13.tar.gz"
|
||||
ZLIB_USE_LOCALCONTENT "Use local file for ZLIB FetchContent" ON
|
||||
|
||||
SZIP_USE_EXTERNAL "Use External Library Building for SZIP else search" OFF
|
||||
if (HDF5_ENABLE_SZIP_SUPPORT)
|
||||
HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON
|
||||
LIBAEC_TGZ_ORIGPATH "Use LIBAEC from original location" "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6"
|
||||
LIBAEC_TGZ_NAME "Use LIBAEC from original compressed file" "libaec-1.0.6.tar.gz"
|
||||
LIBAEC_TGZ_ORIGPATH "Use LIBAEC from original location" "https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3"
|
||||
LIBAEC_TGZ_NAME "Use LIBAEC from original compressed file" "libaec-1.1.3.tar.gz"
|
||||
LIBAEC_USE_LOCALCONTENT "Use local file for LIBAEC FetchContent" ON
|
||||
|
||||
PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGINS else search" OFF
|
||||
|
@ -47,6 +47,14 @@ New Features
|
||||
|
||||
Configuration:
|
||||
-------------
|
||||
- Added support for using zlib-ng package as the zlib library:
|
||||
|
||||
CMake: HDF5_USE_ZLIB_NG
|
||||
Autotools: --enable-zlibng
|
||||
|
||||
Added the option HDF5_USE_ZLIB_NG to allow the replacement of the
|
||||
default ZLib package by the zlib-ng package as a built-in compression library.
|
||||
|
||||
- Disable CMake UNITY_BUILD for hdf5
|
||||
|
||||
CMake added a target property, UNITY_BUILD, that when set to true, the target
|
||||
|
@ -1540,7 +1540,7 @@
|
||||
ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
|
||||
|
||||
#limit
|
||||
set (arg ${FILE4} -f GZIP=1 -m 1024)
|
||||
set (arg ${FILE4} -f GZIP=2 -m 1024)
|
||||
set (TESTTYPE "TEST")
|
||||
if (NOT USE_FILTER_DEFLATE)
|
||||
set (TESTTYPE "SKIP")
|
||||
|
@ -8,7 +8,7 @@ GROUP "/" {
|
||||
SIZE XXXX (2.XXX:1 COMPRESSION)
|
||||
}
|
||||
FILTERS {
|
||||
COMPRESSION DEFLATE { LEVEL 1 }
|
||||
COMPRESSION DEFLATE { LEVEL 2 }
|
||||
}
|
||||
FILLVALUE {
|
||||
FILL_TIME H5D_FILL_TIME_IFSET
|
||||
@ -26,7 +26,7 @@ GROUP "/" {
|
||||
SIZE XXXX (2.XXX:1 COMPRESSION)
|
||||
}
|
||||
FILTERS {
|
||||
COMPRESSION DEFLATE { LEVEL 1 }
|
||||
COMPRESSION DEFLATE { LEVEL 2 }
|
||||
}
|
||||
FILLVALUE {
|
||||
FILL_TIME H5D_FILL_TIME_IFSET
|
||||
@ -44,7 +44,7 @@ GROUP "/" {
|
||||
SIZE XXXX (2.XXX:1 COMPRESSION)
|
||||
}
|
||||
FILTERS {
|
||||
COMPRESSION DEFLATE { LEVEL 1 }
|
||||
COMPRESSION DEFLATE { LEVEL 2 }
|
||||
}
|
||||
FILLVALUE {
|
||||
FILL_TIME H5D_FILL_TIME_IFSET
|
||||
@ -62,7 +62,7 @@ GROUP "/" {
|
||||
SIZE XXXX (2.XXX:1 COMPRESSION)
|
||||
}
|
||||
FILTERS {
|
||||
COMPRESSION DEFLATE { LEVEL 1 }
|
||||
COMPRESSION DEFLATE { LEVEL 2 }
|
||||
}
|
||||
FILLVALUE {
|
||||
FILL_TIME H5D_FILL_TIME_IFSET
|
||||
@ -80,7 +80,7 @@ GROUP "/" {
|
||||
SIZE XXXX (2.XXX:1 COMPRESSION)
|
||||
}
|
||||
FILTERS {
|
||||
COMPRESSION DEFLATE { LEVEL 1 }
|
||||
COMPRESSION DEFLATE { LEVEL 2 }
|
||||
}
|
||||
FILLVALUE {
|
||||
FILL_TIME H5D_FILL_TIME_IFSET
|
||||
@ -98,7 +98,7 @@ GROUP "/" {
|
||||
SIZE XXXX (2.XXX:1 COMPRESSION)
|
||||
}
|
||||
FILTERS {
|
||||
COMPRESSION DEFLATE { LEVEL 1 }
|
||||
COMPRESSION DEFLATE { LEVEL 2 }
|
||||
}
|
||||
FILLVALUE {
|
||||
FILL_TIME H5D_FILL_TIME_IFSET
|
||||
@ -116,7 +116,7 @@ GROUP "/" {
|
||||
SIZE XXXX (2.XXX:1 COMPRESSION)
|
||||
}
|
||||
FILTERS {
|
||||
COMPRESSION DEFLATE { LEVEL 1 }
|
||||
COMPRESSION DEFLATE { LEVEL 2 }
|
||||
}
|
||||
FILLVALUE {
|
||||
FILL_TIME H5D_FILL_TIME_IFSET
|
||||
|
@ -1632,7 +1632,7 @@ fi
|
||||
|
||||
|
||||
#limit
|
||||
arg="h5repack_layout.h5 -f GZIP=1 -m 1024"
|
||||
arg="h5repack_layout.h5 -f GZIP=2 -m 1024"
|
||||
if test $USE_FILTER_DEFLATE != "yes" ; then
|
||||
SKIP $arg
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user