diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index df048ef..6a6b580 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -122,6 +122,8 @@ configure_package_config_file( install( FILES "${project_config}" "${version_config}" DESTINATION "${config_install_dir}" + # We don't want someone by accident modify his installed files + PERMISSIONS OWNER_EXECUTE OWNER_READ ) # Config @@ -129,6 +131,8 @@ install( install(EXPORT "${TARGETS_EXPORT_NAME}" DESTINATION "${config_install_dir}" NAMESPACE "${namespace}" + # We don't want someone by accident modify his installed files + PERMISSIONS OWNER_EXECUTE OWNER_READ ) # Export headers (Install public headers) diff --git a/lib/cmake/InstallHelp.cmake b/lib/cmake/InstallHelp.cmake index 447f357..83b4fe4 100644 --- a/lib/cmake/InstallHelp.cmake +++ b/lib/cmake/InstallHelp.cmake @@ -8,7 +8,12 @@ macro(install_public_headers_with_directory HEADER_LIST IGNORE_PREFIX) foreach(HEADER ${${HEADER_LIST}}) get_filename_component(DIR ${HEADER} DIRECTORY) string(REPLACE ${IGNORE_PREFIX} "" DIR ${DIR}) - install(FILES ${HEADER} DESTINATION include/${DIR}) + install( + FILES ${HEADER} + DESTINATION include/${DIR} + # We don't want someone by accident modify his installed files + PERMISSIONS OWNER_EXECUTE OWNER_READ + ) endforeach(HEADER) endmacro(install_public_headers_with_directory)