SFML / CSFML

Official binding of SFML for C
https://www.sfml-dev.org
Other
343 stars 123 forks source link

Fix pkgconfig files install path #234

Closed kimci86 closed 6 months ago

kimci86 commented 6 months ago

Fix for #233 See commit messages for details.

I tested this PR running this on Ubuntu:

cmake -S . -B build
cmake --build build
cmake --install build --prefix whatever

Files are installed as expected without sudo.

kimci86 commented 6 months ago

One problem though is that CMake --install command's --prefix option has no impact on csfml-*.pc.in configured output. Those files are starting with prefix=@CMAKE_INSTALL_PREFIX@ so installed files start with e.g. prefix=/usr/local regardless of --prefix option.

eXpl0it3r commented 6 months ago

@mgrojo can you give this a try?

mgrojo commented 6 months ago

I followed the same steps as in #233 with this branch, and it worked this time.

-- Install configuration: "Release"
-- Installing: /home/mgr/local/lib/pkgconfig/csfml-all.pc
-- Installing: /home/mgr/local/lib/pkgconfig/csfml-system.pc
-- Installing: /home/mgr/local/lib/pkgconfig/csfml-window.pc
-- Installing: /home/mgr/local/lib/pkgconfig/csfml-graphics.pc
-- Installing: /home/mgr/local/lib/pkgconfig/csfml-audio.pc
-- Installing: /home/mgr/local/lib/pkgconfig/csfml-network.pc
-- Installing: /home/mgr/local/include
-- Installing: /home/mgr/local/include/SFML
-- Installing: /home/mgr/local/include/SFML/Config.h
-- Installing: /home/mgr/local/include/SFML/Network.h
-- Installing: /home/mgr/local/include/SFML/Network
-- Installing: /home/mgr/local/include/SFML/Network/Ftp.h
-- Installing: /home/mgr/local/include/SFML/Network/Types.h
-- Installing: /home/mgr/local/include/SFML/Network/Http.h
-- Installing: /home/mgr/local/include/SFML/Network/Export.h
-- Installing: /home/mgr/local/include/SFML/Network/TcpListener.h
-- Installing: /home/mgr/local/include/SFML/Network/SocketStatus.h
-- Installing: /home/mgr/local/include/SFML/Network/UdpSocket.h
-- Installing: /home/mgr/local/include/SFML/Network/TcpSocket.h
-- Installing: /home/mgr/local/include/SFML/Network/Packet.h
-- Installing: /home/mgr/local/include/SFML/Network/IpAddress.h
-- Installing: /home/mgr/local/include/SFML/Network/SocketSelector.h
-- Installing: /home/mgr/local/include/SFML/Audio.h
-- Installing: /home/mgr/local/include/SFML/System
-- Installing: /home/mgr/local/include/SFML/System/Types.h
-- Installing: /home/mgr/local/include/SFML/System/Sleep.h
-- Installing: /home/mgr/local/include/SFML/System/Export.h
-- Installing: /home/mgr/local/include/SFML/System/Buffer.h
-- Installing: /home/mgr/local/include/SFML/System/Vector2.h
-- Installing: /home/mgr/local/include/SFML/System/Clock.h
-- Installing: /home/mgr/local/include/SFML/System/InputStream.h
-- Installing: /home/mgr/local/include/SFML/System/Vector3.h
-- Installing: /home/mgr/local/include/SFML/System/Time.h
-- Installing: /home/mgr/local/include/SFML/System/Thread.h
-- Installing: /home/mgr/local/include/SFML/System/Mutex.h
-- Installing: /home/mgr/local/include/SFML/Graphics
-- Installing: /home/mgr/local/include/SFML/Graphics/RenderTexture.h
-- Installing: /home/mgr/local/include/SFML/Graphics/VertexBuffer.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Font.h
-- Installing: /home/mgr/local/include/SFML/Graphics/VertexArray.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Vertex.h
-- Installing: /home/mgr/local/include/SFML/Graphics/FontInfo.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Types.h
-- Installing: /home/mgr/local/include/SFML/Graphics/BlendMode.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Export.h
-- Installing: /home/mgr/local/include/SFML/Graphics/PrimitiveType.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Transform.h
-- Installing: /home/mgr/local/include/SFML/Graphics/RectangleShape.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Shape.h
-- Installing: /home/mgr/local/include/SFML/Graphics/ConvexShape.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Image.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Texture.h
-- Installing: /home/mgr/local/include/SFML/Graphics/CircleShape.h
-- Installing: /home/mgr/local/include/SFML/Graphics/View.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Transformable.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Color.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Sprite.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Glyph.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Glsl.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Text.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Rect.h
-- Installing: /home/mgr/local/include/SFML/Graphics/Shader.h
-- Installing: /home/mgr/local/include/SFML/Graphics/RenderStates.h
-- Installing: /home/mgr/local/include/SFML/Graphics/RenderWindow.h
-- Installing: /home/mgr/local/include/SFML/Window
-- Installing: /home/mgr/local/include/SFML/Window/Vulkan.h
-- Installing: /home/mgr/local/include/SFML/Window/Clipboard.h
-- Installing: /home/mgr/local/include/SFML/Window/Types.h
-- Installing: /home/mgr/local/include/SFML/Window/Keyboard.h
-- Installing: /home/mgr/local/include/SFML/Window/Export.h
-- Installing: /home/mgr/local/include/SFML/Window/Touch.h
-- Installing: /home/mgr/local/include/SFML/Window/Context.h
-- Installing: /home/mgr/local/include/SFML/Window/Mouse.h
-- Installing: /home/mgr/local/include/SFML/Window/WindowBase.h
-- Installing: /home/mgr/local/include/SFML/Window/Sensor.h
-- Installing: /home/mgr/local/include/SFML/Window/Window.h
-- Installing: /home/mgr/local/include/SFML/Window/VideoMode.h
-- Installing: /home/mgr/local/include/SFML/Window/Cursor.h
-- Installing: /home/mgr/local/include/SFML/Window/Event.h
-- Installing: /home/mgr/local/include/SFML/Window/Joystick.h
-- Installing: /home/mgr/local/include/SFML/Window/WindowHandle.h
-- Installing: /home/mgr/local/include/SFML/Window/JoystickIdentification.h
-- Installing: /home/mgr/local/include/SFML/GPUPreference.h
-- Installing: /home/mgr/local/include/SFML/System.h
-- Installing: /home/mgr/local/include/SFML/Window.h
-- Installing: /home/mgr/local/include/SFML/OpenGL.h
-- Installing: /home/mgr/local/include/SFML/Audio
-- Installing: /home/mgr/local/include/SFML/Audio/Types.h
-- Installing: /home/mgr/local/include/SFML/Audio/Export.h
-- Installing: /home/mgr/local/include/SFML/Audio/Listener.h
-- Installing: /home/mgr/local/include/SFML/Audio/SoundStatus.h
-- Installing: /home/mgr/local/include/SFML/Audio/SoundRecorder.h
-- Installing: /home/mgr/local/include/SFML/Audio/SoundBufferRecorder.h
-- Installing: /home/mgr/local/include/SFML/Audio/SoundBuffer.h
-- Installing: /home/mgr/local/include/SFML/Audio/SoundStream.h
-- Installing: /home/mgr/local/include/SFML/Audio/Sound.h
-- Installing: /home/mgr/local/include/SFML/Audio/Music.h
-- Installing: /home/mgr/local/include/SFML/Graphics.h
-- Installing: /home/mgr/local/share/CSFML/license.md
-- Installing: /home/mgr/local/share/CSFML/readme.md
-- Installing: /home/mgr/local/lib/libcsfml-system.so.2.6.0
-- Installing: /home/mgr/local/lib/libcsfml-system.so.2.6
-- Installing: /home/mgr/local/lib/libcsfml-system.so
-- Installing: /home/mgr/local/lib/libcsfml-window.so.2.6.0
-- Installing: /home/mgr/local/lib/libcsfml-window.so.2.6
-- Installing: /home/mgr/local/lib/libcsfml-window.so
-- Installing: /home/mgr/local/lib/libcsfml-network.so.2.6.0
-- Installing: /home/mgr/local/lib/libcsfml-network.so.2.6
-- Installing: /home/mgr/local/lib/libcsfml-network.so
-- Installing: /home/mgr/local/lib/libcsfml-graphics.so.2.6.0
-- Installing: /home/mgr/local/lib/libcsfml-graphics.so.2.6
-- Installing: /home/mgr/local/lib/libcsfml-graphics.so
-- Installing: /home/mgr/local/lib/libcsfml-audio.so.2.6.0
-- Installing: /home/mgr/local/lib/libcsfml-audio.so.2.6
-- Installing: /home/mgr/local/lib/libcsfml-audio.so

Thanks @kimci86.

eXpl0it3r commented 6 months ago

Thanks for fixing this! 🙂