I can build an SDL3.DLL + SDL3_image.dll without any problems using the following commands:
SDL3:
cmake -S ../SDL/ -B . -DCMAKE_CXX_COMPILER="/usr/bin/x86_64-w64-mingw32-g++" -DCMAKE_C_COMPILER="/usr/bin/x86_64-w64-mingw32-gcc" -DCMAKE_RC_COMPILER="/usr/bin/x86_64-w64-mingw32-windres" -DCMAKE_FIND_ROOT_PATH="/usr/x86_64-w64-mingw32" -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="ONLY" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" -DCMAKE_SYSTEM_NAME="Windows" --install-prefix ~/SDL_win64_DLL
SDL3_image:
cmake -S ../SDL_image/ -B . -DCMAKE_CXX_COMPILER="/usr/bin/x86_64-w64-mingw32-g++" -DCMAKE_C_COMPILER="/usr/bin/x86_64-w64-mingw32-gcc" -DCMAKE_RC_COMPILER="/usr/bin/x86_64-w64-mingw32-windres" -DCMAKE_FIND_ROOT_PATH="/usr/x86_64-w64-mingw32" -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="ONLY" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" -DCMAKE_SYSTEM_NAME="Windows" --install-prefix ~/SDL_win64_DLL
But when I try to build an SDL3_ttf.dll, I get an error because of “Freetype”.
cmake -S ../SDL_ttf -B . -DCMAKE_CXX_COMPILER="/usr/bin/x86_64-w64-mingw32-g++" -DCMAKE_C_COMPILER="/usr/bin/x86_64-w64-mingw32-gcc" -DCMAKE_RC_COMPILER="/usr/bin/x86_64-w64-mingw32-windres" -DCMAKE_FIND_ROOT_PATH="/usr/x86_64-w64-mingw32" -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="ONLY" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" -DCMAKE_SYSTEM_NAME="Windows" --install-prefix ~/SDL_win64_DLL
-- The C compiler identification is GNU 10.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring SDL3_ttf 3.0.0
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_WL_NO_UNDEFINED
-- Performing Test HAVE_WL_NO_UNDEFINED - Success
-- Linker identification: GNUlike
-- Performing Test LINKER_SUPPORTS_VERSION_SCRIPT
-- Performing Test LINKER_SUPPORTS_VERSION_SCRIPT - Success
-- SDL3_ttf: Using system freetype library
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:255 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/tux/Schreibtisch/Git_SDL_Script/SDL/SDL3_ttf/build_win64/CMakeFiles/CMakeOutput.log".
See also "/home/tux/Schreibtisch/Git_SDL_Script/SDL/SDL3_ttf/build_win64/CMakeFiles/CMakeError.log".
Does anyone have an idea how to get around this?
Attached are the two log files.
CMakeError.log (1.9 KB)
CMakeOutput.log (24.7 KB)