From 102f076412f4066f43fc7397f1f539a5bbc737d9 Mon Sep 17 00:00:00 2001 From: Stephen Birarda <commit@birarda.com> Date: Thu, 22 Jan 2015 14:09:29 -0800 Subject: [PATCH] look for soxr and not redundant libsoxr --- cmake/modules/FindLibSoxr.cmake | 30 --------------------------- cmake/modules/FindSoxr.cmake | 30 +++++++++++++++++++++++++++ libraries/audio-client/CMakeLists.txt | 6 +++--- 3 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 cmake/modules/FindLibSoxr.cmake create mode 100644 cmake/modules/FindSoxr.cmake diff --git a/cmake/modules/FindLibSoxr.cmake b/cmake/modules/FindLibSoxr.cmake deleted file mode 100644 index b43e05c4b7..0000000000 --- a/cmake/modules/FindLibSoxr.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# -# FindLibsoxr.cmake -# -# Try to find the libsoxr resampling library -# -# You can provide a LIBSOXR_ROOT_DIR which contains lib and include directories -# -# Once done this will define -# -# LIBSOXR_FOUND - system found libsoxr -# LIBSOXR_INCLUDE_DIRS - the libsoxr include directory -# LIBSOXR_LIBRARIES - link to this to use libsoxr -# -# Created on 1/22/2015 by Stephen Birarda -# Copyright 2015 High Fidelity, Inc. -# -# Distributed under the Apache License, Version 2.0. -# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -# - -include("${MACRO_DIR}/HifiLibrarySearchHints.cmake") -hifi_library_search_hints("libsoxr") - -find_path(LIBSOXR_INCLUDE_DIRS soxr.h PATH_SUFFIXES include HINTS ${LIBSOXR_SEARCH_DIRS}) -find_library(LIBSOXR_LIBRARIES NAMES soxr PATH_SUFFIXES lib HINTS ${LIBSOXR_SEARCH_DIRS}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(libsoxr DEFAULT_MSG LIBSOXR_INCLUDE_DIRS LIBSOXR_LIBRARIES) - -mark_as_advanced(LIBSOXR_INCLUDE_DIRS LIBSOXR_LIBRARIES LIBSOXR_SEARCH_DIRS) \ No newline at end of file diff --git a/cmake/modules/FindSoxr.cmake b/cmake/modules/FindSoxr.cmake new file mode 100644 index 0000000000..088514e12d --- /dev/null +++ b/cmake/modules/FindSoxr.cmake @@ -0,0 +1,30 @@ +# +# FindSoxr.cmake +# +# Try to find the libsoxr resampling library +# +# You can provide a LIBSOXR_ROOT_DIR which contains lib and include directories +# +# Once done this will define +# +# SOXR_FOUND - system found libsoxr +# SOXR_INCLUDE_DIRS - the libsoxr include directory +# SOXR_LIBRARIES - link to this to use libsoxr +# +# Created on 1/22/2015 by Stephen Birarda +# Copyright 2015 High Fidelity, Inc. +# +# Distributed under the Apache License, Version 2.0. +# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +# + +include("${MACRO_DIR}/HifiLibrarySearchHints.cmake") +hifi_library_search_hints("soxr") + +find_path(SOXR_INCLUDE_DIRS soxr.h PATH_SUFFIXES include HINTS ${SOXR_SEARCH_DIRS}) +find_library(SOXR_LIBRARIES NAMES soxr PATH_SUFFIXES lib HINTS ${SOXR_SEARCH_DIRS}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(soxr DEFAULT_MSG SOXR_INCLUDE_DIRS SOXR_LIBRARIES) + +mark_as_advanced(SOXR_INCLUDE_DIRS SOXR_LIBRARIES SOXR_SEARCH_DIRS) \ No newline at end of file diff --git a/libraries/audio-client/CMakeLists.txt b/libraries/audio-client/CMakeLists.txt index 3a2552bfd4..6b24ebcb93 100644 --- a/libraries/audio-client/CMakeLists.txt +++ b/libraries/audio-client/CMakeLists.txt @@ -21,9 +21,9 @@ target_link_libraries(${TARGET_NAME} gverb) list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES "${GVERB_INCLUDE_DIRS}") # we use libsoxr for resampling -find_package(LibSoxr REQUIRED) -target_link_libraries(${TARGET_NAME} ${LIBSOXR_LIBRARIES}) -include_directories(SYSTEM ${LIBSOXR_INCLUDE_DIRS}) +find_package(Soxr REQUIRED) +target_link_libraries(${TARGET_NAME} ${SOXR_LIBRARIES}) +include_directories(SYSTEM ${SOXR_INCLUDE_DIRS}) # call macro to include our dependency includes and bubble them up via a property on our target include_dependency_includes() \ No newline at end of file