spawns FastCGI processes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.6 KiB

CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0 FATAL_ERROR)
MACRO(ADD_TARGET_PROPERTIES _target _name _properties)
SET(_properties ${ARGV})
LIST(REMOVE_AT _properties 0)
LIST(REMOVE_AT _properties 0)
GET_TARGET_PROPERTY(_old_properties ${_target} ${_name})
#MESSAGE("adding property to ${_target} ${_name}: ${_properties}")
IF(NOT _old_properties)
# in case it's NOTFOUND
SET(_old_properties)
ENDIF(NOT _old_properties)
SET_TARGET_PROPERTIES(${_target} PROPERTIES ${_name} "${_old_properties} ${_properties}")
ENDMACRO(ADD_TARGET_PROPERTIES)
PROJECT(spawn-fcgi)
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)
# GLIB 2
INCLUDE(FindPkgConfig)
pkg_check_modules (GLIB2 REQUIRED glib-2.0)
SET(GLIB_INCLUDES ${GLIB2_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS}/glib-2.0/ ${GLIB2_INCLUDE_DIRS}/glib-2.0/include/)
INCLUDE_DIRECTORIES(${GLIB_INCLUDES})
SET(MAIN_SOURCE spawn-fcgi.c)
IF(USE_LIMITS)
SET(MAIN_SOURCE ${MAIN_SOURCE} pam_limits.c)
ADD_DEFINITIONS(-DUSE_LIMITS)
ENDIF(USE_LIMITS)
add_executable(spawn-fcgi ${MAIN_SOURCE})
ADD_TARGET_PROPERTIES(spawn-fcgi COMPILE_FLAGS "-std=gnu99 -Wall -g -Wshadow -W -pedantic -fPIC -D_GNU_SOURCE")
# GLIB 2
ADD_TARGET_PROPERTIES(spawn-fcgi LINK_FLAGS "${GLIB2_LDFLAGS}")
ADD_TARGET_PROPERTIES(spawn-fcgi COMPILE_FLAGS "${GLIB2_CFLAGS_OTHER}")
ADD_DEFINITIONS(
-DPACKAGE_NAME="\\"${CMAKE_PROJECT_NAME}\\""
-DPACKAGE_VERSION="\\"${PACKAGE_VERSION}\\""
-DPACKAGE_BUILD_DATE="\\"${PACKAGE_BUILD_DATE}\\""
)
INSTALL(TARGETS spawn-fcgi DESTINATION bin)