diff options
author | Gerald Combs <gerald@wireshark.org> | 2021-07-14 09:10:09 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2021-07-14 09:10:09 -0700 |
commit | 8834b470d04165dea28b37765c1cd8ac50ef760c (patch) | |
tree | c819973d5c1030026d01e7ab428a11cbd07feb5e | |
parent | 1f9f287fbaea0a16951cefa12cd1626ea1bbb1cd (diff) |
CMake: Fixup SpanDSP's TIFF includes.
Add TIFF_INCLUDE_DIR to SPANDSP_INCLUDE_DIRS, but only if TIFF has been
found.
Ping #17477.
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | cmake/modules/FindSPANDSP.cmake | 6 | ||||
-rw-r--r-- | plugins/codecs/G722/CMakeLists.txt | 6 | ||||
-rw-r--r-- | plugins/codecs/G726/CMakeLists.txt | 6 |
4 files changed, 8 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d891e75ea..a101da1210 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1249,7 +1249,6 @@ ws_find_package(NL ENABLE_NETLINK HAVE_LIBNL) ws_find_package(SBC ENABLE_SBC HAVE_SBC) # SpanDSP codec -find_package(TIFF QUIET) ws_find_package(SPANDSP ENABLE_SPANDSP HAVE_SPANDSP) ws_find_package(BCG729 ENABLE_BCG729 HAVE_BCG729) diff --git a/cmake/modules/FindSPANDSP.cmake b/cmake/modules/FindSPANDSP.cmake index 70aafc1165..612304c09e 100644 --- a/cmake/modules/FindSPANDSP.cmake +++ b/cmake/modules/FindSPANDSP.cmake @@ -14,6 +14,9 @@ if( NOT WIN32) pkg_search_module(SPANDSP spandsp) endif() +# spandsp.h includes tiffio.h. +find_package(TIFF QUIET) + find_path( SPANDSP_INCLUDE_DIR NAMES spandsp.h HINTS @@ -35,6 +38,9 @@ find_package_handle_standard_args( SPANDSP DEFAULT_MSG SPANDSP_LIBRARY SPANDSP_I if( SPANDSP_FOUND ) set( SPANDSP_INCLUDE_DIRS ${SPANDSP_INCLUDE_DIR} ) + if( TIFF_FOUND ) + list(APPEND SPANDSP_INCLUDE_DIRS ${TIFF_INCLUDE_DIR}) + endif() set( SPANDSP_LIBRARIES ${SPANDSP_LIBRARY} ) if (WIN32) set ( SPANDSP_DLL_DIR "${SPANDSP_HINTS}/bin" diff --git a/plugins/codecs/G722/CMakeLists.txt b/plugins/codecs/G722/CMakeLists.txt index 7aad62fe9f..5807d4915d 100644 --- a/plugins/codecs/G722/CMakeLists.txt +++ b/plugins/codecs/G722/CMakeLists.txt @@ -38,11 +38,7 @@ target_include_directories(g722 PRIVATE ${CMAKE_SOURCE_DIR}/codecs) target_link_libraries(g722 wsutil ${SPANDSP_LIBRARIES}) -target_include_directories(g722 - SYSTEM PRIVATE - ${SPANDSP_INCLUDE_DIRS} - ${TIFF_INCLUDE_DIR} - ) +target_include_directories(g722 SYSTEM PRIVATE ${SPANDSP_INCLUDE_DIRS}) install_plugin(g722 codecs) diff --git a/plugins/codecs/G726/CMakeLists.txt b/plugins/codecs/G726/CMakeLists.txt index 65a7f3d576..8eac543891 100644 --- a/plugins/codecs/G726/CMakeLists.txt +++ b/plugins/codecs/G726/CMakeLists.txt @@ -38,11 +38,7 @@ target_include_directories(g726 PRIVATE ${CMAKE_SOURCE_DIR}/codecs) target_link_libraries(g726 wsutil ${SPANDSP_LIBRARIES}) -target_include_directories(g726 - SYSTEM PRIVATE - ${SPANDSP_INCLUDE_DIRS} - ${TIFF_INCLUDE_DIR} - ) +target_include_directories(g726 SYSTEM PRIVATE ${SPANDSP_INCLUDE_DIRS}) install_plugin(g726 codecs) |