Browse Source

cmake: use builtin macros for build date

personal/stbuehler/wip
Stefan Bühler 13 years ago
parent
commit
4e04ac6b8b
  1. 6
      CMakeLists.txt
  2. 4
      include/lighttpd/settings.h
  3. 7
      src/CMakeLists.txt
  4. 35
      src/config.h.cmake

6
CMakeLists.txt

@ -1,7 +1,9 @@
PROJECT(lighttpd C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
PROJECT(lighttpd C)
SET(PACKAGE_NAME ${CMAKE_PROJECT_NAME})
SET(PACKAGE_VERSION 2.0.0)
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
INCLUDE(CTest)

4
include/lighttpd/settings.h

@ -202,6 +202,10 @@
# define INLINE static
#endif
#ifndef PACKAGE_BUILD_DATE
# define PACKAGE_BUILD_DATE (__DATE__ " " __TIME__)
#endif
#include <lighttpd/sys-files.h>
#include <lighttpd/sys-mmap.h>
#include <lighttpd/sys-process.h>

7
src/CMakeLists.txt

@ -239,13 +239,6 @@ IF(NOT BUILD_STATIC)
CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
ENDIF(NOT BUILD_STATIC)
ADD_DEFINITIONS(
-DLIGHTTPD_VERSION_ID=20000
-DPACKAGE_NAME="\\"${CMAKE_PROJECT_NAME}\\""
-DPACKAGE_VERSION="\\"${CPACK_PACKAGE_VERSION}\\""
-DPACKAGE_BUILD_DATE="\\"-\\""
)
IF(NOT SBINDIR)
SET(SBINDIR "sbin")
ENDIF(NOT SBINDIR)

35
src/config.h.cmake

@ -2,22 +2,27 @@
CMake autogenerated config.h file. Do not edit!
*/
/* Package data */
#define PACKAGE_NAME "${PACKAGE_NAME}"
#define PACKAGE_VERSION "${PACKAGE_VERSION}"
/* System */
#cmakedefine HAVE_SYS_DEVPOLL_H
#cmakedefine HAVE_SYS_EPOLL_H
#cmakedefine HAVE_SYS_EVENT_H
#cmakedefine HAVE_SYS_MMAN_H
#cmakedefine HAVE_SYS_POLL_H
#cmakedefine HAVE_SYS_PORT_H
#cmakedefine HAVE_SYS_PRCTL_H
#cmakedefine HAVE_SYS_RESOURCE_H
#cmakedefine HAVE_SYS_SENDFILE_H
#cmakedefine HAVE_SYS_SELECT_H
#cmakedefine HAVE_SYS_SYSLIMITS_H
#cmakedefine HAVE_SYS_TYPES_H
#cmakedefine HAVE_SYS_UIO_H
#cmakedefine HAVE_SYS_UN_H
#cmakedefine HAVE_SYS_WAIT_H
#cmakedefine HAVE_SYS_DEVPOLL_H
#cmakedefine HAVE_SYS_EPOLL_H
#cmakedefine HAVE_SYS_EVENT_H
#cmakedefine HAVE_SYS_MMAN_H
#cmakedefine HAVE_SYS_POLL_H
#cmakedefine HAVE_SYS_PORT_H
#cmakedefine HAVE_SYS_PRCTL_H
#cmakedefine HAVE_SYS_RESOURCE_H
#cmakedefine HAVE_SYS_SENDFILE_H
#cmakedefine HAVE_SYS_SELECT_H
#cmakedefine HAVE_SYS_SYSLIMITS_H
#cmakedefine HAVE_SYS_TYPES_H
#cmakedefine HAVE_SYS_UIO_H
#cmakedefine HAVE_SYS_UN_H
#cmakedefine HAVE_SYS_WAIT_H
#cmakedefine HAVE_SYS_TIME_H
#cmakedefine HAVE_TIME_H
#cmakedefine HAVE_UNISTD_H

Loading…
Cancel
Save