From 71a78b0e9037b4b792d470275491ef8197adbf72 Mon Sep 17 00:00:00 2001 From: David GUGLIELMI Date: Thu, 9 May 2024 14:26:18 +0200 Subject: [PATCH] Add pkg-config file --- Build/pkgconfig/bento4.pc.in | 9 +++++++++ CMakeLists.txt | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Build/pkgconfig/bento4.pc.in diff --git a/Build/pkgconfig/bento4.pc.in b/Build/pkgconfig/bento4.pc.in new file mode 100644 index 00000000..b745420a --- /dev/null +++ b/Build/pkgconfig/bento4.pc.in @@ -0,0 +1,9 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=${prefix}/include +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ + +Name: @PROJECT_NAME@ +Description: Full-featured MP4 format, MPEG DASH, HLS, CMAF SDK and tools +Version: @BENTO4_VERSION@ +Libs: -L${libdir} -lap4 +Cflags: -I${includedir}/bento4 diff --git a/CMakeLists.txt b/CMakeLists.txt index bf6d72ec..61353512 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,12 @@ configure_package_config_file( INSTALL_DESTINATION "${config_install_dir}" ) +configure_file( + "Build/pkgconfig/bento4.pc.in" + "${generated_dir}/bento4.pc" + @ONLY +) + install( TARGETS ap4 ${BENTO4_APPS_LOWERCASE} EXPORT "${TARGETS_EXPORT_NAME}" @@ -143,6 +149,11 @@ install( DESTINATION "${config_install_dir}" ) +install( + FILES "${generated_dir}/bento4.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" +) + install( EXPORT "${TARGETS_EXPORT_NAME}" NAMESPACE "${namespace}"