FindUTF8proc.cmake 619 B

12345678910111213
  1. find_path2(UTF8PROC_INCLUDE_DIR utf8proc.h)
  2. find_library2(UTF8PROC_LIBRARY NAMES utf8proc utf8proc_static)
  3. find_package_handle_standard_args(UTF8proc DEFAULT_MSG
  4. UTF8PROC_LIBRARY UTF8PROC_INCLUDE_DIR)
  5. mark_as_advanced(UTF8PROC_LIBRARY UTF8PROC_INCLUDE_DIR)
  6. add_library(utf8proc INTERFACE)
  7. target_include_directories(utf8proc SYSTEM BEFORE INTERFACE ${UTF8PROC_INCLUDE_DIR})
  8. target_link_libraries(utf8proc INTERFACE ${UTF8PROC_LIBRARY})
  9. #TODO(dundargoc): this is a hack that should ideally be hardcoded into the utf8proc project via configure_command
  10. target_compile_definitions(utf8proc INTERFACE "UTF8PROC_STATIC")