summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Oliver <protogonoi@gmail.com>2020-09-08 21:12:54 +1000
committerRalph Giles <giles@thaumas.net>2020-11-05 19:47:06 -0800
commit3c177d011684fce294edce5ea93f27d3453e6830 (patch)
treeb07f39da0bd1b8064ab711a7cc713b17140d83c9
parent98eddc72d36e3421519d54b101c09b57e4d4d10d (diff)
downloadlibvorbis-git-3c177d011684fce294edce5ea93f27d3453e6830.tar.gz
Fix pkgconfig creation with cmake.
The cmake build script was not setting a VORBIS_LIBS variable that is used to update pkg-config files. This results in linking errors in downstream projects due to missing dependencies (in this case libm). This patch just updates the cmake script to behave the same as configure does currently. Signed-off-by: evpobr <evpobr@gmail.com>
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb99e2cf..c42f6a5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
# Find math library
check_library_exists(m floor "" HAVE_LIBM)
+if(HAVE_LIBM)
+ set(VORBIS_LIBS "-lm")
+endif()
# Find ogg dependency
if(NOT TARGET Ogg::ogg)