mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 04:06:03 +00:00
Add (broken) cmake build stuff.
This commit is contained in:
parent
8bd41caa51
commit
f36f747aca
40
CMakeLists.txt
Normal file
40
CMakeLists.txt
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# vim: ts=4 sw=4 noet ai cindent syntax=cmake
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
project(conky)
|
||||||
|
|
||||||
|
set(VERSION_MAJOR "2")
|
||||||
|
set(VERSION_MINOR "0")
|
||||||
|
set(VERSION_PATCH "0")
|
||||||
|
|
||||||
|
find_program(APP_GAWK gawk)
|
||||||
|
find_program(APP_GIT git)
|
||||||
|
find_program(APP_WC wc)
|
||||||
|
find_program(APP_DATE date)
|
||||||
|
find_program(APP_UNAME uname)
|
||||||
|
|
||||||
|
# The version numbers are simply derived from the date and number of commits
|
||||||
|
# since start of month
|
||||||
|
execute_process(COMMAND
|
||||||
|
${APP_GIT} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git log
|
||||||
|
--since=${VERSION_MAJOR}-${VERSION_MINOR}-01 --pretty=oneline COMMAND
|
||||||
|
${APP_WC} -l COMMAND ${APP_GAWK} "{print $1}" RESULT_VARIABLE RETVAL
|
||||||
|
OUTPUT_VARIABLE COMMIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
execute_process(COMMAND ${APP_DATE} RESULT_VARIABLE RETVAL OUTPUT_VARIABLE
|
||||||
|
BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-r${COMMIT_COUNT}")
|
||||||
|
set(COPYRIGHT "Copyright Brenden Matthews, et al, 2005-2009")
|
||||||
|
|
||||||
|
# This is the directory for our custom CMake modules.
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules)
|
||||||
|
|
||||||
|
# Include CPack module for installation
|
||||||
|
include(ConkyCPackSetup)
|
||||||
|
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
||||||
|
add_subdirectory(lua)
|
||||||
|
add_subdirectory(doc)
|
||||||
|
|
40
cmake_modules/ConkyCPackSetup.cmake
Normal file
40
cmake_modules/ConkyCPackSetup.cmake
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
set(CPACK_GENERATOR "TGZ;STGZ;DEB")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.10-1), libgcc1 (>= 1:4.4.0)")
|
||||||
|
set(CPACK_PACKAGE_CONTACT "brenden@diddyinc.com")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Brenden Matthews")
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION}-${CMAKE_SYSTEM_NAME}-${CPU_ARCH}")
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT_NAME})
|
||||||
|
|
||||||
|
set(CPACK_STRIP_FILES true)
|
||||||
|
|
||||||
|
# Version numbering, copyright notice, etc. are taken from the variables
|
||||||
|
# defined in ../CMakeLists.txt.
|
||||||
|
set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
|
||||||
|
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
|
||||||
|
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
|
||||||
|
|
||||||
|
if(CPACK_GENERATOR MATCHES "NSIS")
|
||||||
|
set(CPACK_NSIS_COMPRESSOR "/FINAL /SOLID lzma")
|
||||||
|
set(CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME} ${PROJECT_NAME})
|
||||||
|
endif(CPACK_GENERATOR MATCHES "NSIS")
|
||||||
|
|
||||||
|
# Source package setup. Compile with "make package_source".
|
||||||
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION}-src")
|
||||||
|
set(CPACK_SOURCE_GENERATOR "TBZ2")
|
||||||
|
execute_process(COMMAND ${APP_UNAME} COMMAND ${APP_GAWK} "{print $1}" RESULT_VARIABLE RETVAL
|
||||||
|
OUTPUT_VARIABLE CPU_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
set(CPACK_SOURCE_IGNORE_FILES
|
||||||
|
# Exclude backup files generated by text editors.
|
||||||
|
"~$"
|
||||||
|
# Git dir/files.
|
||||||
|
"\\\\.git.*$"
|
||||||
|
# vim swap files
|
||||||
|
"\\\\..*\\\\.swp$"
|
||||||
|
# Build dir.
|
||||||
|
"build.*$"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Enable CPack
|
||||||
|
include(CPack)
|
0
doc/CMakeLists.txt
Normal file
0
doc/CMakeLists.txt
Normal file
0
lua/CMakeLists.txt
Normal file
0
lua/CMakeLists.txt
Normal file
64
src/CMakeLists.txt
Normal file
64
src/CMakeLists.txt
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# vim: ts=4 sw=4 noet ai cindent syntax=cmake
|
||||||
|
|
||||||
|
set(CONKY_SOURCES
|
||||||
|
algebra.c
|
||||||
|
apcupsd.c
|
||||||
|
audacious.c
|
||||||
|
bmpx.c
|
||||||
|
ccurl_thread.c
|
||||||
|
colours.c
|
||||||
|
combine.c
|
||||||
|
common.c
|
||||||
|
conf_cookie.c
|
||||||
|
conky.c
|
||||||
|
core.c
|
||||||
|
diskio.c
|
||||||
|
entropy.c
|
||||||
|
eve.c
|
||||||
|
exec.c
|
||||||
|
fonts.c
|
||||||
|
freebsd.c
|
||||||
|
fs.c
|
||||||
|
hddtemp.c
|
||||||
|
i8k.c
|
||||||
|
ibm.c
|
||||||
|
iconv_tools.c
|
||||||
|
imlib2.c
|
||||||
|
libmpdclient.c
|
||||||
|
libtcp-portmon.c
|
||||||
|
linux.c
|
||||||
|
llua.c
|
||||||
|
mail.c
|
||||||
|
mboxscan.c
|
||||||
|
mixer.c
|
||||||
|
moc.c
|
||||||
|
mpd.c
|
||||||
|
netbsd.c
|
||||||
|
net_stat.c
|
||||||
|
nvidia.c
|
||||||
|
openbsd.c
|
||||||
|
proc.c
|
||||||
|
prss.c
|
||||||
|
read_tcp.c
|
||||||
|
rss.c
|
||||||
|
scroll.c
|
||||||
|
smapi.c
|
||||||
|
solaris.c
|
||||||
|
sony.c
|
||||||
|
specials.c
|
||||||
|
tailhead.c
|
||||||
|
tcp-portmon.c
|
||||||
|
temphelper.c
|
||||||
|
template.c
|
||||||
|
text_object.c
|
||||||
|
timed_thread.c
|
||||||
|
timeinfo.c
|
||||||
|
top.c
|
||||||
|
user.c
|
||||||
|
users.c
|
||||||
|
weather.c
|
||||||
|
x11.c
|
||||||
|
xmms2.c
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(conky ${CONKY_SOURCES})
|
Loading…
Reference in New Issue
Block a user