aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-09-13 09:08:35 +0900
committerGitHub <noreply@github.com>2018-09-13 09:08:35 +0900
commit875514ee865b00be67542849f94d2c2561ba4137 (patch)
tree3722f49214cfc33ce936ae69322dbd1c38c0a10f
parentb5b0d8438bdf3cb8b37f311e8047ef6883f858c2 (diff)
parent966632bc5938c42cfb13a2f66976650141e24a9b (diff)
downloadlibquotient-875514ee865b00be67542849f94d2c2561ba4137.tar.gz
libquotient-875514ee865b00be67542849f94d2c2561ba4137.zip
Merge pull request #242 from encombhat/pkg-config
Add QMatrixClient.pc.in
-rw-r--r--CMakeLists.txt5
-rw-r--r--QMatrixClient.pc.in10
2 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa48db03..be1541ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -147,6 +147,7 @@ target_link_libraries(QMatrixClient Qt5::Core Qt5::Network Qt5::Gui)
add_executable(qmc-example ${example_SRCS})
target_link_libraries(qmc-example Qt5::Core QMatrixClient)
+configure_file(QMatrixClient.pc.in ${CMAKE_CURRENT_BINARY_DIR}/QMatrixClient.pc @ONLY NEWLINE_STYLE UNIX)
# Installation
@@ -189,3 +190,7 @@ if (WIN32)
endif (WIN32)
install(TARGETS qmc-example RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+if (UNIX AND NOT APPLE)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QMatrixClient.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+endif()
diff --git a/QMatrixClient.pc.in b/QMatrixClient.pc.in
new file mode 100644
index 00000000..d2938ab7
--- /dev/null
+++ b/QMatrixClient.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include
+libdir=${prefix}/lib
+
+Name: QMatrixClient
+Description: A Qt5 library to write cross-platfrom clients for Matrix
+Version: @API_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lQMatrixClient