Browse Source

Add version number to pkgconfig file

Slávek Banko 5 years ago
parent
commit
8e37bb9724
2 changed files with 6 additions and 0 deletions
  1. 5
    0
      CMakeLists.txt
  2. 1
    0
      tdelibs.pc.cmake

+ 5
- 0
CMakeLists.txt View File

@@ -956,6 +956,11 @@ install( FILES
956 956
 
957 957
 ##### pkg-config #################################
958 958
 
959
+execute_process(
960
+  COMMAND awk "/^#define TDE_VERSION_MAJOR/,/^#define TDE_VERSION_RELEASE/{ v[++i]=$3 }; END { print v[1]\".\"v[2]\".\"v[3] };"
961
+  INPUT_FILE ${CMAKE_SOURCE_DIR}/tdecore/tdeversion.h
962
+  OUTPUT_VARIABLE TDE_RELEASE_NUM
963
+  OUTPUT_STRIP_TRAILING_WHITESPACE )
959 964
 configure_file( tdelibs.pc.cmake tdelibs.pc @ONLY )
960 965
 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdelibs.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
961 966
 

+ 1
- 0
tdelibs.pc.cmake View File

@@ -4,4 +4,5 @@ libdir=@LIB_INSTALL_DIR@
4 4
 includedir=@INCLUDE_INSTALL_DIR@
5 5
 
6 6
 Name: TDELibs
7
+Version: @TDE_RELEASE_NUM@
7 8
 Description: Core libraries for Trinity

Loading…
Cancel
Save