Improve Windows packaging
This commit is contained in:
parent
7bd6993b59
commit
8832ba2227
@ -157,25 +157,30 @@ if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# The files to be installed
|
# The files to be installed
|
||||||
include (GNUInstallDirs)
|
if (NOT WIN32)
|
||||||
|
include (GNUInstallDirs)
|
||||||
|
|
||||||
# These should be accessible by users, but need to touch system devices.
|
# These should be accessible by users, but need to touch system devices.
|
||||||
# Use the setuid bit, for simplicity.
|
# Use the setuid bit, for simplicity.
|
||||||
set (SETUID "SETUID" CACHE STRING "Set this empty on permission issues")
|
set (SETUID "SETUID" CACHE STRING "Set this empty on permission issues")
|
||||||
install (TARGETS ${targets} DESTINATION ${CMAKE_INSTALL_BINDIR}
|
install (TARGETS ${targets} DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
PERMISSIONS
|
PERMISSIONS
|
||||||
OWNER_WRITE OWNER_READ OWNER_EXECUTE
|
OWNER_WRITE OWNER_READ OWNER_EXECUTE
|
||||||
GROUP_READ GROUP_EXECUTE
|
GROUP_READ GROUP_EXECUTE
|
||||||
WORLD_READ WORLD_EXECUTE
|
WORLD_READ WORLD_EXECUTE
|
||||||
${SETUID})
|
${SETUID})
|
||||||
install (TARGETS ${targets_gui} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install (TARGETS ${targets_gui} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
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 ()
|
||||||
|
|
||||||
foreach (page ${project_MAN_PAGES})
|
set (CPACK_SET_DESTDIR TRUE)
|
||||||
string (REGEX MATCH "\\.([0-9])$" manpage_suffix "${page}")
|
else ()
|
||||||
install (FILES "${page}"
|
install (TARGETS ${targets} ${targets_gui} DESTINATION .)
|
||||||
DESTINATION "${CMAKE_INSTALL_MANDIR}/man${CMAKE_MATCH_1}")
|
endif ()
|
||||||
endforeach ()
|
|
||||||
|
|
||||||
# CPack
|
# CPack
|
||||||
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
|
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_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user")
|
||||||
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
|
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
|
||||||
|
|
||||||
set (CPACK_SET_DESTDIR TRUE)
|
|
||||||
include (CPack)
|
include (CPack)
|
||||||
|
Loading…
Reference in New Issue
Block a user