Change CMakeLists.txt, so it builds on all systems, not only on Linux

This commit is contained in:
golinski 2016-03-07 15:14:32 +01:00
parent 159051079b
commit e9a3726de7

@ -59,7 +59,7 @@ endif(NOT CMAKE_BUILD_TYPE)
# detect system type # detect system type
if(CMAKE_SYSTEM_NAME MATCHES "Linux") if(CMAKE_SYSTEM_NAME MATCHES "Linux")
message(STATUS "Linux detected") message(STATUS "Linux detected")
set(METER_SOURCES "linux/memory.cc" "linux/cpu.cc" "common/load.cc" "common/powerline.cc") set(METER_SOURCES "linux/memory.cc" "linux/cpu.cc" "common/load.cc")
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
message(STATUS "Darwin detected") message(STATUS "Darwin detected")
set(METER_SOURCES "osx/memory.cc" "osx/cpu.cc" "common/load.cc") set(METER_SOURCES "osx/memory.cc" "osx/cpu.cc" "common/load.cc")
@ -80,7 +80,7 @@ else()
endif() endif()
# set common source files # set common source files
set(COMMON_SOURCES "common/main.cc" "common/memory.cc" "common/graph.cc") set(COMMON_SOURCES "common/main.cc" "common/memory.cc" "common/graph.cc""common/powerline.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}")