Add freetype error when building opencv4.6

When using the default CMakeLists.txt of freetype, it prompts that freetype and harfbuzz cannot be found.
After modifying it to CMakeLists.txt of the same problem in the issue on giithub, it is prompted


CMake Warning at cmake/OpenCVUtils.cmake:1675 (message):
  Unexpected CMake generator expression: $<$<NOT:$<CONFIG:DEBUG>>:"C:/Program
  Files/FreeType/lib/freetype.lib">
Call Stack (most recent call first):
  CMakeLists.txt:1162 (ocv_get_all_libs)

CMake Warning at cmake/OpenCVUtils.cmake:1675 (message):
  Unexpected CMake generator expression: $<$<CONFIG:DEBUG>:"freetyped.lib">
Call Stack (most recent call first):
  CMakeLists.txt:1162 (ocv_get_all_libs)

do you have a link for us ?

cmake: find freetype and harfbuzz even on windows · Issue #1497 · opencv/opencv_contrib (github.com)
CMakeLists.txt I modified according to the last answer

1 Like