Skip to content

Commit

Permalink
handle mismatched name warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jmckenna committed Apr 15, 2022
1 parent 3e2e013 commit 9a8dd82
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmake/FindRSVG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ find_library(GOBJECT_LIBRARY
)

find_package_handle_standard_args(RSVG DEFAULT_MSG RSVG_LIBRARY RSVG_INCLUDE_DIR)
if (${CMAKE_VERSION} GREATER "3.16") #handle mismatched package name warning
find_package_handle_standard_args(GOBJECT DEFAULT_MSG NAME_MISMATCHED GOBJECT_LIBRARY GOBJECT_INCLUDE_DIR)
else()
find_package_handle_standard_args(GOBJECT DEFAULT_MSG GOBJECT_LIBRARY GOBJECT_INCLUDE_DIR)
endif()
mark_as_advanced(RSVG_LIBRARY RSVG_INCLUDE_DIR RSVG_LIBRARIES RSVG_INCLUDE_DIRS GOBJECT_LIBRARY GOBJECT_INCLUDE_DIR)
set(FPHSA_NAME_MISMATCHED TRUE)
find_package_handle_standard_args(GOBJECT DEFAULT_MSG GOBJECT_LIBRARY GOBJECT_INCLUDE_DIR)
unset(FPHSA_NAME_MISMATCHED)
1mark_as_advanced(RSVG_LIBRARY RSVG_INCLUDE_DIR RSVG_LIBRARIES RSVG_INCLUDE_DIRS GOBJECT_LIBRARY GOBJECT_INCLUDE_DIR)

0 comments on commit 9a8dd82

Please sign in to comment.