1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Portmon and audacious CMake support.

This commit is contained in:
Brenden Matthews 2009-12-06 11:43:12 -08:00
parent 134439cbfa
commit c63d1bba78
3 changed files with 49 additions and 7 deletions

View File

@ -13,6 +13,11 @@ set(DEFAULT_TEXT_BUFFER_SIZE "256" CACHE STRING "Default size used for temporary
set(MAX_NET_INTERFACES "16" CACHE STRING "Maximum number of network devices")
# Platform specific options
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
option(BUILD_PORT_MONITORS "Build TCP portmon support" true)
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
# Optional features etc
option(BUILD_X11 "Build X11 support" true)
if(BUILD_X11)
@ -24,9 +29,10 @@ endif(BUILD_X11)
option(BUILD_LUA "Build Lua support" true)
# Platform specific options
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
option(BUILD_PORT_MONITORS "Build TCP portmon support" true)
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
option(BUILD_AUDACIOUS "Build audacious player support" false)
if(BUILD_AUDACIOUS)
option(BUILD_AUDACIOUS_LEGACY "Use legacy audacious player support" false)
else(BUILD_AUDACIOUS)
set(BUILD_AUDACIOUS_LEGACY false)
endif(BUILD_AUDACIOUS)

View File

@ -6,6 +6,9 @@ check_include_files(sys/statfs.h HAVE_SYS_STATFS_H)
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
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)
# check for Xlib
if(BUILD_X11)
include(FindX11)
@ -26,8 +29,8 @@ if(BUILD_X11)
# check for Xft
if(BUILD_XFT)
find_path(freetype_INCLUDE_PATH freetype/config/ftconfig.h /usr/include
/usr/local/include /usr/include/freetype2
find_path(freetype_INCLUDE_PATH freetype/config/ftconfig.h ${INCLUDE_SEARCH_PATH}
/usr/include/freetype2
/usr/local/include/freetype2)
if(freetype_INCLUDE_PATH)
set(freetype_FOUND TRUE)
@ -65,6 +68,24 @@ if(BUILD_PORT_MONITORS)
set(WANT_GLIB true)
endif(BUILD_PORT_MONITORS)
if(BUILD_AUDACIOUS)
set(WANT_GLIB true)
if(NOT BUILD_AUDACIOUS_LEGACY)
pkg_check_modules(AUDACIOUS REQUIRED audacious>=1.4.0 dbus-glib-1 gobject-2.0)
# do we need this below?
#CPPFLAGS="$Audacious_CFLAGS -I`pkg-config --variable=audacious_include_dir audacious`/audacious"
#AC_CHECK_HEADERS([audacious/audctrl.h audacious/dbus.h glib.h glib-object.h],
# [], AC_MSG_ERROR([required header(s) not found]))
else(NOT BUILD_AUDACIOUS_LEGACY)
pkg_check_modules(AUDACIOUS REQUIRED audacious<1.4.0)
# do we need this below?
#CPPFLAGS="$Audacious_CFLAGS -I`pkg-config --variable=audacious_include_dir audacious`/audacious"
#AC_CHECK_HEADERS([audacious/beepctrl.h glib.h], [], AC_MSG_ERROR([required header(s) not found]))
#CPPFLAGS="$save_CPPFLAGS"
endif(NOT BUILD_AUDACIOUS_LEGACY)
endif(BUILD_AUDACIOUS)
if(WANT_GLIB)
pkg_check_modules(GLIB REQUIRED glib-2.0)
set(conky_libs ${conky_libs} ${GLIB_LIBRARIES})

View File

@ -41,3 +41,18 @@
#ifdef BUILD_LUA
#define HAVE_LUA
#endif /* BUILD_LUA */
#cmakedefine BUILD_PORT_MONITORS 1
#ifdef BUILD_PORT_MONITORS
#define TCP_PORT_MONITOR
#endif /* BUILD_PORT_MONITORS */
#cmakedefine BUILD_AUDACIOUS 1
#ifdef BUILD_AUDACIOUS
#define AUDACIOUS
#endif /* BUILD_AUDACIOUS */
#cmakedefine BUILD_AUDACIOUS_LEGACY 1
#ifdef BUILD_AUDACIOUS_LEGACY
#define AUDACIOUS_LEGACY
#endif /* BUILD_AUDACIOUS_LEGACY */