• Show log

    Commit

  • Hash : 4da74c83
    Author : Patrick Steinhardt
    Date : 2017-10-20T07:29:17

    cmake: use project-relative binary and source directories
    
    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}`.