[evolution-data-server] Bug 773659 - Don't set CFLAGS returned by pkg-config as CMAKE_REQUIRED_FLAGS



commit 27b477ff21ea57dd6ce654d79e3ecc63ebda6dee
Author: Milan Crha <mcrha redhat com>
Date:   Mon Oct 31 15:56:34 2016 +0100

    Bug 773659 - Don't set CFLAGS returned by pkg-config as CMAKE_REQUIRED_FLAGS

 CMakeLists.txt |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8eec958..863efef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -855,10 +855,11 @@ set(CAMEL_CFLAGS ${CAMEL_CFLAGS} ${KRB5_CFLAGS} ${MANUAL_NSS_CFLAGS} ${MANUAL_NS
 set(CAMEL_LDFLAGS ${CAMEL_LDFLAGS} -lz ${KRB5_LDFLAGS} ${MANUAL_NSS_LIBS} ${MANUAL_NSPR_LIBS} ${ICU_LDFLAGS})
 
 # ******************************
-# libical tweaks, part II (re-using CALENDAR_CFLAGS/CALENDAR_LDFLAGS)
+# libical tweaks, part II (re-using CALENDAR modules)
 # ******************************
 
-set(CMAKE_REQUIRED_FLAGS ${CALENDAR_CFLAGS})
+set(CMAKE_REQUIRED_DEFINITIONS ${CALENDAR_CFLAGS_OTHER})
+set(CMAKE_REQUIRED_INCLUDES ${CALENDAR_INCLUDE_DIRS})
 set(CMAKE_REQUIRED_LIBRARIES ${CALENDAR_LDFLAGS})
 
 CHECK_C_SOURCE_COMPILES("#include <libical/ical.h>
@@ -873,7 +874,8 @@ CHECK_C_SOURCE_COMPILES("#include <libical/ical.h>
                                return 0;
                        }" HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT)
 
-unset(CMAKE_REQUIRED_FLAGS)
+unset(CMAKE_REQUIRED_DEFINITIONS)
+unset(CMAKE_REQUIRED_INCLUDES)
 unset(CMAKE_REQUIRED_LIBRARIES)
 
 # ******************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]