Blame SOURCES/0001-Only-require-glib-2.40-when-tests-are-build-without-.patch

055751
From 75a845abfe4823837e3f07274911dc275150f5a4 Mon Sep 17 00:00:00 2001
055751
From: seebk <mail@sebastiankraft.net>
055751
Date: Sat, 21 Nov 2015 09:48:41 +0000
055751
Subject: [PATCH 001/113] Only require glib 2.40 when tests are build, without
055751
 tests glib 2.26 is sufficient
055751
055751
---
055751
 CMakeLists.txt | 14 ++++++++++----
055751
 1 file changed, 10 insertions(+), 4 deletions(-)
055751
055751
diff --git a/CMakeLists.txt b/CMakeLists.txt
055751
index ceac8fc..21f082b 100644
055751
--- a/CMakeLists.txt
055751
+++ b/CMakeLists.txt
055751
@@ -85,10 +85,16 @@ IF(WIN32)
055751
   ENDIF()
055751
 ENDIF()
055751
 
055751
-# find dependencies
055751
-# NOTE: must be one of the macros listed in https://developer.gnome.org/glib/stable/glib-Version-Information.html
055751
-SET(LENSFUN_GLIB_REQUIREMENT_MACRO "GLIB_VERSION_2_40")
055751
-FIND_PACKAGE(GLIB2 REQUIRED 2.40)
055751
+
055751
+IF (BUILD_TESTS)
055751
+  # automatic tests need at least glib version 2.40
055751
+  # NOTE: must be one of the macros listed in https://developer.gnome.org/glib/stable/glib-Version-Information.html
055751
+  SET(LENSFUN_GLIB_REQUIREMENT_MACRO "GLIB_VERSION_2_40")
055751
+  FIND_PACKAGE(GLIB2 REQUIRED)
055751
+ELSE()
055751
+  SET(LENSFUN_GLIB_REQUIREMENT_MACRO "GLIB_VERSION_2_26")
055751
+  FIND_PACKAGE(GLIB2 REQUIRED)
055751
+ENDIF()
055751
 
055751
 INCLUDE_DIRECTORIES(SYSTEM ${GLIB2_INCLUDE_DIRS})
055751
 
055751
-- 
055751
2.7.4
055751