FindIDN.cmake 682 B

1234567891011121314151617181920212223242526
  1. # - Find IDN
  2. #
  3. # IDN_INCLUDE - Where to find LibIDN public headers
  4. # IDN_LIBS - List of libraries when using LibIDN.
  5. # IDN_FOUND - True if LibIDN found.
  6. find_path(IDN_INCLUDE_DIR
  7. idna.h
  8. HINTS $ENV{IDN_ROOT}/include)
  9. find_library(IDN_LIBRARIES
  10. idn
  11. HINTS $ENV{IDN_ROOT}/lib)
  12. include(FindPackageHandleStandardArgs)
  13. find_package_handle_standard_args(IDN DEFAULT_MSG IDN_LIBRARIES IDN_INCLUDE_DIR)
  14. mark_as_advanced(IDN_INCLUDE_DIR IDN_LIBRARIES)
  15. if (IDN_FOUND AND NOT TARGET IDN::IDN)
  16. add_library(IDN::IDN UNKNOWN IMPORTED)
  17. set_target_properties(IDN::IDN PROPERTIES
  18. IMPORTED_LOCATION ${IDN_LIBRARIES}
  19. INTERFACE_INCLUDE_DIRECTORIES ${IDN_INCLUDE_DIR}
  20. )
  21. endif()