Skip to content
Snippets Groups Projects
Verified Commit 94b68f34 authored by Nathaniel R. Lewis's avatar Nathaniel R. Lewis Committed by Jean-Marc Valin
Browse files

cmake - Add support for detecting the presence of lrint and lrintf.

parent e7806451
No related branches found
No related tags found
No related merge requests found
......@@ -314,6 +314,11 @@ if(COMPILER_SUPPORT_NEON AND OPUS_USE_NEON)
endif()
endif()
target_compile_definitions(opus
PRIVATE
$<$<BOOL:${HAVE_LRINT}>:HAVE_LRINT>
$<$<BOOL:${HAVE_LRINTF}>:HAVE_LRINTF>)
install(TARGETS opus
EXPORT OpusTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
......
......@@ -16,6 +16,10 @@ if(HAVE_LIBM)
list(APPEND OPUS_REQUIRED_LIBRARIES m)
endif()
include(CheckFunctionExists)
check_function_exists(lrintf HAVE_LRINTF)
check_function_exists(lrint HAVE_LRINT)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(i[0-9]86|x86|X86|amd64|AMD64|x86_64)")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OPUS_CPU_X64 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment