1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-14 11:33:14 +00:00

Improve platform stuff.

This commit is contained in:
Brenden Matthews 2009-12-07 09:35:43 -08:00
parent 4baba32459
commit 4dcce0b386
4 changed files with 43 additions and 17 deletions

View File

@ -1,6 +1,5 @@
# vim: ts=4 sw=4 noet ai cindent syntax=cmake # vim: ts=4 sw=4 noet ai cindent syntax=cmake
# Some standard options # Some standard options
set(SYSTEM_CONFIG_FILE "/etc/conky/conky.conf" CACHE STRING "Default system-wide Conky configuration file") set(SYSTEM_CONFIG_FILE "/etc/conky/conky.conf" CACHE STRING "Default system-wide Conky configuration file")
# use FORCE below to make sure this changes when CMAKE_INSTALL_PREFIX is modified # use FORCE below to make sure this changes when CMAKE_INSTALL_PREFIX is modified

View File

@ -9,6 +9,31 @@ check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H)
# standard path to search for includes # standard path to search for includes
set(INCLUDE_SEARCH_PATH /usr/include /usr/local/include) set(INCLUDE_SEARCH_PATH /usr/include /usr/local/include)
# Set system vars
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(OS_LINUX true)
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
set(OS_FREEBSD true)
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
set(OS_OPENBSD true)
endif(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
if(CMAKE_SYSTEM_NAME MATCHES "Solaris")
set(OS_SOLARIS true)
endif(CMAKE_SYSTEM_NAME MATCHES "Solaris")
if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
set(OS_NETBSD true)
endif(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
if(NOT OS_LINUX AND NOT OS_FREEBSD AND NOT OS_OPENBSD)
message(FATAL_ERROR "Your platform, '${CMAKE_SYSTEM_NAME}', is not currently supported. Patches are welcome.")
endif(NOT OS_LINUX AND NOT OS_FREEBSD AND NOT OS_OPENBSD)
# check for Xlib # check for Xlib
if(BUILD_X11) if(BUILD_X11)
include(FindX11) include(FindX11)

View File

@ -1,5 +1,6 @@
#cmakedefine DEBUG #cmakedefine DEBUG
#define SYSTEM_NAME "@CMAKE_SYSTEM_NAME@"
#define PACKAGE_NAME "@PROJECT_NAME@" #define PACKAGE_NAME "@PROJECT_NAME@"
#define VERSION "@VERSION@" #define VERSION "@VERSION@"
#define SYSTEM_CONFIG_FILE "@SYSTEM_CONFIG_FILE@" #define SYSTEM_CONFIG_FILE "@SYSTEM_CONFIG_FILE@"

View File

@ -8,30 +8,31 @@ set(conky_sources colours.c combine.c common.c conky.c core.c diskio.c
text_object.c timeinfo.c top.c algebra.c proc.c user.c) text_object.c timeinfo.c top.c algebra.c proc.c user.c)
# Platform specific sources # Platform specific sources
if(CMAKE_SYSTEM_NAME MATCHES "Linux") if(OS_LINUX)
set(linux linux.c linux.h users.c users.h sony.c sony.h i8k.c i8k.h) set(linux linux.c linux.h users.c users.h sony.c sony.h i8k.c i8k.h)
set(optional_sources ${optional_sources} ${linux}) set(optional_sources ${optional_sources} ${linux})
endif(CMAKE_SYSTEM_NAME MATCHES "Linux") endif(OS_LINUX)
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") if(OS_FREEBSD)
set(freebsd freebsd.c freebsd.h bsdapm.c bsdapm.h) set(freebsd freebsd.c freebsd.h bsdapm.c bsdapm.h)
set(optional_sources ${optional_sources} ${freebsd}) set(optional_sources ${optional_sources} ${freebsd})
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") endif(OS_FREEBSD)
if(CMAKE_SYSTEM_NAME MATCHES "Solaris") if(OS_OPENBSD)
set(solaris solaris.c)
set(optional_sources ${optional_sources} ${solaris})
endif(CMAKE_SYSTEM_NAME MATCHES "Solaris")
if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
set(netbsd netbsd.c netbsd.h)
set(optional_sources ${optional_sources} ${netbsd})
endif(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
set(openbsd openbsd.c openbsd.h bsdapm.c bsdapm.h) set(openbsd openbsd.c openbsd.h bsdapm.c bsdapm.h)
set(optional_sources ${optional_sources} ${openbsd}) set(optional_sources ${optional_sources} ${openbsd})
endif(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") endif(OS_OPENBSD)
# These below are not actually supported. No idea what their status is.
if(OS_SOLARIS)
set(solaris solaris.c)
set(optional_sources ${optional_sources} ${solaris})
endif(OS_SOLARIS)
if(OS_NETBSD)
set(netbsd netbsd.c netbsd.h)
set(optional_sources ${optional_sources} ${netbsd})
endif(OS_NETBSD)
# Optional sources # Optional sources