From 189766ceb4e7bd71d9fca8aea215a856811aa968 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 7 Aug 2022 00:30:03 +0200 Subject: [PATCH] build: Set library and plugin permissions to 755 on install Fixes #655 --- cmake/build_helpers.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index a2f12087a..edaf5164d 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -166,6 +166,8 @@ macro(configurePackingResources) endmacro() macro(createPackage) + set(LIBRARY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + file(MAKE_DIRECTORY "plugins") foreach (plugin IN LISTS PLUGINS) add_subdirectory("plugins/${plugin}") @@ -180,7 +182,7 @@ macro(createPackage) get_target_property(PLUGIN_LOCATION ${plugin} LOCATION) - install(FILES "${PLUGIN_LOCATION}/../${plugin}.hexplug" DESTINATION "${PLUGINS_INSTALL_LOCATION}" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + install(FILES "${PLUGIN_LOCATION}/../${plugin}.hexplug" DESTINATION "${PLUGINS_INSTALL_LOCATION}" PERMISSIONS ${LIBRARY_PERMISSIONS}) else () if (WIN32) install(TARGETS ${plugin} RUNTIME DESTINATION ${PLUGINS_INSTALL_LOCATION}) @@ -236,7 +238,7 @@ macro(createPackage) endforeach() ]]) - install(FILES "$" DESTINATION "${CMAKE_INSTALL_LIBDIR}") + install(FILES "$" DESTINATION "${CMAKE_INSTALL_LIBDIR}" PERMISSIONS ${LIBRARY_PERMISSIONS}) downloadImHexPatternsFiles("./") elseif(UNIX AND NOT APPLE) @@ -247,7 +249,7 @@ macro(createPackage) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/licenses/imhex) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png) - install(FILES "$" DESTINATION "${CMAKE_INSTALL_LIBDIR}") + install(FILES "$" DESTINATION "${CMAKE_INSTALL_LIBDIR}" PERMISSIONS ${LIBRARY_PERMISSIONS}) downloadImHexPatternsFiles("./share/imhex") endif()