shorter DEFINES for versioning

This commit is contained in:
Pawel "l0ner" Soltys 2015-01-07 14:31:49 +01:00
parent 42c93ac397
commit 72f1b03078
3 changed files with 12 additions and 6 deletions

@ -3,10 +3,12 @@ if(COMMAND cmake_policy)
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
endif(COMMAND cmake_policy) endif(COMMAND cmake_policy)
### General Package stuff
project( tmux-mem-cpu-load ) project( tmux-mem-cpu-load )
set(tmux-mem-cpu-load_VERSION_MAJOR 2) set(VERSION_MAJOR 2)
set(tmux-mem-cpu-load_VERSION_MINOR 3) set(VERSION_MINOR 3)
set(tmux-mem-cpu-load_VERSION_PATCH 0) set(VERSION_PATCH 0)
# generate header file to handle version # generate header file to handle version
configure_file( configure_file(
@ -14,6 +16,8 @@ configure_file(
"${PROJECT_SOURCE_DIR}/version.h" "${PROJECT_SOURCE_DIR}/version.h"
) )
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING set(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."

@ -24,6 +24,8 @@
// Tmux color lookup tables for the different metrics. // Tmux color lookup tables for the different metrics.
#include "luts.h" #include "luts.h"
#include "version.h"
#if defined(__APPLE__) && defined(__MACH__) #if defined(__APPLE__) && defined(__MACH__)
// Apple osx system // Apple osx system
#include "osx/cpu.h" #include "osx/cpu.h"

@ -1,5 +1,5 @@
// the configured options and settings for sysstat // the configured options and settings for sysstat
#define tmux-mem-cpu-load_VERSION_MAJOR @tmux-mem-cpu-load_VERSION_MAJOR@ #define VERSION_MAJOR @VERSION_MAJOR@
#define tmux-mem-cpu-load_VERSION_MINOR @tmux-mem-cpu-load_VERSION_MINOR@ #define VERSION_MINOR @VERSION_MINOR@
#define tmux-mem-cpu-load_VERSION_PATCH @tmux-mem-cpu-load_VERSION_PATCH@ #define VERSION_PATCH @VERSION_PATCH@