diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-10-22 18:15:51 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-10-22 17:35:54 +0000 |
commit | 28bbd565917d59b20458e5de783096bc332c1965 (patch) | |
tree | d8fcd14b2eabbafe0f2fd0b63450e0e33f37bbd9 /cmake | |
parent | a2d49125a52e0eb21215368a7e1f248b6d4a6c06 (diff) |
Add SBC decoding support to Windows
Change-Id: Ibef872dff26c22e2834e958c496c33a5695bb131
Reviewed-on: https://code.wireshark.org/review/18394
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindSBC.cmake | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/cmake/modules/FindSBC.cmake b/cmake/modules/FindSBC.cmake index 00ed88d66e..f361226a08 100644 --- a/cmake/modules/FindSBC.cmake +++ b/cmake/modules/FindSBC.cmake @@ -3,9 +3,11 @@ # SBC_INCLUDE_DIRS - where to find sbc.h # SBC_LIBRARIES - List of libraries when using SBC # SBC_FOUND - True if SBC found +# SBC_DLL_DIR - (Windows) Path to the SBC DLL +# SBC_DLL - (Windows) Name of the SBC DLL include( FindWSWinLibs ) -FindWSWinLibs( "sbc" "SBC_HINTS" ) +FindWSWinLibs( "sbc-.*" "SBC_HINTS" ) find_path( SBC_INCLUDE_DIR NAMES @@ -27,6 +29,19 @@ find_package_handle_standard_args( SBC DEFAULT_MSG SBC_INCLUDE_DIR SBC_LIBRARY ) if( SBC_FOUND ) set( SBC_INCLUDE_DIRS ${SBC_INCLUDE_DIR} ) set( SBC_LIBRARIES ${SBC_LIBRARY} ) + if (WIN32) + set ( SBC_DLL_DIR "${SBC_HINTS}/bin" + CACHE PATH "Path to SBC DLL" + ) + file( GLOB _sbc_dll RELATIVE "${SBC_DLL_DIR}" + "${SBC_DLL_DIR}/libsbc-*.dll" + ) + set ( SBC_DLL ${_sbc_dll} + # We're storing filenames only. Should we use STRING instead? + CACHE FILEPATH "SBC DLL file name" + ) + mark_as_advanced( SBC_DLL_DIR SBC_DLL ) + endif() else() set( SBC_INCLUDE_DIRS ) set( SBC_LIBRARIES ) |