summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-06-18 16:10:38 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2022-06-20 17:09:47 -0400
commitd103620158bb5aca73bc0dad8a230ceda417ab47 (patch)
tree83f51bbd0f646c0aba1c30342a8b5edca1c44047
parent04f34688c43d28d1fa110df7d32e8665232199ff (diff)
downloadlibgit2-d103620158bb5aca73bc0dad8a230ceda417ab47.tar.gz
meta: generated `features.h` is now `git2_features.h`
Linux has a /usr/include/features.h, which gets confusing; update this to `git2_features.h` and move it into the `util` directory.
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/cli/CMakeLists.txt2
-rw-r--r--src/libgit2/CMakeLists.txt2
-rw-r--r--src/util/CMakeLists.txt4
-rw-r--r--src/util/git2_features.h.in (renamed from src/features.h.in)0
-rw-r--r--src/util/git2_util.h4
6 files changed, 7 insertions, 11 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d16cfe538..e108b2e79 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -171,12 +171,6 @@ endif()
add_feature_info(iconv GIT_USE_ICONV "iconv encoding conversion support")
#
-# Configure support
-#
-
-configure_file(features.h.in git2/sys/features.h)
-
-#
# Include child projects
#
diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt
index 4f347e93f..5274ab086 100644
--- a/src/cli/CMakeLists.txt
+++ b/src/cli/CMakeLists.txt
@@ -1,5 +1,5 @@
set(CLI_INCLUDES
- "${libgit2_BINARY_DIR}/src"
+ "${libgit2_BINARY_DIR}/src/util"
"${libgit2_SOURCE_DIR}/src/util"
"${libgit2_SOURCE_DIR}/src/cli"
"${libgit2_SOURCE_DIR}/include")
diff --git a/src/libgit2/CMakeLists.txt b/src/libgit2/CMakeLists.txt
index 0c7ddddba..5fbb03d9f 100644
--- a/src/libgit2/CMakeLists.txt
+++ b/src/libgit2/CMakeLists.txt
@@ -8,7 +8,7 @@ set_target_properties(libgit2 PROPERTIES C_EXTENSIONS OFF)
include(PkgBuildConfig)
set(LIBGIT2_INCLUDES
- "${PROJECT_BINARY_DIR}/src"
+ "${PROJECT_BINARY_DIR}/src/util"
"${PROJECT_SOURCE_DIR}/src/libgit2"
"${PROJECT_SOURCE_DIR}/src/util"
"${PROJECT_SOURCE_DIR}/include")
diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
index b2833954d..bf62870fb 100644
--- a/src/util/CMakeLists.txt
+++ b/src/util/CMakeLists.txt
@@ -4,8 +4,10 @@ add_library(util OBJECT)
set_target_properties(util PROPERTIES C_STANDARD 90)
set_target_properties(util PROPERTIES C_EXTENSIONS OFF)
+configure_file(git2_features.h.in git2_features.h)
+
set(UTIL_INCLUDES
- "${PROJECT_BINARY_DIR}/src"
+ "${PROJECT_BINARY_DIR}/src/util"
"${PROJECT_SOURCE_DIR}/src/util"
"${PROJECT_SOURCE_DIR}/include")
diff --git a/src/features.h.in b/src/util/git2_features.h.in
index fbf0cab60..fbf0cab60 100644
--- a/src/features.h.in
+++ b/src/util/git2_features.h.in
diff --git a/src/util/git2_util.h b/src/util/git2_util.h
index ad3f1c71f..c62dc2419 100644
--- a/src/util/git2_util.h
+++ b/src/util/git2_util.h
@@ -7,8 +7,8 @@
#ifndef INCLUDE_git2_util_h__
#define INCLUDE_git2_util_h__
-#ifndef LIBGIT2_NO_FEATURES_H
-# include "git2/sys/features.h"
+#if !defined(LIBGIT2_NO_FEATURES_H)
+# include "git2_features.h"
#endif
#include "git2/common.h"