Building examples is not compatible with kdesrc-build setup
I added the following options to global section in my ~/.config/kdesrc-buildrc:
cmake-options -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
and now my build fails on polkit-qt-1, because it attempts to install something in global protected directory, even though I have set up sessions (build/plasma-workspace/login-sessions/install-sessions.sh
) and install prefix is /usr/local/kde
.
Error text in install.log
:
-- Up-to-date: /usr/local/kde/share/polkit-1/actions/org.qt.policykit.examples.policy
-- Up-to-date: /usr/local/kde/bin/polkit-example-helper-qt5
-- Up-to-date: /usr/local/kde/share/dbus-1/system-services/org.qt.policykit.examples.service
CMake Error at examples/cmake_install.cmake:106 (file):
file cannot create directory: /dbus-1/system.d. Maybe need administrative
privileges.
Call Stack (most recent call first):
cmake_install.cmake:139 (include)
FAILED: CMakeFiles/install.util
cd /home/ratijas/kde/build/kdesupport/polkit-qt-1 && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.