From 1584a97b403c26e4fdff1bba1a5ea3b2ee5fa0fa Mon Sep 17 00:00:00 2001 From: Yang Kun <91833768+ikspress@users.noreply.github.com> Date: Tue, 6 Aug 2024 19:16:07 +0800 Subject: [PATCH] Update CMakeLists.txt Co-authored-by: Markus Werle --- CMakeLists.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e51bf96b..66698cd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,7 +262,20 @@ SET(CPACK_COMPONENT_HEADERS_DEPENDS libraries) SET(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries) # Binary Package -SET(CPACK_GENERATOR "ZIP" CACHE STRING "Default binary package generator") +if(WIN32) + set(CPACK_GENERATOR ZIP WIX) +elseif(APPLE) + set(CPACK_GENERATOR TGZ productbuild) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(CPACK_GENERATOR TGZ RPM DEB) + + # Automatically include runtime dependencies (libc, libstdc++) fro Debian + # (RPM includes these dependencies automagically) + # YMMV, therefore commented + # set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS "TRUE") +else() + set(CPACK_GENERATOR TGZ) +endif() # Source Package SET(CPACK_SOURCE_GENERATOR "SOURCE_ZIP" CACHE STRING "Default source package generator") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "libnfc-${VERSION}")