grim/guifications3

moved gfd to cmake, yay!
cmake
2010-12-13, Gary Kramlich
1054953264ee
Parents c6379cfc129b
Children 2a1253599789
moved gfd to cmake, yay!
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/guifications-daemon/CMakeLists.txt Mon Dec 13 00:48:09 2010 -0600
@@ -0,0 +1,74 @@
+cmake_minimum_required(VERSION 2.8)
+
+###############################################################################
+# Project Info
+###############################################################################
+project(guifications-daemon C)
+
+set(GUIFICATIONS_DAEMON_MAJOR_VERSION 0)
+set(GUIFICATIONS_DAEMON_MINOR_VERSION 0)
+set(GUIFICATIONS_DAEMON_MICRO_VERSION 1)
+set(GUIFICATIONS_DAEMON_EXTRA_VERSION dev)
+
+set(VERSION ${GUIFICATIONS_DAEMON_MAJOR_VERSION}.${GUIFICATIONS_DAEMON_MINOR_VERSION}.${GUIFICATIONS_DAEMON_MICRO_VERSION}${GUIFICATIONS_DAEMON_EXTRA_VERSION})
+
+###############################################################################
+# Dependencies
+###############################################################################
+include(FindPkgConfig)
+
+pkg_check_modules(GLIB REQUIRED
+ glib-2.0>=2.16.0
+ gobject-2.0>=2.16.0
+ gthread-2.0>=2.16.0
+)
+
+pkg_check_modules(GFLIB REQUIRED gflib)
+
+###############################################################################
+# Build Info
+###############################################################################
+include_directories(
+ ${CMAKE_SOURCE_DIR}
+ ${GLIB_INCLUDE_DIRS}
+ ${GFLIB_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${GLIB_LIBRARY_DIRS}
+ ${GFLIB_LIBRARY_DIRS}
+)
+
+add_definitions(
+ -DGETTEXT_PACKAGE="guifications-daemon"
+ -DDATADIR="${CMAKE_INSTALL_PREFIX}/share"
+ -DLIBDIR="${CMAKE_INSTALL_PREFIX}/lib"
+ -DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/local"
+ -g -g3 -Wall
+)
+
+###############################################################################
+# Subdirectories
+###############################################################################
+add_subdirectory(src)
+
+###############################################################################
+# Config Files
+###############################################################################
+configure_file(guifications-daemon.pc.in guifications-daemon.pc @ONLY)
+
+###############################################################################
+# Install Stuff
+###############################################################################
+# documentation
+install(
+ FILES AUTHORS ChangeLog COPYING NEWS README
+ DESTINATION share/doc/guifications-daemon
+)
+
+# pkg-config files
+install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/guifications-daemon.pc
+ DESTINATION lib/pkgconfig
+)
+
--- a/guifications-daemon/Makefile.am Mon Dec 13 00:35:07 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-SUBDIRS = m4 po src
-
-ACLOCAL_AMFLAGS = -I m4
-
-EXTRA_DIST = \
- AUTHORS \
- NEWS \
- INSTALL \
- COPYING \
- README \
- ChangeLog \
- configure.ac \
- guifications-daemon.conf \
- guifications-daemon.service \
- guifications-daemon.service.in
-
-CLEANFILES = guifications-daemon.service
-
-DISTCLEANFILES=\
- intltool-extract \
- intltool-merge \
- intltool-update
-
-pcdata_DATA=guifications-daemon.pc
-pcdatadir=$(libdir)/pkgconfig
-
-$(OBJECTS): libtool
-libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
-
--- a/guifications-daemon/autogen.sh Mon Dec 13 00:35:07 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#!/bin/sh
-# Guifications - The end-all, be-all notification framework
-# Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-PACKAGE="gfd"
-
-which gflib-autogen.sh || {
- echo "You need to install gflib to run autogen"
- exit 1
-}
-
-. gflib-autogen.sh
-
-add_default_commands
-
-autogen
-
--- a/guifications-daemon/configure.ac Mon Dec 13 00:35:07 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-dnl Process this file with autoconf to create configure.
-
-dnl ################################################################
-dnl # Initialize autoconf
-dnl ################################################################
-AC_INIT(guifications-daemon, 0.0.1dev, guifications-devel@lists.guifications.org)
-AC_PREREQ(2.50)
-AC_CANONICAL_SYSTEM
-AC_CONFIG_SRCDIR(config.h.in)
-AC_COPYRIGHT([Copyright 2003-2009 Gary Kramlich])
-
-dnl ################################################################
-dnl # Initialize automake
-dnl ################################################################
-AM_INIT_AUTOMAKE([gnu dist-bzip2])
-
-dnl ################################################################
-dnl # Configuration file
-dnl ################################################################
-AM_CONFIG_HEADER(config.h)
-
-dnl # Stash configure args
-AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
-
-AC_MSG_CHECKING([PEBKAC])
-AC_MSG_RESULT([yes])
-
-dnl #######################################################################
-dnl # Setup libtool
-dnl #######################################################################
-LT_INIT
-LT_LANG([C])
-LIBTOOL="$LIBTOOL --silent"
-
-dnl #######################################################################
-dnl # Our header
-dnl #######################################################################
-AH_TOP([ /* our header */
-#ifndef CONFIG_H
-#define CONFIG_H
-])
-AH_BOTTOM([
-#endif /* CONFIG_H */
-])
-
-dnl #######################################################################
-dnl # intltool
-dnl #######################################################################
-AC_PROG_INTLTOOL
-
-GETTEXT_PACKAGE=guifications-daemon
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
-
-ALL_LINGUAS=""
-AM_GLIB_GNU_GETTEXT
-
-dnl #######################################################################
-dnl # Check for some headers
-dnl #######################################################################
-AC_CHECK_HEADERS(signal.h)
-
-dnl #######################################################################
-dnl # Check for pkg-config
-dnl #######################################################################
-AC_PATH_PROG(PKG_CONFIG, pkg-config)
-
-dnl #######################################################################
-dnl # Look for the C compiler
-dnl #######################################################################
-CFLAGS_save="$CFLAGS"
-AC_PROG_CC
-CFLAGS="$CFLAGS_save"
-
-AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug],[compile with debugging support])
- ,,enable_debug=no)
-
-if test x"$enable_debug" = x"yes" ; then
- AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
-fi
-
-if test x"$GCC" = x"yes"; then
- CFLAGS="$CFLAGS -Wall -g3"
-fi
-AC_SUBST(CFLAGS)
-AC_SUBST(DEBUG_CFLAGS)
-
-dnl #######################################################################
-dnl # check for glib and other glib dependencies
-dnl #######################################################################
-PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gobject-2.0 >= 2.12.0])
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-dnl #######################################################################
-dnl # check for gflib
-dnl #######################################################################
-PKG_CHECK_MODULES(GFLIB, [gflib])
-AC_SUBST(GFLIB_CFLAGS)
-AC_SUBST(GFLIB_LIBS)
-
-dnl #######################################################################
-dnl # Finish up
-dnl #######################################################################
-AC_OUTPUT([Makefile
- guifications-daemon.pc
- m4/Makefile
- po/Makefile.in
- src/Makefile
- ])
-
-dnl #######################################################################
-dnl # Ouput!!
-dnl #######################################################################
-
-echo;
-echo AC_PACKAGE_NAME AC_PACKAGE_VERSION Configuration complete
-echo;
-echo Debugging enabled................: $enable_debug
-echo;
-echo Type make to compile
-echo;
--- a/guifications-daemon/m4/Makefile.am Mon Dec 13 00:35:07 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-EXTRA_DIST=as_ac_expand.m4
--- a/guifications-daemon/m4/as_ac_expand.m4 Mon Dec 13 00:35:07 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
-dnl
-dnl example
-dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
-dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
-
-AC_DEFUN([AS_AC_EXPAND],
-[
- EXP_VAR=[$1]
- FROM_VAR=[$2]
-
- dnl first expand prefix and exec_prefix if necessary
- prefix_save=$prefix
- exec_prefix_save=$exec_prefix
-
- dnl if no prefix given, then use /usr/local, the default prefix
- if test "x$prefix" = "xNONE"; then
- prefix=$ac_default_prefix
- fi
- dnl if no exec_prefix given, then use prefix
- if test "x$exec_prefix" = "xNONE"; then
- exec_prefix=$prefix
- fi
-
- full_var="$FROM_VAR"
- dnl loop until it doesn't change anymore
- while true; do
- new_full_var="`eval echo $full_var`"
- if test "x$new_full_var"="x$full_var"; then break; fi
- full_var=$new_full_var
- done
-
- dnl clean up
- full_var=$new_full_var
- AC_SUBST([$1], "$full_var")
-
- dnl restore prefix and exec_prefix
- prefix=$prefix_save
- exec_prefix=$exec_prefix_save
-])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/guifications-daemon/src/CMakeLists.txt Mon Dec 13 00:48:09 2010 -0600
@@ -0,0 +1,28 @@
+###############################################################################
+# guifications-daemon target
+###############################################################################
+set(GUIFICATIONS_DAEMON_HEADERS
+ guifications-daemon.h
+ guifications-daemon-connections.h
+ guifications-daemon-feed-manager.h
+ guifications-daemon-signals.h
+)
+
+add_executable(guifications-daemon
+ ${GUIFICATIONS_DAEMON_HEADERS}
+ guifications-daemon.c
+ guifications-daemon-connections.c
+ guifications-daemon-feed-manager.c
+ guifications-daemon-signals.c
+)
+
+target_link_libraries(guifications-daemon
+ ${GLIB_LIBRARIES}
+ ${GFLIB_LIBRARIES}
+)
+
+###############################################################################
+# install stuff
+###############################################################################
+install(TARGETS guifications-daemon RUNTIME DESTINATION bin)
+
--- a/guifications-daemon/src/Makefile.am Mon Dec 13 00:35:07 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-EXTRA_DIST = \
- guifications-daemon.h \
- guifications-daemon-connections.h \
- guifications-daemon-feed-manager.h \
- guifications-daemon-signals.h
-
-bin_PROGRAMS = guifications-daemon
-
-guifications_daemon_SOURCES = \
- guifications-daemon.c \
- guifications-daemon-connections.c \
- guifications-daemon-feed-manager.c \
- guifications-daemon-signals.c
-
-guifications_daemon_LDADD = \
- $(GFLIB_LIBS) \
- $(GFLIB_DBUS_LIBS) \
- $(GLIB_LIBS)
-
-INCLUDES = -I$(top_srcdir)
-
-AM_CPPFLAGS = \
- -DLIBDIR=\"$(libdir)\" \
- $(GFLIB_CFLAGS) \
- $(GFLIB_DBUS_CFLAGS) \
- $(GLIB_CFLAGS)