aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-07-22 18:42:53 -0700
committerChris Robinson <[email protected]>2008-07-22 18:42:53 -0700
commitdc8132e965d93200e6b2ad0ecedfc97373896db8 (patch)
treebab7a419e532a84da7ab02577aa9ce6752ad3f22
parent20bcdc1ef601d7c56daba65ac24f2ffe60aeb7d9 (diff)
Add a pkg-config file to install on the system
-rw-r--r--CMakeLists.txt14
-rw-r--r--admin/pkgconfig/openal.pc.in11
2 files changed, 25 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a43b250..a7c5c33c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -291,10 +291,22 @@ ENDIF()
# This is always available
SET(BACKENDS "${BACKENDS} WaveFile")
+# Needed for openal.pc.in
+SET(prefix ${CMAKE_INSTALL_PREFIX})
+SET(exec_prefix "\${prefix}")
+SET(libdir "\${exec_prefix}/${LIB_INSTALL_DIR}")
+SET(bindir "\${exec_prefix}/bin")
+SET(includedir "\${prefix}/include")
+SET(PACKAGE_VERSION "${LIB_VERSION}")
+
# End configuration
CONFIGURE_FILE(
"${OpenAL_SOURCE_DIR}/config.h.in"
"${OpenAL_BINARY_DIR}/config.h")
+CONFIGURE_FILE(
+ "${OpenAL_SOURCE_DIR}/admin/pkgconfig/openal.pc.in"
+ "${OpenAL_BINARY_DIR}/admin/pkgconfig/openal.pc"
+ @ONLY)
ADD_DEFINITIONS(-DAL_BUILD_LIBRARY)
@@ -325,6 +337,8 @@ INSTALL(FILES include/AL/al.h
include/AL/alext.h
DESTINATION include/AL
)
+INSTALL(FILES "${OpenAL_BINARY_DIR}/admin/pkgconfig/openal.pc"
+ DESTINATION lib/pkgconfig)
IF(EXAMPLES)
ADD_EXECUTABLE(openal-info examples/openal-info.c)
diff --git a/admin/pkgconfig/openal.pc.in b/admin/pkgconfig/openal.pc.in
new file mode 100644
index 00000000..c27888c6
--- /dev/null
+++ b/admin/pkgconfig/openal.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+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@
+Cflags: -I${includedir}