macOS: Clang don't link SDL2_ttf

Hi, I want to start develop game in SDL2(that it’s correct installed), but Clang don’t see SDL2_ttf. I moved it to /Library/Frameworks/ as written in read me.

This is cmake from my teacher:

cmake_minimum_required(VERSION 3.5)

set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -pedantic”)

find_package(SDL2 REQUIRED)


set(SOURCE_FILES main.cpp)

add_executable(tetris2 ${SOURCE_FILES})
target_link_libraries(tetris2 ${SDL2_LIBRARIES} SDL2_ttf)

And output:

/Applications/ --build /Users/lubomirskirka/tetris2/cmake-build-debug --target tetris2 – -j 2
Scanning dependencies of target tetris2
[ 50%] Building CXX object CMakeFiles/tetris2.dir/main.cpp.o
[100%] Linking CXX executable tetris2
ld: library not found for -lSDL2_ttf
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [tetris2] Error 1
make[2]: *** [CMakeFiles/tetris2.dir/all] Error 2
make[1]: *** [CMakeFiles/tetris2.dir/rule] Error 2
make: *** [tetris2] Error 2