I’ve now got it working and can build SDL3_ttf.dll and SDL3_rtf.dll under Linux.
I’ve written a quick guide for this.
Thanks to these following tips: [SDL3.x] make / cmake Build Parameters - #4 by yataro
Introduction
The following instructions apply if you leave the installation folder of CMAKE
at default.
First, back up the folder: usr/local/
SDL3_ttf.dll
If the following error occurs, follow the instructions below.
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Freetype (missing: FREETYPE_LIBRARY) (found version
"2.11.1")
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindFreetype.cmake:162 (find_package_handle_standard_args)
CMakeLists.txt:253 (find_package)
Download the latest FreeType and install win64-cross (dll).
Install cmake-gui
sudo apt install cmake-qt-gui
Switch to the folder with .../SDL/SDL3_ttf/build_win64
.
Double-click on CMakeCache.txt
, this should then open it with cmake-gui
.
Change the following paths:
-
FREETYPE_INCLUDE_DIR_freetype
usr/include/freetype2
→/usr/local/include/freetype2
-
FREETYPE_INCLUDE_DIR_ft2build
usr/include/freetype2
→/usr/local/include/freetype2
-
Click
[Generate]
. -
Exit the tool.
-
In the console, type
make
/make install
, then theSDL3_ttf.dll
should be built.
SDL3_rtf.dll
Change to the folder with .../SDL/SDL3_ttf/build_win64
.
Double click on CMakeCache.txt
, this should then open it with cmake-gui
.
Change the following path:
-
SDL3_ttf_DIR
SDL3_ttf_DIR-NOTFOUND
→/usr/local/lib/cmake/SDL3_ttf
-
Click
[Generate]
. -
Exit tool.
-
In the console type
make
/make install
, then theSDL3_rtf.dll
should be built.