CMake: Fix inconsistent find_package() report output

Most CMake find modules report the binary found, the modules
fixed by this change represent an inconsistent exception.

The first REQUIRED_VAR argument to
find_package_handle_standard_args() is the one used by CMake
to report on the result of find_package().

Compare (master)
  -- Found SNAPPY: /usr/include
to (this change)
  -- Found SNAPPY: /usr/lib/x86_64-linux-gnu/libsnappy.so

This convention of using XXX_LIBRARY matches upstream practice.

Change-Id: Iaa0ec644e963430d73722354f6ee2a3694906ba7
Reviewed-on: https://code.wireshark.org/review/31498
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
João Valverde 2019-01-11 21:47:59 +00:00 committed by Peter Wu
parent 16953eca30
commit 6d08cb2ecd
9 changed files with 9 additions and 9 deletions

View File

@ -31,7 +31,7 @@ find_library( AIRPCAP_LIBRARY
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( AIRPCAP DEFAULT_MSG AIRPCAP_INCLUDE_DIR AIRPCAP_LIBRARY )
find_package_handle_standard_args( AIRPCAP DEFAULT_MSG AIRPCAP_LIBRARY AIRPCAP_INCLUDE_DIR )
if( AIRPCAP_FOUND )
set( AIRPCAP_INCLUDE_DIRS ${AIRPCAP_INCLUDE_DIR} )

View File

@ -31,7 +31,7 @@ find_library( BCG729_LIBRARY
)
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( bcg729 DEFAULT_MSG BCG729_INCLUDE_DIR BCG729_LIBRARY )
find_package_handle_standard_args( bcg729 DEFAULT_MSG BCG729_LIBRARY BCG729_INCLUDE_DIR )
if( BCG729_FOUND )
set( BCG729_INCLUDE_DIRS ${BCG729_INCLUDE_DIR} )

View File

@ -33,7 +33,7 @@ find_library(LZ4_LIBRARY
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( LZ4 DEFAULT_MSG LZ4_INCLUDE_DIR LZ4_LIBRARY )
find_package_handle_standard_args( LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR )
if( LZ4_FOUND )
include( CheckIncludeFile )

View File

@ -31,7 +31,7 @@ find_library( NGHTTP2_LIBRARY
)
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( Nghttp2 DEFAULT_MSG NGHTTP2_INCLUDE_DIR NGHTTP2_LIBRARY )
find_package_handle_standard_args( Nghttp2 DEFAULT_MSG NGHTTP2_LIBRARY NGHTTP2_INCLUDE_DIR )
if( NGHTTP2_FOUND )
set( NGHTTP2_INCLUDE_DIRS ${NGHTTP2_INCLUDE_DIR} )

View File

@ -33,7 +33,7 @@ find_library( PCAP_LIBRARY
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( PCAP DEFAULT_MSG PCAP_INCLUDE_DIR PCAP_LIBRARY )
find_package_handle_standard_args( PCAP DEFAULT_MSG PCAP_LIBRARY PCAP_INCLUDE_DIR )
if( PCAP_FOUND )
set( PCAP_INCLUDE_DIRS ${PCAP_INCLUDE_DIR} )

View File

@ -24,7 +24,7 @@ find_library( SBC_LIBRARY
)
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( SBC DEFAULT_MSG SBC_INCLUDE_DIR SBC_LIBRARY )
find_package_handle_standard_args( SBC DEFAULT_MSG SBC_LIBRARY SBC_INCLUDE_DIR )
if( SBC_FOUND )
set( SBC_INCLUDE_DIRS ${SBC_INCLUDE_DIR} )

View File

@ -32,7 +32,7 @@ find_library(SNAPPY_LIBRARY
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( SNAPPY DEFAULT_MSG SNAPPY_INCLUDE_DIR SNAPPY_LIBRARY )
find_package_handle_standard_args( SNAPPY DEFAULT_MSG SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR )
if( SNAPPY_FOUND )
set( SNAPPY_INCLUDE_DIRS ${SNAPPY_INCLUDE_DIR} )

View File

@ -31,7 +31,7 @@ find_library( SPANDSP_LIBRARY
)
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( SpanDSP DEFAULT_MSG SPANDSP_INCLUDE_DIR SPANDSP_LIBRARY )
find_package_handle_standard_args( SpanDSP DEFAULT_MSG SPANDSP_LIBRARY SPANDSP_INCLUDE_DIR )
if( SPANDSP_FOUND )
set( SPANDSP_INCLUDE_DIRS ${SPANDSP_INCLUDE_DIR} )

View File

@ -37,5 +37,5 @@ find_path(SYSTEMD_INCLUDE_DIRS systemd/sd-login.h HINTS ${PC_SYSTEMD_INCLUDE_DIR
set(SYSTEMD_DEFINITIONS ${PC_SYSTEMD_CFLAGS_OTHER})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SYSTEMD DEFAULT_MSG SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES)
find_package_handle_standard_args(SYSTEMD DEFAULT_MSG SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS)
mark_as_advanced(SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES SYSTEMD_DEFINITIONS)