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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d16cfe5..e108b2e 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 4f347e9..5274ab0 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/features.h.in b/src/features.h.in
deleted file mode 100644
index fbf0cab..0000000
--- a/src/features.h.in
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef INCLUDE_features_h__
-#define INCLUDE_features_h__
-
-#cmakedefine GIT_DEBUG_POOL 1
-#cmakedefine GIT_DEBUG_STRICT_ALLOC 1
-#cmakedefine GIT_DEBUG_STRICT_OPEN 1
-
-#cmakedefine GIT_THREADS 1
-#cmakedefine GIT_WIN32_LEAKCHECK 1
-
-#cmakedefine GIT_ARCH_64 1
-#cmakedefine GIT_ARCH_32 1
-
-#cmakedefine GIT_USE_ICONV 1
-#cmakedefine GIT_USE_NSEC 1
-#cmakedefine GIT_USE_STAT_MTIM 1
-#cmakedefine GIT_USE_STAT_MTIMESPEC 1
-#cmakedefine GIT_USE_STAT_MTIME_NSEC 1
-#cmakedefine GIT_USE_FUTIMENS 1
-
-#cmakedefine GIT_REGEX_REGCOMP_L
-#cmakedefine GIT_REGEX_REGCOMP
-#cmakedefine GIT_REGEX_PCRE
-#cmakedefine GIT_REGEX_PCRE2
-#cmakedefine GIT_REGEX_BUILTIN 1
-
-#cmakedefine GIT_QSORT_R_BSD
-#cmakedefine GIT_QSORT_R_GNU
-#cmakedefine GIT_QSORT_S
-
-#cmakedefine GIT_SSH 1
-#cmakedefine GIT_SSH_MEMORY_CREDENTIALS 1
-
-#cmakedefine GIT_NTLM 1
-#cmakedefine GIT_GSSAPI 1
-#cmakedefine GIT_GSSFRAMEWORK 1
-
-#cmakedefine GIT_WINHTTP 1
-#cmakedefine GIT_HTTPS 1
-#cmakedefine GIT_OPENSSL 1
-#cmakedefine GIT_OPENSSL_DYNAMIC 1
-#cmakedefine GIT_SECURE_TRANSPORT 1
-#cmakedefine GIT_MBEDTLS 1
-
-#cmakedefine GIT_SHA1_COLLISIONDETECT 1
-#cmakedefine GIT_SHA1_WIN32 1
-#cmakedefine GIT_SHA1_COMMON_CRYPTO 1
-#cmakedefine GIT_SHA1_OPENSSL 1
-#cmakedefine GIT_SHA1_OPENSSL_DYNAMIC 1
-#cmakedefine GIT_SHA1_MBEDTLS 1
-
-#cmakedefine GIT_SHA256_BUILTIN 1
-#cmakedefine GIT_SHA256_WIN32 1
-#cmakedefine GIT_SHA256_COMMON_CRYPTO 1
-#cmakedefine GIT_SHA256_OPENSSL 1
-#cmakedefine GIT_SHA256_OPENSSL_DYNAMIC 1
-#cmakedefine GIT_SHA256_MBEDTLS 1
-
-#cmakedefine GIT_RAND_GETENTROPY 1
-#cmakedefine GIT_RAND_GETLOADAVG 1
-
-#endif
diff --git a/src/libgit2/CMakeLists.txt b/src/libgit2/CMakeLists.txt
index 0c7dddd..5fbb03d 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 b283395..bf62870 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/util/git2_features.h.in b/src/util/git2_features.h.in
new file mode 100644
index 0000000..fbf0cab
--- /dev/null
+++ b/src/util/git2_features.h.in
@@ -0,0 +1,62 @@
+#ifndef INCLUDE_features_h__
+#define INCLUDE_features_h__
+
+#cmakedefine GIT_DEBUG_POOL 1
+#cmakedefine GIT_DEBUG_STRICT_ALLOC 1
+#cmakedefine GIT_DEBUG_STRICT_OPEN 1
+
+#cmakedefine GIT_THREADS 1
+#cmakedefine GIT_WIN32_LEAKCHECK 1
+
+#cmakedefine GIT_ARCH_64 1
+#cmakedefine GIT_ARCH_32 1
+
+#cmakedefine GIT_USE_ICONV 1
+#cmakedefine GIT_USE_NSEC 1
+#cmakedefine GIT_USE_STAT_MTIM 1
+#cmakedefine GIT_USE_STAT_MTIMESPEC 1
+#cmakedefine GIT_USE_STAT_MTIME_NSEC 1
+#cmakedefine GIT_USE_FUTIMENS 1
+
+#cmakedefine GIT_REGEX_REGCOMP_L
+#cmakedefine GIT_REGEX_REGCOMP
+#cmakedefine GIT_REGEX_PCRE
+#cmakedefine GIT_REGEX_PCRE2
+#cmakedefine GIT_REGEX_BUILTIN 1
+
+#cmakedefine GIT_QSORT_R_BSD
+#cmakedefine GIT_QSORT_R_GNU
+#cmakedefine GIT_QSORT_S
+
+#cmakedefine GIT_SSH 1
+#cmakedefine GIT_SSH_MEMORY_CREDENTIALS 1
+
+#cmakedefine GIT_NTLM 1
+#cmakedefine GIT_GSSAPI 1
+#cmakedefine GIT_GSSFRAMEWORK 1
+
+#cmakedefine GIT_WINHTTP 1
+#cmakedefine GIT_HTTPS 1
+#cmakedefine GIT_OPENSSL 1
+#cmakedefine GIT_OPENSSL_DYNAMIC 1
+#cmakedefine GIT_SECURE_TRANSPORT 1
+#cmakedefine GIT_MBEDTLS 1
+
+#cmakedefine GIT_SHA1_COLLISIONDETECT 1
+#cmakedefine GIT_SHA1_WIN32 1
+#cmakedefine GIT_SHA1_COMMON_CRYPTO 1
+#cmakedefine GIT_SHA1_OPENSSL 1
+#cmakedefine GIT_SHA1_OPENSSL_DYNAMIC 1
+#cmakedefine GIT_SHA1_MBEDTLS 1
+
+#cmakedefine GIT_SHA256_BUILTIN 1
+#cmakedefine GIT_SHA256_WIN32 1
+#cmakedefine GIT_SHA256_COMMON_CRYPTO 1
+#cmakedefine GIT_SHA256_OPENSSL 1
+#cmakedefine GIT_SHA256_OPENSSL_DYNAMIC 1
+#cmakedefine GIT_SHA256_MBEDTLS 1
+
+#cmakedefine GIT_RAND_GETENTROPY 1
+#cmakedefine GIT_RAND_GETLOADAVG 1
+
+#endif
diff --git a/src/util/git2_util.h b/src/util/git2_util.h
index ad3f1c7..c62dc24 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"