From fe493272d2261e1f0b547cd39bd91e44ebc580bb Mon Sep 17 00:00:00 2001 From: evpobr Date: Thu, 24 Sep 2020 09:26:40 +0500 Subject: [PATCH] Set default CPACK_PACKAGE_NAME to libsndfile --- .github/workflows/action.yml | 1 - CMakeLists.txt | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 2bfaced8..54568318 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -139,7 +139,6 @@ jobs: -DBUILD_REGTEST=OFF -DBUILD_EXAMPLES=OFF -DINSTALL_PKGCONFIG_MODULE=OFF - -DCPACK_PACKAGE_NAME=libsndfile -DCMAKE_BUILD_TYPE=Release -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index cd4126bc..fa512f98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,9 @@ set (CMAKE_C_STANDARD_REQUIRED TRUE) set_property(GLOBAL PROPERTY USE_FOLDERS ON) set (PACKAGE_NAME lib${PROJECT_NAME}) +if (NOT DEFINED CPACK_PACKAGE_NAME) + set (CPACK_PACKAGE_NAME ${PACKAGE_NAME}) +endif () set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})