From 0a130b3b24fe8561a930821f7b2e9679f5522454 Mon Sep 17 00:00:00 2001 From: ballessay Date: Sat, 12 Apr 2025 04:44:30 +0200 Subject: [PATCH 1/2] Increase minimum cmake version Stops cmake 4 deprecation warnings in the form of: [cmake] CMake Deprecation Warning at libgit2cpp/CMakeLists.txt:1 (cmake_minimum_required): [cmake] Compatibility with CMake < 3.10 will be removed from a future version of [cmake] CMake. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa4ba6c..d7d0690 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.10) project(libgit2cpp LANGUAGES C CXX) set(package git2cpp) From 0cb8847d3829f69a13befffbe42260a512a4e9e4 Mon Sep 17 00:00:00 2001 From: ballessay Date: Sat, 12 Apr 2025 04:53:09 +0200 Subject: [PATCH 2/2] Disable include(InstallRules) to fix cmake errors Since I currently won't need/use an install target and when BUNDLE_LIBGIT2 is enabled the following errors occur: [cmake] CMake Error in libgit2cpp/CMakeLists.txt: [cmake] Target "git2cpp" INTERFACE_INCLUDE_DIRECTORIES property contains path: [cmake] [cmake] "libgit2cpp/libs/libgit2/include" [cmake] [cmake] which is prefixed in the source directory. [cmake] [cmake] [cmake] CMake Error in libgit2cpp/CMakeLists.txt: [cmake] install(EXPORT "git2cppTargets" ...) includes target "git2cpp" which [cmake] requires target "libgit2package" that is not in any export set. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d7d0690..a574cba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,4 +60,6 @@ else () target_link_libraries(${package} PkgConfig::LibGit2) endif () -include(InstallRules) +if (NOT BUNDLE_LIBGIT2) + include(InstallRules) +endif()