Skip to content

Build SFML On FreeBSD

Option 1: Install from FreeBSD pkg

FreeBSD# pkg install -y sfml

Option 2: Build and Install from FreeBSD ports

FreeBSD# cd /usr/ports/devel/sfml
FreeBSD# make install clean

Option 3: Build SFML from source On FreeBSD

1. Get SFML Source Code

Get SFML sources from github:
FreeBSD% git clone --depth=1 sfml

2. Build SFML From Source

cmake or ccmake generators.
FreeBSD% cd sfml
FreeBSD% mkdir build
FreeBSD% cd build
FreeBSD% cmake -G "Unix Makefiles" ../ \
-DCMAKE_MAKE_PROGRAM=/usr/local/bin/bmake \
-DCMAKE_INSTALL_PREFIX=${HOME}/bin/local/sfml \
-DPKG_CONFIG_EXECUTABLE=/usr/local/bin/pkgconf \
Begin to build
FreeBSD% bmake
FreeBSD% bmake install
It is finished now.
FreeBSD% cd ~/bin/local/sfml 
FreeBSD% ls
include          libdata          sfml-audio.pc    sfml-network.pc  sfml-window.pc
lib              sfml-all.pc      sfml-graphics.pc sfml-system.pc   share
FreeBSD% ls include/SFML share/SFML/examples lib libdata/pkgconfig 
Audio        Graphics     Network      System       Window.hpp
Audio.hpp    Graphics.hpp Network.hpp  System.hpp
Config.hpp   Main.hpp     OpenGL.hpp   Window


sfml-all.pc      sfml-graphics.pc sfml-system.pc
sfml-audio.pc    sfml-network.pc  sfml-window.pc

ftp           pong          sockets       sound-capture window
opengl        shader        sound         voip          X11




No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Form options

Submitted comments will be subject to moderation before being displayed.