File tree Expand file tree Collapse file tree 3 files changed +20
-12
lines changed
Expand file tree Collapse file tree 3 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,16 @@ PROJECT(${name}
77 HOMEPAGE_URL ${HOMEPAGE_URL}
88 DESCRIPTION "CLI keyboard layout switcher for Gnome 3 and 4x"
99 VERSION 1.3)
10+ SET (CMAKE_INCLUDE_CURRENT_DIR ON )
1011
1112INCLUDE (GNUInstallDirs )
1213INCLUDE (CMakeDependentOption )
1314
1415FIND_PACKAGE (PkgConfig REQUIRED )
1516PKG_SEARCH_MODULE (GIO REQUIRED gio-2.0 )
1617
18+ CONFIGURE_FILE (config.h.in config.h )
19+
1720SET (CMAKE_EXPORT_COMPILE_COMMANDS ON )
1821
1922SET (GNOME_SHELL_EXTENSIONS_DIR
Original file line number Diff line number Diff line change 1+ /* config.h. Generated from config.h.in by cmake. */
2+
3+ #ifndef CONFIG_H
4+ #define CONFIG_H 1
5+
6+ #define PROJECT_NAME "@PROJECT_NAME@"
7+ #define PROJECT_VERSION "@PROJECT_VERSION@"
8+ #define PROJECT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
9+ #define PROJECT_VERSION_MINOR @PROJECT_VERSION_MINOR@
10+ #define PROJECT_VERSION_PATCH @PROJECT_VERSION_PATCH@
11+ #define PROJECT_VERSION_TWEAK @PROJECT_VERSION_TWEAK@
12+ #define PROJECT_DESCRIPTION "@PROJECT_DESCRIPTION@"
13+ #define PROJECT_HOMEPAGE_URL "@PROJECT_HOMEPAGE_URL@"
14+
15+ #endif /* config.h */
Original file line number Diff line number Diff line change 1717 */
1818
1919#include "switch.h"
20-
21- #define G3KB_SWITCH_VERSION_MAJOR 1
22- #define G3KB_SWITCH_VERSION_MINOR 3
23- #define G3KB_SWITCH_VERSION_PATCH 0
24-
20+ #include "config.h"
2521
2622static void version ( void )
2723{
28- g_print ( "g3kb-switch version %u.%u" ,
29- G3KB_SWITCH_VERSION_MAJOR , G3KB_SWITCH_VERSION_MINOR );
30- #if ( G3KB_SWITCH_VERSION_PATCH + 0 )
31- g_print ( ".%u\n" , G3KB_SWITCH_VERSION_PATCH );
32- #else
33- g_print ( "\n" );
34- #endif
24+ g_print ( "g3kb-switch version %s\n" , PROJECT_VERSION );
3525}
3626
3727
You can’t perform that action at this time.
0 commit comments