diff --git a/CMakeLists.txt b/CMakeLists.txt index 126d66d..8fcf9b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,5 +81,6 @@ if(WITH_DOC) endif() add_subdirectory("cmake") +add_subdirectory("pkg-config") include("cmake/packages.cmake") 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/mastodon-cpp.pc.in b/pkg-config/mastodon-cpp.pc.in new file mode 100644 index 0000000..40f0ccd --- /dev/null +++ b/pkg-config/mastodon-cpp.pc.in @@ -0,0 +1,11 @@ +name=@PROJECT_NAME@ +prefix=@CMAKE_INSTALL_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} -lpthread +Requires: jsoncpp curlpp