FindLIBUV.cmake 705 B

12345678910111213141516171819202122232425262728
  1. # Copyright (C) 2023 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. # Find libuv library
  4. # This module defines
  5. # LIBUV_FOUND, if false, do not try to link to libuv
  6. # LIBUV_LIBRARIES
  7. # LIBUV_INCLUDE_DIR, where to find uv.h
  8. find_path(LIBUV_INCLUDE_DIR NAMES uv.h)
  9. find_library(LIBUV_LIBRARIES NAMES uv libuv)
  10. include(FindPackageHandleStandardArgs)
  11. find_package_handle_standard_args(
  12. LIBUV
  13. FOUND_VAR LIBUV_FOUND
  14. REQUIRED_VARS
  15. LIBUV_LIBRARIES
  16. LIBUV_INCLUDE_DIR
  17. )
  18. if(WIN32)
  19. list(APPEND LIBUV_LIBRARIES iphlpapi)
  20. list(APPEND LIBUV_LIBRARIES psapi)
  21. list(APPEND LIBUV_LIBRARIES userenv)
  22. list(APPEND LIBUV_LIBRARIES ws2_32)
  23. endif()