[Initng-svn] r3698 - in initng/trunk: . cmake plugins/dbus_event
tools
svn at initng.thinktux.net
svn at initng.thinktux.net
Thu Apr 6 07:35:29 CEST 2006
Author: biebl
Date: Thu Apr 6 07:35:27 2006
New Revision: 3698
Added:
initng/trunk/cmake/
initng/trunk/cmake/UsePkgConfig.cmake
Modified:
initng/trunk/CMakeLists.txt
initng/trunk/plugins/dbus_event/CMakeLists.txt
initng/trunk/tools/CMakeLists.txt
Log:
- dbus-event now compiles with cmake
- Added PkgConfig macro for that (newer versions already ship with this macro but we also want to support older cmake installations)
- Removed -O settings. This is what CMAKE_BUILD_TYPE is for. Set it to "Debug", "Release", "RelWithDebInfo" or "MinSizeRel" if you want to influence the optimization level and the creation of debug symbols.
Modified: initng/trunk/CMakeLists.txt
==============================================================================
--- initng/trunk/CMakeLists.txt (original)
+++ initng/trunk/CMakeLists.txt Thu Apr 6 07:35:27 2006
@@ -1,27 +1,33 @@
PROJECT(initng)
SET(VERSION "0.6.1" CACHE STRING "Version number of the project")
+SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
SUBDIRS(src plugins tools devtool doc)
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
-ADD_DEFINITIONS(-O2 -Wall -Werror)
+# Turn on warnings
+ADD_DEFINITIONS(-Wall)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+# Colorize output, needs CMake > 2.3.4
SET(CMAKE_COLOR_MAKEFILE TRUE)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckLibraryExists)
CHECK_INCLUDE_FILES(ncurses.h HAVE_NCURSES_H)
CHECK_LIBRARY_EXISTS(ncurses initscr "" HAVE_NCURSES)
-#INCLUDE(UsePkgConfig)
-#PKGCONFIG(dbus-1 DBUS_INCLUDE_DIR DBUS_LINK_DIR DBUS_LINK_FLAGS DBUS_CFLAGS)
-SET(CMAKE_INSTALL_PREFIX / CACHE INTERNAL "")
-SET(INCLUDE_INSTALL_DIR /usr/include CACHE STRING "Install location for header files.")
-SET(SBIN_INSTALL_DIR /sbin CACHE STRING "Install location for binaries.")
-SET(LIB_INSTALL_DIR /lib CACHE STRING "Install location for libraries.")
-MARK_AS_ADVANCED(INCLUDE_INSTALL_DIR SBIN_INSTALL_DIR LIB_INSTALL_DIR)
+INCLUDE(UsePkgConfig)
+PKGCONFIG(dbus-1 DBUS_INCLUDE_DIR DBUS_LINK_DIR DBUS_LINK_FLAGS DBUS_CFLAGS)
+SET(DBUS_DEFINITIONS ${DBUS_CFLAGS})
+FIND_LIBRARY(DBUS_LIBS NAMES dbus-1 PATHS ${DBUS_LINK_DIR} /usr/lib /usr/local/lib)
+
+#SET(CMAKE_INSTALL_PREFIX / CACHE INTERNAL "")
+#SET(INCLUDE_INSTALL_DIR /usr/include CACHE STRING "Install location for header files.")
+#SET(SBIN_INSTALL_DIR /sbin CACHE STRING "Install location for binaries.")
+#SET(LIB_INSTALL_DIR /lib CACHE STRING "Install location for libraries.")
+#MARK_AS_ADVANCED(INCLUDE_INSTALL_DIR SBIN_INSTALL_DIR LIB_INSTALL_DIR)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/initng-paths.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/initng-paths.h)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
@@ -67,10 +73,10 @@
OPTION(BUILD_SYSLOG "Build syslog plugin" ON)
OPTION(BUILD_UNNEEDED "Build unneeded plugin" ON)
OPTION(INSTALL_AS_INIT "Install initng as replacement for sysvinit" OFF)
-OPTION(DEBUG "Build with developer tools" ON)
+OPTION(DEBUG "Build with developer tools, turns on warnings and Werror" ON)
IF(DEBUG)
- ADD_DEFINITIONS(-DDEBUG -g3 -ggdb -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wimplicit -Wredundant-decls -Wnested-externs -Wwrite-strings -Wsign-compare -Winline -Wswitch -Wreturn-type -Wparentheses -Wmissing-braces -Wformat -Wformat-nonliteral -Wformat-security -Wsequence-point -Wundef -Wunused -Wcomment)
+ ADD_DEFINITIONS(-DDEBUG -Werror -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wimplicit -Wredundant-decls -Wnested-externs -Wwrite-strings -Wsign-compare -Winline -Wswitch -Wreturn-type -Wparentheses -Wmissing-braces -Wformat -Wformat-nonliteral -Wformat-security -Wsequence-point -Wundef -Wunused -Wcomment)
ENDIF(DEBUG)
CONFIGURE_FILE(
Modified: initng/trunk/plugins/dbus_event/CMakeLists.txt
==============================================================================
--- initng/trunk/plugins/dbus_event/CMakeLists.txt (original)
+++ initng/trunk/plugins/dbus_event/CMakeLists.txt Thu Apr 6 07:35:27 2006
@@ -1,13 +1,12 @@
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR} ${DBUS_CFLAGS})
-INCLUDE(UsePkgConfig)
-PKGCONFIG(dbus-1 DBUS_INCLUDE_DIR DBUS_LINK_DIR DBUS_LINK_FLAGS DBUS_CFLAGS)
+INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR} )
+ADD_DEFINITIONS(${DBUS_DEFINITIONS})
ADD_LIBRARY(dbusevent MODULE initng_dbusevent.c)
-TARGET_LINK_LIBRARIES(dbusevent initng ${DBUS_LINK_FLAGS})
+TARGET_LINK_LIBRARIES(dbusevent initng ${DBUS_LIBS})
INSTALL_TARGETS(/lib/initng dbusevent)
ADD_EXECUTABLE(dbus_nge dbus_nge.c)
-TARGET_LINK_LIBRARIES(dbus_nge ${DBUS_LINK_FLAGS})
+TARGET_LINK_LIBRARIES(dbus_nge ${DBUS_LIBS})
INSTALL_TARGETS(/sbin dbus_nge)
INSTALL_FILES(/etc/dbus-1/system.d initng.conf)
Modified: initng/trunk/tools/CMakeLists.txt
==============================================================================
--- initng/trunk/tools/CMakeLists.txt (original)
+++ initng/trunk/tools/CMakeLists.txt Thu Apr 6 07:35:27 2006
@@ -1,6 +1,6 @@
-
ADD_EXECUTABLE(killalli5 killall5.c)
INSTALL_TARGETS(/sbin killalli5)
+INSTALL_PROGRAMS(/sbin initng-segfault)
IF (INSTALL_AS_INIT)
ADD_EXECUTABLE(mountpoint mountpoint.c)
More information about the Initng-svn
mailing list