2009-11-26 19:25:32 +00:00
|
|
|
# vim: ts=4 sw=4 noet ai cindent syntax=cmake
|
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
include_directories(${conky_includes})
|
2009-11-26 19:25:32 +00:00
|
|
|
|
2009-12-07 19:51:00 +00:00
|
|
|
# ensure build.h and config.h aren't in the way
|
2009-12-07 18:08:01 +00:00
|
|
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
|
|
|
|
message(FATAL_ERROR "You must remove the autotools generated file '${CMAKE_CURRENT_SOURCE_DIR}/config.h' in order to build with CMake.")
|
|
|
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
|
2009-12-07 19:51:00 +00:00
|
|
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build.h)
|
|
|
|
message(FATAL_ERROR "You must remove the autotools generated file '${CMAKE_CURRENT_SOURCE_DIR}/build.h' in order to build with CMake.")
|
|
|
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build.h)
|
2009-12-07 18:08:01 +00:00
|
|
|
|
2009-12-10 04:05:32 +00:00
|
|
|
set(conky_sources colours.c combine.c common.c conky.cc core.cc diskio.c
|
2009-12-05 20:00:10 +00:00
|
|
|
entropy.c exec.c fs.c mail.c mixer.c net_stat.c template.c timed_thread.c
|
|
|
|
mboxscan.c read_tcp.c scroll.c specials.c tailhead.c temphelper.c
|
|
|
|
text_object.c timeinfo.c top.c algebra.c proc.c user.c)
|
|
|
|
|
2009-12-06 02:45:26 +00:00
|
|
|
# Platform specific sources
|
2009-12-07 17:35:43 +00:00
|
|
|
if(OS_LINUX)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(linux linux.c users.c sony.c i8k.c)
|
2009-12-06 02:45:26 +00:00
|
|
|
set(optional_sources ${optional_sources} ${linux})
|
2009-12-07 17:35:43 +00:00
|
|
|
endif(OS_LINUX)
|
2009-12-05 20:00:10 +00:00
|
|
|
|
2009-12-07 17:35:43 +00:00
|
|
|
if(OS_FREEBSD)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(freebsd freebsd.c bsdapm.c)
|
2009-12-06 02:45:26 +00:00
|
|
|
set(optional_sources ${optional_sources} ${freebsd})
|
2009-12-07 17:35:43 +00:00
|
|
|
endif(OS_FREEBSD)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-07 17:35:43 +00:00
|
|
|
if(OS_OPENBSD)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(openbsd openbsd.c bsdapm.c)
|
2009-12-07 17:35:43 +00:00
|
|
|
set(optional_sources ${optional_sources} ${openbsd})
|
|
|
|
endif(OS_OPENBSD)
|
|
|
|
|
|
|
|
# These below are not actually supported. No idea what their status is.
|
|
|
|
if(OS_SOLARIS)
|
2009-12-06 02:45:26 +00:00
|
|
|
set(solaris solaris.c)
|
|
|
|
set(optional_sources ${optional_sources} ${solaris})
|
2009-12-07 17:35:43 +00:00
|
|
|
endif(OS_SOLARIS)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-07 17:35:43 +00:00
|
|
|
if(OS_NETBSD)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(netbsd netbsd.c)
|
2009-12-06 02:45:26 +00:00
|
|
|
set(optional_sources ${optional_sources} ${netbsd})
|
2009-12-07 17:35:43 +00:00
|
|
|
endif(OS_NETBSD)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Optional sources
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_AUDACIOUS)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(audacious audacious.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${audacious})
|
|
|
|
endif(BUILD_AUDACIOUS)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_BMPX)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(bmpx bmpx.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${bmpx})
|
|
|
|
endif(BUILD_BMPX)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_IBM)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(ibm ibm.c smapi.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${ibm})
|
|
|
|
endif(BUILD_IBM)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_MPD)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(mpd mpd.c libmpdclient.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${mpd})
|
|
|
|
endif(BUILD_MPD)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_MOC)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(moc moc.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${moc})
|
|
|
|
endif(BUILD_MOC)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_XMMS2)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(xmms2 xmms2.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${xmms2})
|
|
|
|
endif(BUILD_XMMS2)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_PORT_MONITORS)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(port_monitors libtcp-portmon.cc tcp-portmon.cc)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${port_monitors})
|
|
|
|
endif(BUILD_PORT_MONITORS)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_X11)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(x11 x11.c fonts.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${x11})
|
|
|
|
endif(BUILD_X11)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_HDDTEMP)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(hddtemp hddtemp.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${hddtemp})
|
|
|
|
endif(BUILD_HDDTEMP)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_EVE)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(eve eve.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${eve})
|
|
|
|
endif(BUILD_EVE)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_CURL)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(ccurl_thread ccurl_thread.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${ccurl_thread})
|
|
|
|
endif(BUILD_CURL)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_RSS)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(rss rss.c prss.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${rss})
|
|
|
|
endif(BUILD_RSS)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_WEATHER)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(weather weather.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${weather})
|
|
|
|
endif(BUILD_WEATHER)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_LUA)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(lua llua.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${lua})
|
|
|
|
endif(BUILD_LUA)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_NVIDIA)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(nvidia nvidia.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${nvidia})
|
|
|
|
endif(BUILD_NVIDIA)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_IMLIB2)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(imlib2 imlib2.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${imlib2})
|
|
|
|
endif(BUILD_IMLIB2)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_APCUPSD)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(apcupsd apcupsd.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${apcupsd})
|
|
|
|
endif(BUILD_APCUPSD)
|
2009-12-06 02:45:26 +00:00
|
|
|
|
2009-12-05 20:00:10 +00:00
|
|
|
if(BUILD_ICONV)
|
2009-12-10 04:05:32 +00:00
|
|
|
set(iconv iconv_tools.c)
|
2009-12-05 20:00:10 +00:00
|
|
|
set(optional_sources ${optional_sources} ${iconv})
|
|
|
|
endif(BUILD_ICONV)
|
|
|
|
|
|
|
|
add_executable(conky ${conky_sources} ${optional_sources})
|
|
|
|
|
|
|
|
target_link_libraries(conky ${conky_libs})
|