I am currently writing an SDL2 program with the SDL2-ttf library and wanted to add a check for it in CMakeLists.txt. How do I do that?
I am using CMake 3.1.
I am currently writing an SDL2 program with the SDL2-ttf library and wanted to add a check for it in CMakeLists.txt. How do I do that?
I am using CMake 3.1.
The FindSDL_ttf doesn't work with SDL2, so you'll have to use a third party option.
I've used this and it works: https://raw.githubusercontent.com/Deraen/ohj2710/master/cmake_modules/FindSDL2TTF.cmake
Just put it in a directory included by
set(CMAKE_MODULE_PATH /path/to/file)
and then use it
find_package(SDL2TTF)
FindSDL_ttf.cmake is part of cmake 3.x just use