From c06ba0307ecba727a664e948fb936ad397c7033f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 28 Jan 2015 14:46:01 -0800 Subject: [PATCH] make sure we grab openmp for soxr on Android --- cmake/modules/FindSoxr.cmake | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindSoxr.cmake b/cmake/modules/FindSoxr.cmake index 088514e12d..ab5ba83796 100644 --- a/cmake/modules/FindSoxr.cmake +++ b/cmake/modules/FindSoxr.cmake @@ -22,9 +22,20 @@ 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}) + +if (ANDROID) + set(SOXR_NAMES "libsoxr.a") +elseif () + set(SOXR_NAMES "soxr") +endif () + +find_library(SOXR_LIBRARIES NAMES ${SOXR_NAMES} PATH_SUFFIXES lib HINTS ${SOXR_SEARCH_DIRS}) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(soxr DEFAULT_MSG SOXR_INCLUDE_DIRS SOXR_LIBRARIES) +find_package_handle_standard_args(SOXR DEFAULT_MSG SOXR_INCLUDE_DIRS SOXR_LIBRARIES) + +if (ANDROID) + set(SOXR_LIBRARIES ${SOXR_LIBRARIES} "-fopenmp") +endif () mark_as_advanced(SOXR_INCLUDE_DIRS SOXR_LIBRARIES SOXR_SEARCH_DIRS) \ No newline at end of file