1. 20 Oct, 2017 1 commit
    • cmake: use project-relative binary and source directories · 4da74c83
      Due to our split of CMake files into multiple modules, we had to replace
      some uses of the `${CMAKE_CURRENT_SOURCE_DIR}` and
      `${CMAKE_CURRENT_BINARY_DIR}` variables and replace them with
      `${CMAKE_SOURCE_DIR}` and `${CMAKE_BINARY_DIR}`. This enabled us to
      still be able to refer to top-level files when defining build
      instructions inside of a subdirectory.
      
      When replacing all variables, it was assumed that the absolute set of
      variables is always relative to the current project. But in fact, this
      is not the case, as these variables always point to the source and
      binary directory as given by the top-levl project. So the change
      actually broke the ability to include libgit2 directly as a subproject,
      as source files cannot be found anymore.
      
      Fix this by instead using project-specific source and binary directories
      with `${libgit2_SOURCE_DIR}` and `${libgit2_BINARY_DIR}`.
      Patrick Steinhardt committed
  2. 20 Sep, 2017 1 commit
    • cmake: fix static linking for bundled deps · 8c19969a
      Our bundled deps are being built as simple static libraries which are
      then linked into the libgit2 library via `TARGET_LINK_LIBRARIES`. While
      this works for a dynamically built libgit2 library, using this function
      to link two static libraries does not have the expected outcome of
      merging those static libraries into one big library. This leads to
      symbols of our bundled deps being undefined in the resulting libgit2
      archive.
      
      As we have bumped our minimum CMake version to 2.8.11, we can now easily
      make use of object libraries for our bundled dependencies. So build
      instructions are still self-contained inside of the dependency
      directories and the resulting object libraries can just be added to the
      LIBGIT2_OBJECTS list, which will cause them to be linked into the final
      resulting static library. This fixes the issue of undefined symbols.
      Patrick Steinhardt committed
  3. 16 Aug, 2017 4 commits
  4. 03 Jul, 2017 1 commit
    • zlib: include "git2/types.h" instead of "common.h" · 9b0482e4
      The zlib dependency includes "common.h" inside of the "zconf.h" header
      to make available some type declarations like e.g. git_off_t. Including
      the "common.h" header does pull in quite a lot of other headers though,
      which are not required at all. Instead, we can just include our public
      "git2/types.h" header, which is much more limited in its scope but still
      provides everything required for "zconf.h".
      
      This fix eases the transition later on to use a separate "features.h"
      header instead of defines. As we have to generate the "features.h"
      header, we put it in the build directory and add an include directory.
      As we are splitting out building of dependencies into subdirectories,
      this would mean that the zlib dependency needs to be aware of the parent
      project's build directory, which is unfortunate. By including
      "git2/types.h", we avoid this problem.
      Patrick Steinhardt committed
  5. 28 Dec, 2015 1 commit
  6. 22 Dec, 2015 1 commit
  7. 10 Jun, 2015 1 commit
  8. 16 Mar, 2015 3 commits
  9. 05 Dec, 2014 2 commits
  10. 05 Aug, 2014 1 commit
  11. 11 Jun, 2014 5 commits
  12. 09 Dec, 2013 1 commit
  13. 17 Mar, 2013 1 commit
  14. 11 Jan, 2013 3 commits
  15. 23 Nov, 2012 1 commit
  16. 12 Nov, 2012 1 commit
  17. 18 Feb, 2012 3 commits
  18. 17 Feb, 2012 1 commit
  19. 05 Oct, 2011 1 commit
  20. 29 Sep, 2011 1 commit
  21. 28 Sep, 2011 3 commits
  22. 27 Sep, 2011 3 commits
    • Really fix MSVC · a5b0e7f8
      These was left over from the previous PRs.
      
      Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
      Carlos Martín Nieto committed
    • Fix dev branch under MSVC · 887eaf4d
      In libgit2: Move an enum out of an int bitfield in the HTTP transport.
      
      In the parser: Use int bitfields and change some variable sizes to
      better fit thir use. Variables that count the size of the data chunk
      can only ever be as large as off_t. Warning 4127 can be ignored, as
      nobody takes it seriously anyway.
      
      From Emeric: change some variable declarations to keep MSVC happy.
      
      Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
      Carlos Martín Nieto committed
    • http-parser: Do not use bitfields · dc5c8781
      Bitfields suck. And if you make them with non-int types, they suck
      in a non-standards compliant way. Like sucking sideways or something.
      
      This commit removes all bitfields in the `http_parser` struct, and
      replaces them with the minimal type needed to contain their values. Note
      that the fields in the struct have been reordered so they can be packed
      with 4-byte alignment.
      
      This saves both memory on the parser (because non-int bitfields get expanded to
      4byte in most compilers anyway) and time (because the fields are now
      properly aligned and the compiler doesn't need to generate bit-level ops
      to access them).
      Vicent Marti committed