From 8c2d4c8b9752763438b5f91943899c445fe23903 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 3 Jan 2020 16:27:59 +0100 Subject: Generate and install mastodonpp.pc. --- CMakeLists.txt | 2 ++ pkg-config/CMakeLists.txt | 7 +++++++ pkg-config/mastodonpp.pc.in | 11 +++++++++++ 3 files changed, 20 insertions(+) create mode 100644 pkg-config/CMakeLists.txt create mode 100644 pkg-config/mastodonpp.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index f71128a..e64a888 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,9 @@ include(debug_flags) add_subdirectory(src) add_subdirectory(include) + add_subdirectory(cmake) +add_subdirectory(pkg-config) if(WITH_TESTS) add_subdirectory(tests) diff --git a/pkg-config/CMakeLists.txt b/pkg-config/CMakeLists.txt new file mode 100644 index 0000000..4640f17 --- /dev/null +++ b/pkg-config/CMakeLists.txt @@ -0,0 +1,7 @@ +include(GNUInstallDirs) + +configure_file("${PROJECT_NAME}.pc.in" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" @ONLY) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") diff --git a/pkg-config/mastodonpp.pc.in b/pkg-config/mastodonpp.pc.in new file mode 100644 index 0000000..06429dd --- /dev/null +++ b/pkg-config/mastodonpp.pc.in @@ -0,0 +1,11 @@ +name=@PROJECT_NAME@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + +Name: ${name} +Description: @PROJECT_DESCRIPTION@ +Version: @PROJECT_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -l${name} -- cgit v1.2.3-54-g00ecf