diff options
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a6f105a..9ae65ae 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,9 +33,22 @@ set(COMMON_CFLAGS "${COMMON_CFLAGS} ${GIT2_CFLAGS}") set(COMMON_LDFLAGS "${COMMON_LDFLAGS} ${GIT2_LDFLAGS}") set(COMMON_LIBS "${COMMON_LIBS};${GIT2_LIBRARIES}") +## check for git_repository_open_no_backend() function. +include(CheckCSourceCompiles) +set(CMAKE_REQUIRED_LIBRARIES "${GIT2_LIBRARIES}") +check_c_source_compiles(" + #include <git2.h> + int main(int argc, char *argv[]) { + return git_repository_open_no_backend(NULL,NULL,NULL,NULL,NULL); + }" HAVE_git_repository_open_no_backend) + ## LuaNativeObjects include(LuaNativeObjects) +## generate config.h +configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake + ${CMAKE_SOURCE_DIR}/build/config.h) + include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${LUA_INCLUDE_DIR}) |