1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-20 03:51:18 +00:00
conky/src/CMakeLists.txt

140 lines
3.7 KiB
CMake
Raw Normal View History

2009-11-26 19:25:32 +00:00
# vim: ts=4 sw=4 noet ai cindent syntax=cmake
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
set(conky_sources colours.c combine.c common.c conky.cc core.cc diskio.c
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)
# Platform specific sources
2009-12-07 17:35:43 +00:00
if(OS_LINUX)
set(linux linux.c users.c sony.c i8k.c)
set(optional_sources ${optional_sources} ${linux})
2009-12-07 17:35:43 +00:00
endif(OS_LINUX)
2009-12-07 17:35:43 +00:00
if(OS_FREEBSD)
set(freebsd freebsd.c bsdapm.c)
set(optional_sources ${optional_sources} ${freebsd})
2009-12-07 17:35:43 +00:00
endif(OS_FREEBSD)
2009-12-07 17:35:43 +00:00
if(OS_OPENBSD)
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)
set(solaris solaris.c)
set(optional_sources ${optional_sources} ${solaris})
2009-12-07 17:35:43 +00:00
endif(OS_SOLARIS)
2009-12-07 17:35:43 +00:00
if(OS_NETBSD)
set(netbsd netbsd.c)
set(optional_sources ${optional_sources} ${netbsd})
2009-12-07 17:35:43 +00:00
endif(OS_NETBSD)
# Optional sources
if(BUILD_AUDACIOUS)
set(audacious audacious.c)
set(optional_sources ${optional_sources} ${audacious})
endif(BUILD_AUDACIOUS)
if(BUILD_BMPX)
set(bmpx bmpx.c)
set(optional_sources ${optional_sources} ${bmpx})
endif(BUILD_BMPX)
if(BUILD_IBM)
set(ibm ibm.c smapi.c)
set(optional_sources ${optional_sources} ${ibm})
endif(BUILD_IBM)
if(BUILD_MPD)
set(mpd mpd.c libmpdclient.c)
set(optional_sources ${optional_sources} ${mpd})
endif(BUILD_MPD)
if(BUILD_MOC)
set(moc moc.c)
set(optional_sources ${optional_sources} ${moc})
endif(BUILD_MOC)
if(BUILD_XMMS2)
set(xmms2 xmms2.c)
set(optional_sources ${optional_sources} ${xmms2})
endif(BUILD_XMMS2)
if(BUILD_PORT_MONITORS)
set(port_monitors libtcp-portmon.cc tcp-portmon.cc)
set(optional_sources ${optional_sources} ${port_monitors})
endif(BUILD_PORT_MONITORS)
if(BUILD_X11)
set(x11 x11.c fonts.c)
set(optional_sources ${optional_sources} ${x11})
endif(BUILD_X11)
if(BUILD_HDDTEMP)
set(hddtemp hddtemp.c)
set(optional_sources ${optional_sources} ${hddtemp})
endif(BUILD_HDDTEMP)
if(BUILD_EVE)
set(eve eve.c)
set(optional_sources ${optional_sources} ${eve})
endif(BUILD_EVE)
if(BUILD_CURL)
set(ccurl_thread ccurl_thread.c)
set(optional_sources ${optional_sources} ${ccurl_thread})
endif(BUILD_CURL)
if(BUILD_RSS)
set(rss rss.c prss.c)
set(optional_sources ${optional_sources} ${rss})
endif(BUILD_RSS)
if(BUILD_WEATHER)
set(weather weather.c)
set(optional_sources ${optional_sources} ${weather})
endif(BUILD_WEATHER)
if(BUILD_LUA)
set(lua llua.c)
set(optional_sources ${optional_sources} ${lua})
endif(BUILD_LUA)
if(BUILD_NVIDIA)
set(nvidia nvidia.c)
set(optional_sources ${optional_sources} ${nvidia})
endif(BUILD_NVIDIA)
if(BUILD_IMLIB2)
set(imlib2 imlib2.c)
set(optional_sources ${optional_sources} ${imlib2})
endif(BUILD_IMLIB2)
if(BUILD_APCUPSD)
set(apcupsd apcupsd.c)
set(optional_sources ${optional_sources} ${apcupsd})
endif(BUILD_APCUPSD)
if(BUILD_ICONV)
set(iconv iconv_tools.c)
set(optional_sources ${optional_sources} ${iconv})
endif(BUILD_ICONV)
add_executable(conky ${conky_sources} ${optional_sources})
target_link_libraries(conky ${conky_libs})