diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-12-23 17:14:59 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-12-23 17:14:59 +0100 |
commit | 8832ba22274540a406465ee96782393ab32faa5a (patch) | |
tree | 4238d4048dfba1be8bfb2af6f3aed062b805d16a | |
parent | 7bd6993b599bcd3f7b92bb93acbf67c3e0a13f89 (diff) | |
download | usb-drivers-8832ba22274540a406465ee96782393ab32faa5a.tar.gz usb-drivers-8832ba22274540a406465ee96782393ab32faa5a.tar.xz usb-drivers-8832ba22274540a406465ee96782393ab32faa5a.zip |
Improve Windows packaging
-rw-r--r-- | CMakeLists.txt | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e76cbf4..8beaf96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,25 +157,30 @@ if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING) endif () # The files to be installed -include (GNUInstallDirs) - -# These should be accessible by users, but need to touch system devices. -# Use the setuid bit, for simplicity. -set (SETUID "SETUID" CACHE STRING "Set this empty on permission issues") -install (TARGETS ${targets} DESTINATION ${CMAKE_INSTALL_BINDIR} - PERMISSIONS - OWNER_WRITE OWNER_READ OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE - ${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 () +if (NOT WIN32) + include (GNUInstallDirs) + + # These should be accessible by users, but need to touch system devices. + # Use the setuid bit, for simplicity. + set (SETUID "SETUID" CACHE STRING "Set this empty on permission issues") + install (TARGETS ${targets} DESTINATION ${CMAKE_INSTALL_BINDIR} + PERMISSIONS + OWNER_WRITE OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE + ${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") @@ -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) |