diff options
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | PulseAudioConfig.cmake.in | 12 | ||||
-rw-r--r-- | PulseAudioConfigVersion.cmake.in | 11 | ||||
-rw-r--r-- | configure.ac | 11 |
4 files changed, 37 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index b0107015..8a94a7c9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -51,6 +51,9 @@ pkgconfig_DATA += \ libpulse-mainloop-glib.pc endif +cmakedir = $(libdir)/cmake/PulseAudio +cmake_DATA = PulseAudioConfig.cmake PulseAudioConfigVersion.cmake + homepage: all dist doxygen test -d $$HOME/homepage/private mkdir -p $$HOME/homepage/private/projects/pulseaudio $$HOME/homepage/private/projects/pulseaudio/doxygen diff --git a/PulseAudioConfig.cmake.in b/PulseAudioConfig.cmake.in new file mode 100644 index 00000000..191eb679 --- /dev/null +++ b/PulseAudioConfig.cmake.in @@ -0,0 +1,12 @@ +set(PULSEAUDIO_FOUND TRUE) + +set(PULSEAUDIO_VERSION_MAJOR @PA_MAJOR@) +set(PULSEAUDIO_VERSION_MINOR @PA_MINOR@) +set(PULSEAUDIO_VERSION @PA_MAJOR@.@PA_MINOR@) +set(PULSEAUDIO_VERSION_STRING "@PA_MAJOR@.@PA_MINOR@") + +find_path(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h HINTS "@PA_INCDIR@") +find_library(PULSEAUDIO_LIBRARY NAMES pulse libpulse HINTS "@PA_LIBDIR@") +ifelse(@HAVE_GLIB20@, 1, dnl +find_library(PULSEAUDIO_MAINLOOP_LIBRARY NAMES pulse-mainloop-glib libpulse-mainloop-glib HINTS "@PA_LIBDIR@") +)dnl diff --git a/PulseAudioConfigVersion.cmake.in b/PulseAudioConfigVersion.cmake.in new file mode 100644 index 00000000..e2947de4 --- /dev/null +++ b/PulseAudioConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION @PA_MAJOR@.@PA_MINOR@) + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") +endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + diff --git a/configure.ac b/configure.ac index feeae755..9322ca0d 100644 --- a/configure.ac +++ b/configure.ac @@ -779,6 +779,7 @@ AS_IF([test "x$enable_glib2" = "xyes" && test "x$HAVE_GLIB20" = "x0"], AC_SUBST(GLIB20_CFLAGS) AC_SUBST(GLIB20_LIBS) +AC_SUBST(HAVE_GLIB20) AM_CONDITIONAL([HAVE_GLIB20], [test "x$HAVE_GLIB20" = x1]) AS_IF([test "x$HAVE_GLIB20" = "x1"], AC_DEFINE([HAVE_GLIB], 1, [Have GLIB?])) @@ -1263,6 +1264,16 @@ AC_CONFIG_FILES([src/default.pa:src/daemon/default.pa.in], AC_CONFIG_FILES([src/system.pa:src/daemon/system.pa.in], [m4 src/system.pa > src/system.pa.gen && mv src/system.pa.gen src/system.pa]) +# CMake related ProjectConfig files +PA_LIBDIR="$libdir" +AX_DEFINE_DIR(PA_LIBDIR, PA_LIBDIR, [PulseAudio library dir]) +PA_INCDIR="$includedir" +AX_DEFINE_DIR(PA_INCDIR, PA_INCDIR, [PulseAudio include dir]) + +AC_CONFIG_FILES([PulseAudioConfig.cmake:PulseAudioConfig.cmake.in], + [m4 PulseAudioConfig.cmake > PulseAudioConfig.cmake.gen && mv PulseAudioConfig.cmake.gen PulseAudioConfig.cmake]) +AC_CONFIG_FILES([PulseAudioConfigVersion.cmake]) + AC_OUTPUT # ========================================================================== |