From 18d1fcf3a46a342cb9e731d88c4ff316c30c9264 Mon Sep 17 00:00:00 2001 From: Zhi Guan Date: Wed, 18 Oct 2023 17:17:07 +0800 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 50 +++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35ebe4946..4da6863ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -384,31 +384,27 @@ if (CMAKE_C_COMPILER_ID MATCHES "MSVC") endif() - -if (UNIX) - set(CPACK_PACKAGE_NAME "GmSSL") - set(CPACK_PACKAGE_VENDOR "GmSSL develop team") - set(CPACK_PACKAGE_VERSION "3.1.1-Dev") - - set(CPACK_RPM_PACKAGE_GROUP "GmSSL Group") - set(CPACK_PACKAGE_VENDOR "GmSSL Vendor") - - set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/README.md) - string(CONCAT CPACK_PACKAGE_DESCRIPTION_SUMMARY - "GmSSL is an open source cryptographic toolbox that supports SM2 / SM3 / SM4 / SM9 " - "and other national secret (national commercial password) algorithm. ") - set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") - set(CPACK_PACKAGE_CONTACT "https://github.com/guanzhi/GmSSL/issues") - # The general number of package itself. - # Should be incremented when the package content changes for the same version. - # Can be used to distinguish between different builds of the same version. - # Can be overridden by `cmake -DCPACK_NOARCH_PACKAGE_RELEASE=1` - set(CPACK_NOARCH_PACKAGE_RELEASE 1 CACHE STRING "The general release number of package") - - set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") - include(DebPacking) - include(RpmPacking) - - include(CPack) -endif (UNIX) +set(CPACK_PACKAGE_NAME "GmSSL") +set(CPACK_PACKAGE_VENDOR "GmSSL develop team") +set(CPACK_PACKAGE_VERSION "3.1.1-Dev") + +set(CPACK_RPM_PACKAGE_GROUP "GmSSL Group") +set(CPACK_PACKAGE_VENDOR "GmSSL Vendor") + +set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/README.md) +string(CONCAT CPACK_PACKAGE_DESCRIPTION_SUMMARY + "GmSSL is an open source cryptographic toolbox that supports SM2 / SM3 / SM4 / SM9 " + "and other national secret (national commercial password) algorithm. ") +set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") +set(CPACK_PACKAGE_CONTACT "https://github.com/guanzhi/GmSSL/issues") +# The general number of package itself. +# Should be incremented when the package content changes for the same version. +# Can be used to distinguish between different builds of the same version. +# Can be overridden by `cmake -DCPACK_NOARCH_PACKAGE_RELEASE=1` +set(CPACK_NOARCH_PACKAGE_RELEASE 1 CACHE STRING "The general release number of package") + +set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") +include(DebPacking) +include(RpmPacking) +include(CPack)