Closed mgrojo closed 6 months ago
Please share your CMake configuration command. It appears you're trying to do something with pkgconfig as opposed to a normal CMake installation.
I simply did:
cmake .
make
cmake --install . --prefix $HOME/local
I tried also with make install
but don't know how to specify the prefix. I found the last command in https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html
When you run cmake
the first time, CSFML_PKGCONFIG_INSTALL_PREFIX
gets initialized based on CMAKE_INSTALL_PREFIX
. When running cmake the second time, it ignores the new $HOME/local
prefix because the install directory for pkgfile depends on CSFML_PKGCONFIG_INSTALL_PREFIX
, which was initialized with the wrong prefix on the first run.
I've seen this problem in the past as well, even in SFML itself. If you delete the build folder and specify the prefix on the first cmake run then it does get installed to the correct location (when running the install command later). Alternatively you can specify a value for CSFML_PKGCONFIG_INSTALL_PREFIX
explicitly.
Fixed via #234.
Prerequisite Checklist
Describe your issue here
I tried to install as a regular user, but a system path was tried to be written.
Your Environment
Steps to reproduce
cmake --install . --prefix $HOME/local
Expected behavior
Everything is installed under
$HOME/local
with regular user permissions.Actual behavior