# Revision history [back]

Hi, I had this problem while linking opencv_freetype module from contrib modules. I found the problem lies in the library names used by cmake config file. I don't know the proper way to fix it but modifying the cmakelists.txt file has worked for me.

The specific modification I did:

1. find CMakeLists.txt file under <contrib_module_dir>/modules/freetype/CMakeLists.txt
2. find the line ocv_define_module(freetype opencv_core...)
3. locate the library variable ${freetype2_LIBRARIES} and change it to${FREETYPE_LIBRARIES}
4. locate the variable ${harfbuzz_LIBRARIES} and change it to${HARFBUZZ_LIBRARIES}

BTW I had both freetype and harfbuzz installed homebrew, it seems the configuration file has found both libraries, just the libraries' names got messed up.

and try compile again see if it resolves your problem.