UseMiniupnpc.cmake 470 B

123456789101112
  1. function(eth_apply TARGET REQUIRED)
  2. find_package (Miniupnpc 1.8.2013)
  3. eth_show_dependency(MINIUPNPC miniupnpc)
  4. if (MINIUPNPC AND MINIUPNPC_FOUND)
  5. target_include_directories(${TARGET} SYSTEM PUBLIC ${MINIUPNPC_INCLUDE_DIRS})
  6. target_link_libraries(${TARGET} ${MINIUPNPC_LIBRARIES})
  7. target_compile_definitions(${TARGET} PUBLIC ETH_MINIUPNPC)
  8. elseif (NOT ${REQUIRED} STREQUAL "OPTIONAL")
  9. message(FATAL_ERROR "Miniupnpc library not found")
  10. endif()
  11. endfunction()