From 3350cde76fd62a9db45f5390ca7126fbcd85bc9b Mon Sep 17 00:00:00 2001 From: msclock Date: Tue, 6 Aug 2024 13:37:09 +0800 Subject: [PATCH] reorganize and reformat --- cmake/install/Cpack.cmake | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/cmake/install/Cpack.cmake b/cmake/install/Cpack.cmake index 1caa198..9a416b6 100644 --- a/cmake/install/Cpack.cmake +++ b/cmake/install/Cpack.cmake @@ -1,8 +1,29 @@ -set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") -set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") -set(CPACK_SOURCE_GENERATOR "TGZ;ZIP") -set(CPACK_SOURCE_IGNORE_FILES /.git /dist /.*build.* /\\\\.DS_Store) +#[[ +Package generation using CPack + +References: + - https://github.com/MangaD/cpp-project-template/blob/main/cmake/cpack_module.cmake + - https://github.com/gabime/spdlog/blob/v1.x/cmake/spdlogCPack.cmake + - https://github.com/retifrav/cmake-cpack-example/tree/master +]] +include_guard(GLOBAL) + +set(CPACK_RESOURCE_FILE_README + "${CMAKE_CURRENT_SOURCE_DIR}/README.md" + CACHE STRING "Readme") +set(CPACK_RESOURCE_FILE_LICENSE + "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" + CACHE STRING "License") +set(CPACK_SOURCE_GENERATOR + "TGZ;ZIP" + CACHE STRING "Source generator") +# cmake-format: off +set(CPACK_SOURCE_IGNORE_FILES + /.git + /dist + /.*build.* + /\\\\.DS_Store +) +# cmake-format: on + include(CPack) -# https://github.com/MangaD/cpp-project-template/blob/main/cmake/cpack_module.cmake -# https://github.com/gabime/spdlog/blob/v1.x/cmake/spdlogCPack.cmake -# https://github.com/retifrav/cmake-cpack-example/tree/master