diff -uNr fastText-0.9.1.soversion/CMakeLists.txt fastText-0.9.1/CMakeLists.txt
--- fastText-0.9.1.soversion/CMakeLists.txt 2019-10-04 07:37:21.072590639 +0000
+++ fastText-0.9.1/CMakeLists.txt 2019-10-04 07:37:49.230927768 +0000
@@ -47,6 +47,11 @@
src/utils.cc
src/vector.cc)
+
+include(GNUInstallDirs)
+configure_file("fasttext.pc.in" "fasttext.pc" @ONLY)
+install(FILES "${CMAKE_BINARY_DIR}/fasttext.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
add_library(fasttext-shared SHARED ${SOURCE_FILES} ${HEADER_FILES})
add_library(fasttext-static STATIC ${SOURCE_FILES} ${HEADER_FILES})
add_library(fasttext-static_pic STATIC ${SOURCE_FILES} ${HEADER_FILES})
diff -uNr fastText-0.9.1.soversion/fasttext.pc.in fastText-0.9.1/fasttext.pc.in
--- fastText-0.9.1.soversion/fasttext.pc.in 1970-01-01 00:00:00.000000000 +0000
+++ fastText-0.9.1/fasttext.pc.in 2019-10-04 07:37:49.231927781 +0000
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_FULL_LIBEXECDIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+
+Name: @PROJECT_NAME@
+Description: Efficient learning of word representations and sentence classification
+Version: @PROJECT_VERSION@
+Libs: -L${libdir} -lfasttext
+Cflags: -I${includedir}