Browse Source

[cmake] don't put date into config.h (not used anyway), only unset local vars for disabled features instead of clearing cache

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3017 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.37
Stefan Bühler 6 years ago
parent
commit
16e1a78ad5
  1. 75
      src/CMakeLists.txt
  2. 1
      src/config.h.cmake

75
src/CMakeLists.txt

@ -195,8 +195,8 @@ if(WITH_XATTR)
check_library_exists(attr attr_get "" HAVE_XATTR)
endif()
else()
unset(HAVE_ATTR_ATTRIBUTES_H CACHE)
unset(HAVE_XATTR CACHE)
unset(HAVE_ATTR_ATTRIBUTES_H)
unset(HAVE_XATTR)
endif()
if(WITH_MYSQL)
@ -209,8 +209,8 @@ if(WITH_MYSQL)
check_library_exists(mysqlclient mysql_real_connect "" HAVE_MYSQL)
endif()
else()
unset(HAVE_MYSQL_H CACHE)
unset(HAVE_MYSQL CACHE)
unset(HAVE_MYSQL_H)
unset(HAVE_MYSQL)
endif()
if(WITH_OPENSSL)
@ -223,9 +223,9 @@ if(WITH_OPENSSL)
endif()
endif()
else()
unset(HAVE_OPENSSL_SSL_H CACHE)
unset(HAVE_LIBCRYPTO CACHE)
unset(HAVE_LIBSSL CACHE)
unset(HAVE_OPENSSL_SSL_H)
unset(HAVE_LIBCRYPTO)
unset(HAVE_LIBSSL)
endif()
if(WITH_PCRE)
@ -277,8 +277,8 @@ if(WITH_PCRE)
message(FATAL_ERROR "libpcre couldn't be found")
endif()
else()
unset(HAVE_PCRE_H CACHE)
unset(HAVE_LIBPCRE CACHE)
unset(HAVE_PCRE_H)
unset(HAVE_LIBPCRE)
endif()
@ -307,16 +307,16 @@ if(WITH_XML)
message(FATAL_ERROR "libxml2 couldn't be found")
endif()
else()
unset(HAVE_LIBXML_H CACHE)
unset(HAVE_LIBXML CACHE)
unset(HAVE_LIBXML_H)
unset(HAVE_LIBXML)
endif()
if(WITH_SQLITE3)
check_include_files(sqlite3.h HAVE_SQLITE3_H)
check_library_exists(sqlite3 sqlite3_reset "" HAVE_SQLITE3)
else()
unset(HAVE_SQLITE3_H CACHE)
unset(HAVE_SQLITE3 CACHE)
unset(HAVE_SQLITE3_H)
unset(HAVE_SQLITE3)
endif()
if(WITH_UUID)
@ -328,9 +328,9 @@ if(WITH_UUID)
set(HAVE_LIBUUID 1)
endif()
else()
unset(HAVE_UUID_UUID_H CACHE)
unset(NEED_LIBUUID CACHE)
unset(HAVE_LIBUUID CACHE)
unset(HAVE_UUID_UUID_H)
unset(NEED_LIBUUID)
unset(HAVE_LIBUUID)
endif()
if(WITH_ZLIB)
@ -362,18 +362,18 @@ if(WITH_ZLIB)
endif()
endif()
else()
unset(HAVE_ZLIB_H CACHE)
unset(HAVE_LIBZ CACHE)
unset(ZLIB_INCLUDE_DIR CACHE)
unset(ZLIB_LIBRARY CACHE)
unset(HAVE_ZLIB_H)
unset(HAVE_LIBZ)
unset(ZLIB_INCLUDE_DIR)
unset(ZLIB_LIBRARY)
endif()
if(WITH_BZIP)
check_include_files(bzlib.h HAVE_BZLIB_H)
check_library_exists(bz2 BZ2_bzCompress "" HAVE_LIBBZ2)
else()
unset(HAVE_BZLIB_H CACHE)
unset(HAVE_LIBBZ2 CACHE)
unset(HAVE_BZLIB_H)
unset(HAVE_LIBBZ2)
endif()
if(WITH_LDAP)
@ -383,10 +383,10 @@ if(WITH_LDAP)
check_library_exists(lber ber_printf "" HAVE_LIBLBER)
set(LDAP_DEPRECATED 1) # Using deprecated ldap api
else()
unset(HAVE_LDAP_H CACHE)
unset(HAVE_LIBLDAP CACHE)
unset(HAVE_LBER_H CACHE)
unset(HAVE_LIBLBER CACHE)
unset(HAVE_LDAP_H)
unset(HAVE_LIBLDAP)
unset(HAVE_LBER_H)
unset(HAVE_LIBLBER)
endif()
if(WITH_LUA)
@ -395,8 +395,8 @@ if(WITH_LUA)
set(HAVE_LIBLUA 1 "Have liblua")
set(HAVE_LUA_H 1 "Have liblua header")
else()
unset(HAVE_LIBLUA CACHE)
unset(HAVE_LUA_H CACHE)
unset(HAVE_LIBLUA)
unset(HAVE_LUA_H)
endif()
if(WITH_FAM)
@ -407,43 +407,42 @@ if(WITH_FAM)
check_function_exists(FAMNoExists HAVE_FAMNOEXISTS)
endif()
else()
unset(HAVE_FAM_H CACHE)
unset(HAVE_LIBFAM CACHE)
unset(HAVE_FAMNOEXISTS CACHE)
unset(HAVE_FAM_H)
unset(HAVE_LIBFAM)
unset(HAVE_FAMNOEXISTS)
endif()
if(WITH_GDBM)
check_include_files(gdbm.h HAVE_GDBM_H)
check_library_exists(gdbm gdbm_open "" HAVE_GDBM)
else()
unset(HAVE_GDBM_H CACHE)
unset(HAVE_GDBM CACHE)
unset(HAVE_GDBM_H)
unset(HAVE_GDBM)
endif()
if(WITH_MEMCACHE)
check_include_files(memcache.h HAVE_MEMCACHE_H)
check_library_exists(memcache mc_new "" HAVE_MEMCACHE)
else()
unset(HAVE_MEMCACHE_H CACHE)
unset(HAVE_MEMCACHE CACHE)
unset(HAVE_MEMCACHE_H)
unset(HAVE_MEMCACHE)
endif()
if(NOT BUILD_STATIC)
check_include_files(dlfcn.h HAVE_DLFCN_H)
else()
unset(HAVE_DLFCN_H CACHE)
unset(HAVE_DLFCN_H)
endif()
if(HAVE_DLFCN_H)
check_library_exists(dl dlopen "" HAVE_LIBDL)
else()
unset(HAVE_LIBDL CACHE)
unset(HAVE_LIBDL)
endif()
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")

1
src/config.h.cmake

@ -6,7 +6,6 @@
#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 */

Loading…
Cancel
Save