Review Request 112448: FindSamba add PkgConfig fallback

Christophe Giboudeaux cgiboudeaux at gmx.com
Sat Sep 7 20:48:33 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112448/#review39550
-----------------------------------------------------------



cmake/modules/FindSamba.cmake
<http://git.reviewboard.kde.org/r/112448/#comment29138>

    I recommend using PC_SAMBA_INCLUDEDIR and PC_SAMBA_LIBDIR as hints for the find_path / find_library calls instead
    
    eg:
    if(NOT WIN32)
      find_package(PkgConfig)
      if(PKG_CONFIG_FOUND)
        pkg_check_modules(PC_SAMBA smbclient)
      endif()
    endif()
    
    find_path(SAMBA_INCLUDE_DIR NAMES libsmbclient.h HINTS ${PC_SAMBA_INCLUDEDIR})
    
    find_library(SAMBA_LIBRARIES NAMES smbclient HINTS ${PC_SAMBA_LIBDIR})


- Christophe Giboudeaux


On Sept. 2, 2013, 1:04 p.m., Mark Gaiser wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112448/
> -----------------------------------------------------------
> 
> (Updated Sept. 2, 2013, 1:04 p.m.)
> 
> 
> Review request for Build System.
> 
> 
> Description
> -------
> 
> FindSamba couldn't find samba on my machine. Perhaps because it's Samba 4 and it's include folder is /usr/include/samba-4.0/. However, "pkg-config --cflags-only-I smbclient" worked just fine and returned the correct include path. This patch falls back to pkg-config if it couldn't find samba.
> 
> 
> Diffs
> -----
> 
>   cmake/modules/FindSamba.cmake c4df80f 
> 
> Diff: http://git.reviewboard.kde.org/r/112448/diff/
> 
> 
> Testing
> -------
> 
> Works, finds samba without issues.
> 
> 
> Thanks,
> 
> Mark Gaiser
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20130907/8dd474f6/attachment.html>


More information about the Kde-buildsystem mailing list