aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-02-03 17:13:02 +0100
committerStefan Bühler <stbuehler@web.de>2009-02-03 17:13:02 +0100
commit62dbd731f68c1cb1b8c41d222fa9cb60bb52b546 (patch)
tree9ba93fe3871bf70c31a430249c547d17dee2bffb
parent398088544900c2e774aa4dc837ea462879c7b6b2 (diff)
downloadspawn-fcgi2-62dbd731f68c1cb1b8c41d222fa9cb60bb52b546.tar.gz
spawn-fcgi2-62dbd731f68c1cb1b8c41d222fa9cb60bb52b546.zip
Remove waf, require cmake 2.6.0
-rw-r--r--CMakeLists.txt19
-rwxr-xr-xwafbin107613 -> 0 bytes
-rw-r--r--wscript80
3 files changed, 12 insertions, 87 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9541bc..2368cfe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,6 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0 FATAL_ERROR)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
+
+cmake_policy(VERSION 2.6.0)
MACRO(ADD_TARGET_PROPERTIES _target _name _properties)
SET(_properties ${ARGV})
@@ -18,6 +20,9 @@ SET(PACKAGE_VERSION 1.0)
EXEC_PROGRAM(date ARGS "'+%b %d %Y %H:%M:%S UTC'" OUTPUT_VARIABLE PACKAGE_BUILD_DATE)
OPTION(USE_LIMITS "Enable /etc/security/limits.conf support" ON)
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
# GLIB 2
INCLUDE(FindPkgConfig)
@@ -40,13 +45,13 @@ ADD_TARGET_PROPERTIES(spawn-fcgi COMPILE_FLAGS "-std=gnu99 -Wall -g -Wshadow -W
# GLIB 2
ADD_TARGET_PROPERTIES(spawn-fcgi LINK_FLAGS "${GLIB2_LDFLAGS}")
ADD_TARGET_PROPERTIES(spawn-fcgi COMPILE_FLAGS "${GLIB2_CFLAGS_OTHER}")
+ADD_TARGET_PROPERTIES(spawn-fcgi COMPILE_DEFINITIONS "PACKAGE_NAME=${CMAKE_PROJECT_NAME}" PACKAGE_VERSION="${PACKAGE_VERSION}" PACKAGE_BUILD_DATE="${PACKAGE_BUILD_DATE}")
-
-ADD_DEFINITIONS(
- -DPACKAGE_NAME="\\"${CMAKE_PROJECT_NAME}\\""
- -DPACKAGE_VERSION="\\"${PACKAGE_VERSION}\\""
- -DPACKAGE_BUILD_DATE="\\"${PACKAGE_BUILD_DATE}\\""
- )
+#ADD_DEFINITIONS(
+# -DPACKAGE_NAME="\\"${CMAKE_PROJECT_NAME}\\""
+# -DPACKAGE_VERSION="\\"${PACKAGE_VERSION}\\""
+# -DPACKAGE_BUILD_DATE="\\"${PACKAGE_BUILD_DATE}\\""
+# )
INSTALL(TARGETS spawn-fcgi DESTINATION bin)
diff --git a/waf b/waf
deleted file mode 100755
index e62eb21..0000000
--- a/waf
+++ /dev/null
Binary files differ
diff --git a/wscript b/wscript
deleted file mode 100644
index 0241dbd..0000000
--- a/wscript
+++ /dev/null
@@ -1,80 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-
-import Options, types, sys, Runner
-from time import gmtime, strftime, timezone
-
-# the following two variables are used by the target "waf dist"
-VERSION='1.0'
-APPNAME='spawn-fcgi'
-
-# these variables are mandatory ('/' are converted automatically)
-srcdir = '.'
-blddir = 'build'
-
-def set_options(opt):
- opt.tool_options('compiler_cc')
- opt.add_option('--without-limits', action='store_false', help='without /etc/security/limits.conf support', dest = 'limits', default = True)
-
-def tolist(x):
- if type(x) is types.ListType:
- return x
- return [x]
-
-def PKGCONFIG(conf, name, uselib = None, define = '', version = '', mandatory = 0):
- if not uselib: uselib = name
- hconf = conf.create_pkgconfig_configurator()
- hconf.name = name
- hconf.version = version
- hconf.uselib_store = uselib
- hconf.define = define
- hconf.mandatory = mandatory
- res = hconf.run()
- return res
-
-def configure(conf):
- opts = Options.options
-
- conf.check_tool('compiler_cc')
-
- if opts.limits:
- conf.define("USE_LIMITS", 1)
- conf.env['USE_LIMITS'] = opts.limits
-
- conf.define("PACKAGE_NAME", APPNAME)
- conf.define("PACKAGE_VERSION", VERSION)
- conf.define("PACKAGE_BUILD_DATE", strftime("%b %d %Y %H:%M:%S UTC", gmtime()));
-
- common_ccflags = [
- '-std=gnu99', '-Wall', '-g', '-Wshadow', '-W', '-pedantic',
- '-fPIC',
- '-DHAVE_CONFIG_H', '-D_GNU_SOURCE',
- ]
- conf.env['CCFLAGS_spawnfcgi'] += common_ccflags
-
- PKGCONFIG(conf, "glib-2.0", uselib = 'glib', mandatory = 1)
- incdir = conf.env['CPPPATH_glib'][0]
- conf.env['CPPPATH_glib'] += [ incdir+'/glib-2.0/', incdir + '/glib-2.0/include/' ]
-# CHECK_INCLUDE_FILES(conf, "glib.h", "HAVE_GLIB_H", uselib = 'glib', use = ['glib'], mandatory = 1)
-
- conf.write_config_header('config.h')
-
-main_source = '''
- spawn-fcgi.c
-'''
-
-limits_source = '''
- pam_limits.c
-'''
-
-def build(bld):
- env = bld.env
-
- spawnfcgi = bld.new_task_gen('cc', 'program')
- spawnfcgi.name = 'spawn-fcgi'
- spawnfcgi.source = main_source
- if env['USE_LIMITS']:
- spawnfcgi.source += limits_source
- spawnfcgi.target = 'spawn-fcgi'
- spawnfcgi.uselib += 'glib spawnfcgi'
- spawnfcgi.includes = '.'