[evolution-data-server] Correct WITH_LIBDB configure option processing
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Correct WITH_LIBDB configure option processing
- Date: Wed, 2 Nov 2016 12:29:56 +0000 (UTC)
commit dff0abc8b978ed9b8dd65d1abd3f379295e178f5
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 2 13:29:32 2016 +0100
Correct WITH_LIBDB configure option processing
CMakeLists.txt | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c73404e..5588f3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -454,15 +454,19 @@ endif(NOT WIN32)
# ******************************
# libdb checking
# ******************************
-add_printable_variable(WITH_LIBDB "Prefix where libdb is installed" "")
+add_printable_variable(WITH_LIBDB "Prefix where libdb is installed" ON)
add_printable_variable(WITH_LIBDB_CFLAGS "Arguments required to compile with libdb" "")
add_printable_variable(WITH_LIBDB_LIBS "Arguments required to link with libdb" "")
-if(NOT ("${WITH_LIBDB}" STREQUAL "NO"))
- if(NOT (("${WITH_LIBDB}" STREQUAL "") OR ("${WITH_LIBDB}" STREQUAL "YES")))
+if(WITH_LIBDB STREQUAL "")
+ set(WITH_LIBDB ON)
+endif(WITH_LIBDB STREQUAL "")
+
+if(WITH_LIBDB)
+ if(NOT (WITH_LIBDB OR ("${WITH_LIBDB}" STREQUAL "YES")))
set(LIBDB_CFLAGS "-I${WITH_LIBDB}/include")
set(LIBDB_LIBS "-L${WITH_LIBDB}/lib -ldb")
- else(NOT (("${WITH_LIBDB}" STREQUAL "") OR ("${WITH_LIBDB}" STREQUAL "YES")))
+ else(NOT (WITH_LIBDB OR ("${WITH_LIBDB}" STREQUAL "YES")))
if(("${WITH_LIBDB_CFLAGS}" STREQUAL "") AND ("${WITH_LIBDB_LIBS}" STREQUAL ""))
set(LIBDB_CFLAGS "")
set(LIBDB_LIBS "-ldb")
@@ -470,7 +474,7 @@ if(NOT ("${WITH_LIBDB}" STREQUAL "NO"))
set(LIBDB_CFLAGS ${WITH_LIBDB_CFLAGS})
set(LIBDB_LIBS ${WITH_LIBDB_LIBS})
endif(("${WITH_LIBDB_CFLAGS}" STREQUAL "") AND ("${WITH_LIBDB_LIBS}" STREQUAL ""))
- endif(NOT (("${WITH_LIBDB}" STREQUAL "") OR ("${WITH_LIBDB}" STREQUAL "YES")))
+ endif(NOT (WITH_LIBDB OR ("${WITH_LIBDB}" STREQUAL "YES")))
set(CMAKE_REQUIRED_FLAGS ${LIBDB_CFLAGS})
set(CMAKE_REQUIRED_LIBRARIES ${LIBDB_LIBS})
@@ -482,7 +486,7 @@ if(NOT ("${WITH_LIBDB}" STREQUAL "NO"))
if(NOT HAVE_LIBDB)
message(FATAL_ERROR "libdb not found. Use -DWITH_LIBDB=PATH to specify the library prefix, or
use -DWITH_LIBDB_CFLAGS=-I/path/to/db/include and -DWITH_LIBDB_LIBS=/path/to/db/lib to specify arguments for
compiling and linking. If you want to disable libdb, please use -DWITH_LIBDB=OFF")
endif(NOT HAVE_LIBDB)
-endif(NOT ("${WITH_LIBDB}" STREQUAL "NO"))
+endif(WITH_LIBDB)
# ******************************
# iconv checking
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]