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}