Browse Source

[cmake] Fix package version in binary

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2388 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.21
Stefan Bühler 13 years ago
parent
commit
705fcaaff1
  1. 7
      CMakeLists.txt
  2. 20
      src/CMakeLists.txt
  3. 7
      src/config.h.cmake

7
CMakeLists.txt

@ -8,9 +8,10 @@ INCLUDE(CTest)
ENABLE_TESTING()
SET(CPACK_PACKAGE_VERSION_MAJOR 2)
SET(CPACK_PACKAGE_VERSION_MINOR 0)
SET(CPACK_PACKAGE_VERSION_PATCH 0)
SET(CPACK_PACKAGE_VERSION_MAJOR 1)
SET(CPACK_PACKAGE_VERSION_MINOR 4)
SET(CPACK_PACKAGE_VERSION_PATCH 21)
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")

20
src/CMakeLists.txt

@ -359,12 +359,10 @@ IF(HAVE_DLFCN_H)
CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
ENDIF(HAVE_DLFCN_H)
ADD_DEFINITIONS(
-DLIGHTTPD_VERSION_ID=10400
-DPACKAGE_NAME="\\"${CMAKE_PROJECT_NAME}\\""
-DPACKAGE_VERSION="\\"${CPACK_PACKAGE_VERSION}\\""
-DPACKAGE_BUILD_DATE="\\"-\\""
)
SET(LIGHTTPD_VERSION_ID 10400)
SET(PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
SET(PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
EXEC_PROGRAM(date ARGS "'+%b %d %Y %H:%M:%S UTC'" OUTPUT_VARIABLE PACKAGE_BUILD_DATE)
IF(NOT SBINDIR)
SET(SBINDIR "sbin")
@ -375,14 +373,10 @@ IF(NOT LIGHTTPD_MODULES_DIR)
ENDIF(NOT LIGHTTPD_MODULES_DIR)
IF(NOT WIN32)
ADD_DEFINITIONS(
-DLIBRARY_DIR="\\"${CMAKE_INSTALL_PREFIX}/${LIGHTTPD_MODULES_DIR}\\""
)
SET(LIGHTTPD_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/${LIGHTTPD_MODULES_DIR}")
ELSE(NOT WIN32)
## We use relative path in windows
ADD_DEFINITIONS(
-DLIBRARY_DIR="\\"lib\\""
)
## We use relative path in windows
SET(LIGHTTPD_LIBRARY_DIR "lib")
ENDIF(NOT WIN32)
## Write out config.h

7
src/config.h.cmake

@ -2,6 +2,13 @@
CMake autogenerated config.h file. Do not edit!
*/
/* Package details */
#define LIGHTTPD_VERSION_ID ${LIGHTTPD_VERSION_ID}
#define PACKAGE_NAME "${PACKAGE_NAME}"
#define PACKAGE_VERSION "${PACKAGE_VERSION}"
#define PACKAGE_BUILD_DATE "${PACKAGE_BUILD_DATE}"
#define LIBRARY_DIR "${LIGHTTPD_LIBRARY_DIR}"
/* System */
#cmakedefine HAVE_SYS_DEVPOLL_H
#cmakedefine HAVE_SYS_EPOLL_H

Loading…
Cancel
Save