Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-commits: [Wireshark-commits] master 6eecb31: Fix up handling of the Kerberos package.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 22 Apr 2018 03:04:32 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=6eecb310305264a99e2a13aa49cb7f7fb6cab296
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

6eecb31 by Guy Harris (guy@xxxxxxxxxxxx):

    Fix up handling of the Kerberos package.
    
    On Ubuntu 16.04, and possibly other versions of Ubuntu, and on Debian
    and other Debian derivatives, packages for MIT and Heimdal Kerberos can
    both be installed at the same time - including developer packages.
    Collisions between headers and libraries are handled by putting them in
    subdirectories of the system include and library directory and having
    their .pc files add -isystem flags to point to the appropriate include
    directory and -L flags to point to the appropriate library directory.
    
    CMake's pkg-config support, however, only looks for -I flags, not
    -isystem flags, in pkg-config output (using --cflags-only-I), so it
    doesn't get the directory in which to look for the headers, and just
    uses the results of --libs-only-l to get a list of library names and
    does nothing with the results of --libs-only-L, causing it not to look
    for libraries in the directory in which to look for the libraries.
    
    We fix this by:
    
    If FindKERBEROS.cmake found Kerberos with pkg-config, have it set
    KERBEROS_DEFINITIONS to the "other" compiler flags, which includes the
    -isystem flag.
    
    For all packages, adding the <PACKAGE>_DEFINITIONS values to
    CMAKE_C_FLAGS and CMAKE_CXX_FLAGS so that they're used when compiling.
    
    If FindKERBEROS.cmake found Kerberos with pkg-config, having it search
    for each of the libraries in KERBEROS_LIBRARIES using find_library()
    with KERBEROS_LIBDIR and KERBEROS_LIBRARY_DIRS as hints, and
    re-assembling the resulting full paths into KERBEROS_LIBRARIES.
    
    Change-Id: Ie18b56b76934f542bd12dc737631c0190026d18a
    Reviewed-on: https://code.wireshark.org/review/27071
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  7853d0e   Remove a few obsolete references to gtk from checkapi and faq.py
    adds  6eecb31   Fix up handling of the Kerberos package.


Summary of changes:
 CMakeLists.txt                   |  8 +++++++
 cmake/modules/FindKERBEROS.cmake | 50 +++++++++++++++++++++++++++++++---------
 2 files changed, 47 insertions(+), 11 deletions(-)