Improve Windows packaging
All checks were successful
macOS Success
Alpine 3.20 Success

This commit is contained in:
Přemysl Eric Janouch 2024-12-23 17:14:59 +01:00
parent 7bd6993b59
commit 8832ba2227
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -157,6 +157,7 @@ if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
endif ()
# The files to be installed
if (NOT WIN32)
include (GNUInstallDirs)
# These should be accessible by users, but need to touch system devices.
@ -170,13 +171,17 @@ install (TARGETS ${targets} DESTINATION ${CMAKE_INSTALL_BINDIR}
${SETUID})
install (TARGETS ${targets_gui} DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
foreach (page ${project_MAN_PAGES})
string (REGEX MATCH "\\.([0-9])$" manpage_suffix "${page}")
install (FILES "${page}"
DESTINATION "${CMAKE_INSTALL_MANDIR}/man${CMAKE_MATCH_1}")
endforeach ()
set (CPACK_SET_DESTDIR TRUE)
else ()
install (TARGETS ${targets} ${targets_gui} DESTINATION .)
endif ()
# CPack
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
@ -189,5 +194,4 @@ set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user")
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
set (CPACK_SET_DESTDIR TRUE)
include (CPack)