cmake is trying to set permissions on /usr/include

I’m trying to install frei0r-plugins which uses cmake for installation.
I get this error when doing make install:

Install the project…
– Install configuration: “Release”
– Up-to-date: /usr/./include
CMake Error at cmake_install.cmake:46 (file):
file INSTALL cannot set permissions on “/usr/./include”: Operation not
permitted.

I’m not installing as root but as a package user. So why is cmake trying to change permissions on a directory that already exists and that I’ve set up the way I want it - like this:

drwxrwxr-t 223 root install 20480 Mar 3 22:26 /usr/include

cmake has write access to this directory so can install the package. There is absolutely no reason why it needs to change the permissions and if the directory already exists, it certainly should not do so. It shouldn’t assume that I’m installing as root and it’s a travesty for it to trample over my directories and try to mangle the permissions I’ve set up.

Here is line 46 of cmake_install.cmake:

if(“x${CMAKE_INSTALL_COMPONENT}x” STREQUAL “xUnspecifiedx” OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION “${CMAKE_INSTALL_PREFIX}/.” TYPE DIRECTORY FILES “/usr/src/multimedia/frei0r-plugins/frei0r-plugins-1.7.0/include” FILES_MATCHING REGEX “/frei0r\.h$” REGEX “/msvc$” EXCLUDE)
endif()

So my question is how can I change this line to prevent it from trying to set the permissions on /usr/include?

jb.

This line is created from the code in CMakeLists.txt. What happens is CMake is instructed to install a directory include, not its content. This is why it tries to adjust the permissions.