From: Nathan Moinvaziri Date: Fri, 19 Jun 2020 03:31:25 +0000 (-0700) Subject: Add options to install minigzip and minideflate. X-Git-Tag: 1.9.9-b1~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebf7e96e2c04f3ccf860d165cecfe3300a973026;p=thirdparty%2Fzlib-ng.git Add options to install minigzip and minideflate. --- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a5dde93..56ef3e3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: - name: Generate project files run: | - cmake . ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=Release -DWITH_GZFILEOP=ON -DZLIB_ENABLE_TESTS=ON -DCMAKE_INSTALL_PREFIX=out + cmake . ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=Release -DWITH_GZFILEOP=ON -DZLIB_ENABLE_TESTS=ON -DCMAKE_INSTALL_PREFIX=out -DINSTALL_UTILS=ON env: CC: ${{ matrix.compiler }} CI: true diff --git a/CMakeLists.txt b/CMakeLists.txt index aeaa1447..777a2c66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,6 +103,7 @@ elseif(BASEARCH_X86_FOUND) option(WITH_SSE4 "Build with SSE4" ON) option(WITH_PCLMULQDQ "Build with PCLMULQDQ" ON) endif() +option(INSTALL_UTILS "Copy minigzip and minideflate during install" OFF) mark_as_advanced(FORCE ZLIB_DUAL_LINK @@ -115,6 +116,7 @@ mark_as_advanced(FORCE WITH_POWER8 WITH_INFLATE_STRICT WITH_INFLATE_ALLOW_INVALID_DIST + INSTALL_UTILS ) add_feature_info(ZLIB_COMPAT ZLIB_COMPAT "Provide a zlib-compatible API") @@ -1042,6 +1044,13 @@ if(ZLIB_ENABLE_TESTS) configure_test_executable(minideflate) target_link_libraries(minideflate zlib) + if(INSTALL_UTILS) + install(TARGETS minigzip minideflate + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}") + endif() + add_executable(switchlevels test/switchlevels.c) configure_test_executable(switchlevels) target_link_libraries(switchlevels zlib) diff --git a/README.md b/README.md index 1873b373..9324769c 100644 --- a/README.md +++ b/README.md @@ -200,8 +200,9 @@ Advanced Build Options | WITH_PCLMULQDQ | | Build with PCLMULQDQ intrinsics | ON | | WITH_ACLE | --without-acle | Build with ACLE intrinsics | ON | | WITH_NEON | --without-neon | Build with NEON intrinsics | ON | -| WITH_POWER8 | | Build with POWER8 optimisations | ON +| WITH_POWER8 | | Build with POWER8 optimisations | ON | | WITH_DFLTCC_DEFLATE | --with-dfltcc-deflate | Use DEFLATE COMPRESSION CALL instruction for compression on IBM Z | OFF | | WITH_DFLTCC_INFLATE | --with-dfltcc-inflate | Use DEFLATE COMPRESSION CALL instruction for decompression on IBM Z | OFF | | WITH_INFLATE_STRICT | | Build with strict inflate distance checking | OFF | | WITH_INFLATE_ALLOW_INVALID_DIST | | Build with zero fill for inflate invalid distances | OFF | +| INSTALL_UTILS | | Copy minigzip and minigzip during install | OFF |