summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-02-05 11:45:01 +0000
committerStefan Bühler <stbuehler@web.de>2009-02-05 11:45:01 +0000
commit705fcaaff149df947fff7df31e84d2b1fb683e40 (patch)
tree5453170b26a435262c77614a56088a91113f299c /src/CMakeLists.txt
parent24d08807c550e984f0a648b4f951484c7347ca19 (diff)
downloadlighttpd-git-705fcaaff149df947fff7df31e84d2b1fb683e40.tar.gz
[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
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5d901ddd..29f36b16 100644
--- a/src/CMakeLists.txt
+++ b/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