diff --git a/CMakeLists.txt b/CMakeLists.txt index 30d1d6cf3..ed015b61f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ PROJECT(libgit2 C) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -FILE(STRINGS "src/git2.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$") +FILE(STRINGS "include/git2.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$") STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"([0-9]+).*$" "\\1" LIBGIT2_VERSION_MAJOR "${GIT2_HEADER}") STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_MINOR "${GIT2_HEADER}") @@ -73,7 +73,7 @@ ENDIF () FILE(GLOB SRC src/*.c src/backends/*.c) FILE(GLOB SRC_SHA1 src/block-sha1/*.c) FILE(GLOB SRC_PLAT src/unix/*.c) -FILE(GLOB SRC_H src/git/*.h) +FILE(GLOB SRC_H include/git2/*.h) # On Windows use specific platform sources IF (WIN32 AND NOT CYGWIN) @@ -107,8 +107,8 @@ INSTALL(TARGETS git2 LIBRARY DESTINATION ${INSTALL_LIB} ARCHIVE DESTINATION ${INSTALL_LIB} ) -INSTALL(DIRECTORY src/git2 DESTINATION ${INSTALL_INC} ) -INSTALL(FILES src/git2.h DESTINATION ${INSTALL_INC} ) +INSTALL(DIRECTORY include/git2 DESTINATION ${INSTALL_INC} ) +INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} ) # Tests IF (BUILD_TESTS) diff --git a/src/git2.h b/include/git2.h similarity index 100% rename from src/git2.h rename to include/git2.h diff --git a/src/git2/blob.h b/include/git2/blob.h similarity index 100% rename from src/git2/blob.h rename to include/git2/blob.h diff --git a/src/git2/commit.h b/include/git2/commit.h similarity index 100% rename from src/git2/commit.h rename to include/git2/commit.h diff --git a/src/git2/common.h b/include/git2/common.h similarity index 100% rename from src/git2/common.h rename to include/git2/common.h diff --git a/src/git2/errors.h b/include/git2/errors.h similarity index 100% rename from src/git2/errors.h rename to include/git2/errors.h diff --git a/src/git2/index.h b/include/git2/index.h similarity index 100% rename from src/git2/index.h rename to include/git2/index.h diff --git a/src/git2/object.h b/include/git2/object.h similarity index 100% rename from src/git2/object.h rename to include/git2/object.h diff --git a/src/git2/odb.h b/include/git2/odb.h similarity index 100% rename from src/git2/odb.h rename to include/git2/odb.h diff --git a/src/git2/odb_backend.h b/include/git2/odb_backend.h similarity index 100% rename from src/git2/odb_backend.h rename to include/git2/odb_backend.h diff --git a/src/git2/oid.h b/include/git2/oid.h similarity index 100% rename from src/git2/oid.h rename to include/git2/oid.h diff --git a/src/git2/refs.h b/include/git2/refs.h similarity index 100% rename from src/git2/refs.h rename to include/git2/refs.h diff --git a/src/git2/repository.h b/include/git2/repository.h similarity index 100% rename from src/git2/repository.h rename to include/git2/repository.h diff --git a/src/git2/revwalk.h b/include/git2/revwalk.h similarity index 100% rename from src/git2/revwalk.h rename to include/git2/revwalk.h diff --git a/src/git2/signature.h b/include/git2/signature.h similarity index 100% rename from src/git2/signature.h rename to include/git2/signature.h diff --git a/src/git2/tag.h b/include/git2/tag.h similarity index 100% rename from src/git2/tag.h rename to include/git2/tag.h diff --git a/src/git2/thread-utils.h b/include/git2/thread-utils.h similarity index 100% rename from src/git2/thread-utils.h rename to include/git2/thread-utils.h diff --git a/src/git2/tree.h b/include/git2/tree.h similarity index 100% rename from src/git2/tree.h rename to include/git2/tree.h diff --git a/src/git2/types.h b/include/git2/types.h similarity index 100% rename from src/git2/types.h rename to include/git2/types.h diff --git a/src/git2/zlib.h b/include/git2/zlib.h similarity index 100% rename from src/git2/zlib.h rename to include/git2/zlib.h diff --git a/wscript b/wscript index 7c6bba494..aeb17a9f4 100644 --- a/wscript +++ b/wscript @@ -132,7 +132,7 @@ def build_library(bld, build_type): sources = directory.ant_glob('src/*.c') # Find the version of the library, from our header file - version = get_libgit2_version(directory.find_node("src/git2.h").abspath()) + version = get_libgit2_version(directory.find_node("include/git2.h").abspath()) # Compile platform-dependant code # E.g. src/unix/*.c @@ -153,7 +153,7 @@ def build_library(bld, build_type): BUILD[build_type]( source=sources, target='git2', - includes='src', + includes=['src', 'include'], install_path='${LIBDIR}', use=ALL_LIBS, vnum=version, @@ -168,8 +168,8 @@ def build_library(bld, build_type): ) # Install headers - bld.install_files('${PREFIX}/include', directory.find_node('src/git2.h')) - bld.install_files('${PREFIX}/include/git2', directory.ant_glob('src/git2/*.h')) + bld.install_files('${PREFIX}/include', directory.find_node('include/git2.h')) + bld.install_files('${PREFIX}/include/git2', directory.ant_glob('include/git2/*.h')) # On Unix systems, let them know about installation if bld.env.PLATFORM == 'unix' and bld.cmd == 'install-shared': @@ -191,7 +191,7 @@ def build_test(bld): bld.program( source=sources, target='libgit2_test', - includes=['src', 'tests'], + includes=['src', 'tests', 'include'], defines=['TEST_RESOURCES="%s"' % resources_path], use=['git2'] + ALL_LIBS )