From e87e190cd38f3a6634df8da1e5a297bdb6c2d240 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Fri, 14 Oct 2022 17:50:39 +0300 Subject: [PATCH] 2.0.20 --- MyxCMake/MyxCMakeConfigVersion.cmake | 2 +- MyxCMake/lib/CreatePackages.cmake | 32 ++++++++++++++++++---------- README.md | 2 +- VERSION | 2 +- debian/CMakeLists.txt | 2 +- debian/changelog | 2 +- myx_setup.cmake | 4 ++-- 7 files changed, 28 insertions(+), 18 deletions(-) diff --git a/MyxCMake/MyxCMakeConfigVersion.cmake b/MyxCMake/MyxCMakeConfigVersion.cmake index 33accaa..d038d2a 100644 --- a/MyxCMake/MyxCMakeConfigVersion.cmake +++ b/MyxCMake/MyxCMakeConfigVersion.cmake @@ -1,4 +1,4 @@ -set(MYX_CMAKE_PACKAGE_VERSION "2.0.19") +set(MYX_CMAKE_PACKAGE_VERSION "2.0.20") if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() diff --git a/MyxCMake/lib/CreatePackages.cmake b/MyxCMake/lib/CreatePackages.cmake index 572f101..f0d93e9 100644 --- a/MyxCMake/lib/CreatePackages.cmake +++ b/MyxCMake/lib/CreatePackages.cmake @@ -1,6 +1,8 @@ include_guard(GLOBAL) -function(myx_create_packages NAME) +function(myx_create_packages TARGET_NAME) + myx_skip_external_target(${TARGET_NAME}) + set(options) set(oneValueArgs DEBIAN_PACKAGE_TYPE CPACK_DEBIAN_PACKAGE_SECTION CPACK_DEBIAN_PACKAGE_PRIORITY CMAKE_INSTALL_DEFAULT_COMPONENT_NAME CPACK_PACKAGE_CONTACT) @@ -9,20 +11,28 @@ function(myx_create_packages NAME) cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) # Общие настройки для пакета: организация, автор, версия - if(NOT ${PROJECT_NAME}_VENDOR) - set(CPACK_PACKAGE_VENDOR "unknown vendor") - myx_message_warning("\${PROJECT_NAME}_VENDOR variable is required for packaging but unset") - else() - set(CPACK_PACKAGE_VENDOR ${${PROJECT_NAME}_VENDOR}) - endif() - if(NOT ${PROJECT_NAME}_CONTACT) - set(CPACK_PACKAGE_CONTACT "unknown maintainer ") + else() + set(CPACK_PACKAGE_CONTACT "unknown maintainer ") + myx_message_warning("\${PROJECT_NAME}_CONTACT variable is required for packaging but unset") + endif() else() set(CPACK_PACKAGE_CONTACT ${${PROJECT_NAME}_CONTACT}) endif() + if(NOT ${PROJECT_NAME}_VENDOR) + if(${PROJECT_NAME}_AUTHOR) + set(CPACK_PACKAGE_VENDOR "${${PROJECT_NAME}_AUTHOR}") + else() + set(CPACK_PACKAGE_VENDOR "unknown vendor") + myx_message_warning("\${PROJECT_NAME}_VENDOR variable is required for packaging but unset") + endif() + else() + set(CPACK_PACKAGE_VENDOR ${${PROJECT_NAME}_VENDOR}) + endif() + string(TOLOWER ${PROJECT_NAME} PN) set(CPACK_PACKAGE_NAME ${PN}) set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) @@ -171,7 +181,7 @@ function(myx_create_packages NAME) if(UNIX AND NOT TARGET deb) add_custom_target(deb WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND cpack -G DEB) - add_dependencies(deb ${NAME}) + add_dependencies(deb ${TARGET_NAME}) endif() endif() diff --git a/README.md b/README.md index 3146db0..87cc434 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Установка В корневом каталоге проекта создать каталог `cmake` и распаковать в него -[архив](../../../releases/download/2.0.19/myx-cmake-local-2.0.19.tar.xz ). +[архив](../../../releases/download/2.0.20/myx-cmake-local-2.0.20.tar.xz ). ## Использование diff --git a/VERSION b/VERSION index ed2af5c..d17d1f3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.19 +2.0.20 diff --git a/debian/CMakeLists.txt b/debian/CMakeLists.txt index f185e1d..99b1693 100644 --- a/debian/CMakeLists.txt +++ b/debian/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.6 FATAL_ERROR) -project(myx-cmake VERSION 2.0.19 LANGUAGES) +project(myx-cmake VERSION 2.0.20 LANGUAGES) include(GNUInstallDirs) file(WRITE ${CMAKE_SOURCE_DIR}/MyxCMake/MyxCMakeConfigVersion.cmake diff --git a/debian/changelog b/debian/changelog index 4353300..a09ed4a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -myx-cmake (2.0.19) unstable; urgency=medium +myx-cmake (2.0.20) unstable; urgency=medium * New version. diff --git a/myx_setup.cmake b/myx_setup.cmake index cae90d1..7c23c4f 100644 --- a/myx_setup.cmake +++ b/myx_setup.cmake @@ -20,11 +20,11 @@ if(ENV{MYX_CMAKE_DIR}) set(MYX_CMAKE_DIR $ENV{MYX_CMAKE_DIR}) endif() if(MYX_CMAKE_DIR) - find_package(MyxCMake 2.0.19 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH) + find_package(MyxCMake 2.0.20 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH) myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===") else() if(MYX_CMAKE_USE_SYSTEM) - find_package(MyxCMake 2.0.19 REQUIRED) + find_package(MyxCMake 2.0.20 REQUIRED) myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===") else() include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake)