Collect top level code files into common directory.

A little more organized.
This commit is contained in:
Matt McCormick 2015-01-20 08:04:02 -05:00
parent 5132f338fd
commit 9498e06ac4
16 changed files with 15 additions and 14 deletions

@ -46,7 +46,7 @@ endif()
# generate header file to handle version # generate header file to handle version
configure_file( configure_file(
"${PROJECT_SOURCE_DIR}/version.h.in" "${PROJECT_SOURCE_DIR}/version.h" "${PROJECT_SOURCE_DIR}/common/version.h.in" "${PROJECT_BINARY_DIR}/version.h"
) )
# set build type # set build type
@ -77,10 +77,11 @@ else()
endif() endif()
# set common source files # set common source files
set(COMMON_SOURCES "tmux-mem-cpu-load.cc" "graph.cc") set(COMMON_SOURCES "common/tmux-mem-cpu-load.cc" "common/graph.cc")
# add binary tree so we find version.h # add binary tree so we find version.h
include_directories("${PROJECT_BINARY_DIR}") include_directories("${PROJECT_BINARY_DIR}")
include_directories("${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/common")
add_executable(tmux-mem-cpu-load ${COMMON_SOURCES} ${METER_SOURCES}) add_executable(tmux-mem-cpu-load ${COMMON_SOURCES} ${METER_SOURCES})
install(TARGETS tmux-mem-cpu-load RUNTIME DESTINATION bin) install(TARGETS tmux-mem-cpu-load RUNTIME DESTINATION bin)

@ -28,7 +28,7 @@
#include "getsysctl.h" #include "getsysctl.h"
#include "load.h" #include "load.h"
#include "../luts.h" #include "luts.h"
// Load Averages // Load Averages
std::string load_string( bool use_colors = false ) std::string load_string( bool use_colors = false )

@ -25,8 +25,8 @@
#include "getsysctl.h" #include "getsysctl.h"
#include "memory.h" #include "memory.h"
#include "../luts.h" #include "luts.h"
#include "../conversions.h" #include "conversions.h"
std::string mem_string( bool use_colors = false ) std::string mem_string( bool use_colors = false )
{ {

@ -28,8 +28,8 @@
#include "getsysctl.h" #include "getsysctl.h"
#include "memory.h" #include "memory.h"
#include "../luts.h" #include "luts.h"
#include "../conversions.h" #include "conversions.h"
std::string mem_string( bool use_colors = false ) std::string mem_string( bool use_colors = false )
{ {

@ -21,7 +21,7 @@
#include <unistd.h> // usleep #include <unistd.h> // usleep
#include "cpu.h" #include "cpu.h"
#include "../luts.h" #include "luts.h"
float cpu_percentage( unsigned cpu_usage_delay ) float cpu_percentage( unsigned cpu_usage_delay )
{ {

@ -23,7 +23,7 @@
#include <linux/kernel.h> // SI_LOAD_SHIFT #include <linux/kernel.h> // SI_LOAD_SHIFT
#include "load.h" #include "load.h"
#include "../luts.h" #include "luts.h"
std::string load_string( bool use_colors = false ) std::string load_string( bool use_colors = false )
{ {

@ -21,8 +21,8 @@
#include <sys/sysinfo.h> #include <sys/sysinfo.h>
#include "memory.h" #include "memory.h"
#include "../luts.h" #include "luts.h"
#include "../conversions.h" #include "conversions.h"
std::string mem_string( bool use_colors = false ) std::string mem_string( bool use_colors = false )
{ {

@ -25,7 +25,7 @@
#include <stdlib.h> // getloadavg() #include <stdlib.h> // getloadavg()
#include "load.h" #include "load.h"
#include "../luts.h" #include "luts.h"
std::string load_string( bool use_colors = false ) std::string load_string( bool use_colors = false )
{ {

@ -22,8 +22,8 @@
#include <sys/sysctl.h> // for sysctl #include <sys/sysctl.h> // for sysctl
#include "memory.h" #include "memory.h"
#include "../luts.h" #include "luts.h"
#include "../conversions.h" #include "conversions.h"
std::string mem_string( bool use_colors ) std::string mem_string( bool use_colors )
{ {