summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-08-14 10:43:39 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-08-14 13:52:42 +0200
commit2112cf36d6172d99a532b2542344219c3e982938 (patch)
tree4f6638ed911bb106975f913c8b60df1f1a9f7778
parentd049dab443a237e2dd17fb1af5f6b42bf7cb44f5 (diff)
downloadtdegames-2112cf36d6172d99a532b2542344219c3e982938.tar.gz
tdegames-2112cf36d6172d99a532b2542344219c3e982938.zip
Add a pkgconfig file for libtdegames.
Signed-off-by: gregory guy <gregory-tde@laposte.net> (cherry picked from commit 83cbbc2593a54a846f4366c90a87216ecb8fbe12)
-rw-r--r--libtdegames/CMakeLists.txt15
-rw-r--r--libtdegames/libtdegames.pc.cmake12
2 files changed, 27 insertions, 0 deletions
diff --git a/libtdegames/CMakeLists.txt b/libtdegames/CMakeLists.txt
index d124c0c4..22eec9a9 100644
--- a/libtdegames/CMakeLists.txt
+++ b/libtdegames/CMakeLists.txt
@@ -54,3 +54,18 @@ install( FILES
##### install import cmake modules ###############
tde_install_export( )
+
+
+##### other data
+
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
+
+configure_file( ${PROJECT_NAME}.pc.cmake ${PROJECT_NAME}.pc @ONLY )
+
+install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
+ DESTINATION ${PKGCONFIG_INSTALL_DIR}
+)
+
diff --git a/libtdegames/libtdegames.pc.cmake b/libtdegames/libtdegames.pc.cmake
new file mode 100644
index 00000000..ad731b1d
--- /dev/null
+++ b/libtdegames/libtdegames.pc.cmake
@@ -0,0 +1,12 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@PC_EXEC_PREFIX@
+libdir=@PC_LIB_DIR@
+includedir=@PC_INCLUDE_DIR@
+
+Name: @PROJECT_NAME@
+Description: @PROJECT_NAME@ is a collection of functions used by some games for the Trinity Desktop Environment.
+URL: https://mirror.git.trinitydesktop.org/gitea/TDE/tdegames
+Requires: tdelibs
+Version: 1.2.0
+Libs: -L${libdir} -ltdegames
+Cflags: -I${includedir}