Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Opus
Commits
94b68f34
Unverified
Commit
94b68f34
authored
May 09, 2019
by
Nathaniel R. Lewis
Committed by
Jean-Marc Valin
Apr 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake - Add support for detecting the presence of lrint and lrintf.
Signed-off-by:
Jean-Marc Valin
<
jmvalin@jmvalin.ca
>
parent
e7806451
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
CMakeLists.txt
CMakeLists.txt
+5
-0
opus_config.cmake
opus_config.cmake
+4
-0
No files found.
CMakeLists.txt
View file @
94b68f34
...
...
@@ -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
}
...
...
opus_config.cmake
View file @
94b68f34
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment