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 https://github.com/SFML/SFML 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 \
-DSFML_BUILD_EXAMPLES=ON \
-DPKG_CONFIG_EXECUTABLE=/usr/local/bin/pkgconf \
-DSFML_INSTALL_PKGCONFIG_FILES=ON
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 
include/SFML:
Audio        Graphics     Network      System       Window.hpp
Audio.hpp    Graphics.hpp Network.hpp  System.hpp
Config.hpp   Main.hpp     OpenGL.hpp   Window

lib:
libsfml-audio.so          libsfml-graphics.so.2.4.2 libsfml-system.so.2.4
libsfml-audio.so.2.4      libsfml-network.so        libsfml-system.so.2.4.2
libsfml-audio.so.2.4.2    libsfml-network.so.2.4    libsfml-window.so
libsfml-graphics.so       libsfml-network.so.2.4.2  libsfml-window.so.2.4
libsfml-graphics.so.2.4   libsfml-system.so         libsfml-window.so.2.4.2

libdata/pkgconfig:
sfml-all.pc      sfml-graphics.pc sfml-system.pc
sfml-audio.pc    sfml-network.pc  sfml-window.pc

share/SFML/examples:
ftp           pong          sockets       sound-capture window
opengl        shader        sound         voip          X11

 

 

Trackbacks

No Trackbacks

Comments

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.
CAPTCHA

Form options

Submitted comments will be subject to moderation before being displayed.