Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/FindMiniUPnPc.cmake
- This file was added.
# Try to find libminiupnpc | |||||
# MINIUPNPC_FOUND - system has libminiupnpc | |||||
# MINIUPNPC_INCLUDE_DIR - the libminiupnpc include directory | |||||
# MINIUPNPC_LIBRARY - Library needed to use libminiupnpc | |||||
if (MINIUPNPC_INCLUDE_DIR AND MINIUPNPC_LIBRARY) | |||||
# Already in cache, be silent | |||||
set(MINIUPNPC_FIND_QUIETLY TRUE) | |||||
endif() | |||||
find_path(MINIUPNPC_INCLUDE_DIR miniupnpc/miniupnpc.h | |||||
HINTS $ENV{MINIUPNPC_INCLUDE_DIR} | |||||
) | |||||
find_library(MINIUPNPC_LIBRARY NAMES miniupnpc libminiupnpc | |||||
HINTS $ENV{MINIUPNPC_LIBRARY} | |||||
) | |||||
message(STATUS "MiniUPnPc lib: " ${MINIUPNPC_LIBRARY}) | |||||
include(FindPackageHandleStandardArgs) | |||||
find_package_handle_standard_args( | |||||
MiniUPnPc DEFAULT_MSG | |||||
MINIUPNPC_INCLUDE_DIR | |||||
MINIUPNPC_LIBRARY | |||||
) | |||||
mark_as_advanced(MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) | |||||
set(MiniUPnPc_LIBRARIES ${MINIUPNPC_LIBRARY}) | |||||
set(MiniUPnPc_INCLUDE_DIRS ${MINIUPNPC_INCLUDE_DIR}) |