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:
parent
4baba32459
commit
4dcce0b386
@ -1,6 +1,5 @@
|
||||
# vim: ts=4 sw=4 noet ai cindent syntax=cmake
|
||||
|
||||
|
||||
# Some standard options
|
||||
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
|
||||
|
@ -9,6 +9,31 @@ check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H)
|
||||
# standard path to search for includes
|
||||
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
|
||||
if(BUILD_X11)
|
||||
include(FindX11)
|
||||
|
@ -1,5 +1,6 @@
|
||||
#cmakedefine DEBUG
|
||||
|
||||
#define SYSTEM_NAME "@CMAKE_SYSTEM_NAME@"
|
||||
#define PACKAGE_NAME "@PROJECT_NAME@"
|
||||
#define VERSION "@VERSION@"
|
||||
#define SYSTEM_CONFIG_FILE "@SYSTEM_CONFIG_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)
|
||||
|
||||
# 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(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(optional_sources ${optional_sources} ${freebsd})
|
||||
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
endif(OS_FREEBSD)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Solaris")
|
||||
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")
|
||||
if(OS_OPENBSD)
|
||||
set(openbsd openbsd.c openbsd.h bsdapm.c bsdapm.h)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user