Skip to content

Commit

Permalink
FindMiniupnpc: expose imported library target
Browse files Browse the repository at this point in the history
  • Loading branch information
ligfx committed Aug 17, 2017
1 parent bd29183 commit 26f5d50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMake/FindMiniupnpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ find_package_handle_standard_args(MINIUPNPC DEFAULT_MSG MINIUPNPC_INCLUDE_DIR MI
set(MINIUPNPC_LIBRARIES ${MINIUPNPC_LIBRARY})
set(MINIUPNPC_INCLUDE_DIRS ${MINIUPNPC_INCLUDE_DIR})
mark_as_advanced(MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY MINIUPNPC_API_VERSION_STR)

if (MINIUPNPC_FOUND AND NOT TARGET miniupnpc)
add_library(Miniupnpc::miniupnpc UNKNOWN IMPORTED)
set_target_properties(Miniupnpc::miniupnpc PROPERTIES
IMPORTED_LOCATION ${MINIUPNPC_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${MINIUPNPC_INCLUDE_DIRS}
)
endif()

0 comments on commit 26f5d50

Please sign in to comment.