From c51aed95e974d08e5d3c83122084d9ab72c7d5bb Mon Sep 17 00:00:00 2001 From: Matt Leotta Date: Wed, 23 Jan 2019 13:57:18 -0500 Subject: [PATCH] Add link directories for freetype This change allows the freetype module to be built against external libraries that are not found on the standard system path. I ran into this issue building OpenCV on MacOS against freetype installed by macports. CMake found the libraries at configure time but linking failed at build time. --- modules/freetype/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/freetype/CMakeLists.txt b/modules/freetype/CMakeLists.txt index f188dc3547a..cb863951c81 100644 --- a/modules/freetype/CMakeLists.txt +++ b/modules/freetype/CMakeLists.txt @@ -22,6 +22,7 @@ endif() if( FREETYPE_FOUND AND HARFBUZZ_FOUND ) + link_directories( ${FREETYPE_LIBRARY_DIRS} ${HARFBUZZ_LIBRARY_DIRS} ) ocv_define_module(freetype opencv_core opencv_imgproc WRAP python) ocv_target_link_libraries(${the_module} ${FREETYPE_LIBRARIES} ${HARFBUZZ_LIBRARIES}) ocv_include_directories( ${FREETYPE_INCLUDE_DIRS} ${HARFBUZZ_INCLUDE_DIRS} )