From 139b0e9203265dfdf4d1b2403376b4d2e6aa8c83 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Mon, 6 Jul 2009 00:55:47 +0200 Subject: [PATCH] CMake: New version system: YearMonth (YYYYmm)-revision. --- CMakeLists.txt | 6 ++++-- src/infobar.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1658aa..ccc67ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,8 +46,9 @@ set(wmfs_src # Set the executable from the wmfs_src add_executable(wmfs ${wmfs_src}) -# Set the version - NOT USED AT THE MOMENT -set(VERSION "0.1rc4 (On The Run)") +# Set the version - Get YEAR and MONTH (YYYYmm) +EXEC_PROGRAM("date '+%Y%m'" OUTPUT_VARIABLE YEAR_MONTH) +set(VERSION "WMFS-${YEAR_MONTH}") # FLAGS set(CFLAGS "-g -Wall -ansi") @@ -101,6 +102,7 @@ pkg_check_modules(wmfs_required libconfuse freetype2 xinerama + xrandr xft) # Generating man page diff --git a/src/infobar.c b/src/infobar.c index baecc00..7482f0e 100644 --- a/src/infobar.c +++ b/src/infobar.c @@ -97,7 +97,7 @@ infobar_init(void) barwin_refresh(infobar[sc].bar); /* Default statustext is set here */ - statustext = _strdup("WMFS-" WMFS_VERSION); + statustext = _strdup(WMFS_VERSION); infobar_draw(sc); }