代码拉取完成,页面将自动刷新
From f41430411039204c47bfe8479be21a1721caf0bb Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Fri, 12 Jan 2024 15:56:08 +0100
Subject: [PATCH] build: Bump CMake version requirement to 3.15 and change
libedataserverui4 .h files copy
Let's depend on a newer version of CMake. The previous 3.1 compatibility code
will be gone in future CMake releases.
The Ninja generator requires different way to copy the libedataserverui4 header
files, thus it knows where the files come from.
---
CMakeLists.txt | 4 ++--
src/libedataserverui/CMakeLists.txt | 14 ++++++++++----
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f75420b..dd59de6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
# Evolution-Data-Server build script
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.15)
+cmake_policy(VERSION 3.15)
project(evolution-data-server
VERSION 3.46.2
diff --git a/src/libedataserverui/CMakeLists.txt b/src/libedataserverui/CMakeLists.txt
index c2d250c..860946c 100644
--- a/src/libedataserverui/CMakeLists.txt
+++ b/src/libedataserverui/CMakeLists.txt
@@ -271,10 +271,16 @@ install(FILES ${HEADERS}
DESTINATION ${privincludedir}/libedataserverui${UI_VERSION}
)
-# create libedataserverui4/... in the build dir, thus .gir can find it
-file(COPY ${HEADERS}
- DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}/
-)
+# create libedataserverui4/... in the build dir, thus .gir can find it;
+# do it this way, to satisfy Ninja generator (see CMP0058)
+foreach(_item IN LISTS HEADERS SOURCES)
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_item}")
+ file(GENERATE
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}/${_item}
+ INPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_item}
+ )
+ endif()
+endforeach()
set(gir_sources ${SOURCES} ${HEADERS})
set(gir_identifies_prefixes E)
--
GitLab
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。