diff options
-rw-r--r-- | CMakeLists.txt | 14 | ||||
-rw-r--r-- | admin/pkgconfig/openal.pc.in | 11 |
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} |