Search code examples
cmakesdl-2sdl-ttf

How do I check for SDL2_ttf in CMakeLists.txt?


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.


Solution

  • FindSDL_ttf.cmake is part of cmake 3.x just use

    find_package(SDL_ttf REQUIRED)