summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt12
-rw-r--r--admin/pkgconfig/openal.pc.in2
2 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8942a0c8..2f49d3b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,12 @@ OPTION(WERROR "Treat compile warnings as errors" OFF)
OPTION(EXAMPLES "Build example programs" ON)
+IF(WIN32)
+ SET(LIBNAME openal32)
+ELSE()
+ SET(LIBNAME openal)
+ENDIF()
+
SET(LIB_MAJOR_VERSION "1")
SET(LIB_MINOR_VERSION "4")
SET(LIB_BUILD_VERSION "272")
@@ -311,12 +317,6 @@ CONFIGURE_FILE(
ADD_DEFINITIONS(-DAL_BUILD_LIBRARY)
# Build a shared library
-IF(WIN32)
- SET(LIBNAME openal32)
-ELSE()
- SET(LIBNAME openal)
-ENDIF()
-
ADD_LIBRARY(${LIBNAME} SHARED ${OPENAL_OBJS} ${ALC_OBJS})
SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES VERSION ${LIB_VERSION}
SOVERSION ${LIB_MAJOR_VERSION})
diff --git a/admin/pkgconfig/openal.pc.in b/admin/pkgconfig/openal.pc.in
index c27888c6..aaf95bb6 100644
--- a/admin/pkgconfig/openal.pc.in
+++ b/admin/pkgconfig/openal.pc.in
@@ -7,5 +7,5 @@ Name: OpenAL
Description: OpenAL is a cross-platform 3D audio API
Requires: @PKG_CONFIG_REQUIRES@
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lopenal @PKG_CONFIG_LIBS@
+Libs: -L${libdir} -l@LIBNAME@ @PKG_CONFIG_LIBS@
Cflags: -I${includedir}