diff options
author | Slávek Banko <[email protected]> | 2013-08-20 20:18:45 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-08-20 20:18:45 +0200 |
commit | 8e37bb9724a476c7f34bd80545a21a91dd63b5b2 (patch) | |
tree | de87011c7637854b17cbfe8bedcc8865c7ed7e72 | |
parent | dad42352f4ad47d34caf50040367dc2a95772baa (diff) | |
download | tdelibs-8e37bb9724a476c7f34bd80545a21a91dd63b5b2.tar.gz tdelibs-8e37bb9724a476c7f34bd80545a21a91dd63b5b2.zip |
Add version number to pkgconfig file
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | tdelibs.pc.cmake | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f8be8971..ba552432a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -956,6 +956,11 @@ install( FILES ##### pkg-config ################################# +execute_process( + COMMAND awk "/^#define TDE_VERSION_MAJOR/,/^#define TDE_VERSION_RELEASE/{ v[++i]=$3 }; END { print v[1]\".\"v[2]\".\"v[3] };" + INPUT_FILE ${CMAKE_SOURCE_DIR}/tdecore/tdeversion.h + OUTPUT_VARIABLE TDE_RELEASE_NUM + OUTPUT_STRIP_TRAILING_WHITESPACE ) configure_file( tdelibs.pc.cmake tdelibs.pc @ONLY ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdelibs.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} ) diff --git a/tdelibs.pc.cmake b/tdelibs.pc.cmake index 2136f2b87..7c5479bbb 100644 --- a/tdelibs.pc.cmake +++ b/tdelibs.pc.cmake @@ -4,4 +4,5 @@ libdir=@LIB_INSTALL_DIR@ includedir=@INCLUDE_INSTALL_DIR@ Name: TDELibs +Version: @TDE_RELEASE_NUM@ Description: Core libraries for Trinity |