diff --git a/CMakeLists.txt b/CMakeLists.txt index f8c9e3423..fa6fb1812 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -429,6 +429,7 @@ if(APPLE) ${CMAKE_CURRENT_SOURCE_DIR}/external/FFmpeg ${CMAKE_CURRENT_SOURCE_DIR}/external/freeimage/FreeImage/Source ${CMAKE_CURRENT_SOURCE_DIR}/external/freetype/include + ${CMAKE_CURRENT_SOURCE_DIR}/external/libgit2/include ${CMAKE_CURRENT_SOURCE_DIR}/external/pugixml/src ${CMAKE_CURRENT_SOURCE_DIR}/external/SDL) elseif(WIN32) @@ -489,6 +490,7 @@ if(APPLE) ${PROJECT_SOURCE_DIR}/libswscale.6.dylib ${PROJECT_SOURCE_DIR}/libfreeimage.a ${PROJECT_SOURCE_DIR}/libfreetype.6.dylib + ${PROJECT_SOURCE_DIR}/libgit2.1.6.dylib ${PROJECT_SOURCE_DIR}/libpugixml.a ${PROJECT_SOURCE_DIR}/libSDL2-2.0.0.dylib) elseif(WIN32) diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index c1320fe8b..b8cf81e0c 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -216,6 +216,8 @@ elseif(APPLE) PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libfreetype.6.dylib PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libgit2.1.6.dylib + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libSDL2-2.0.0.dylib PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) diff --git a/tools/macOS_dependencies_build.sh b/tools/macOS_dependencies_build.sh index a59d1ce57..2e6ad1172 100755 --- a/tools/macOS_dependencies_build.sh +++ b/tools/macOS_dependencies_build.sh @@ -80,6 +80,21 @@ make -j${JOBS} cp libfreeimage.a ../../.. cd ../.. +echo "\nBuilding libgit2" + +if [ ! -d libgit2/build ]; then + echo "libgit2 directory is missing, aborting." + exit +fi + +cd libgit2/build +rm -f CMakeCache.txt +cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF .. +make clean +make -j${JOBS} +cp libgit2.1.6.3.dylib ../../../libgit2.1.6.dylib +cd ../.. + echo "\nBuilding pugixml" if [ ! -d pugixml ]; then diff --git a/tools/macOS_dependencies_setup.sh b/tools/macOS_dependencies_setup.sh index ab342772f..c2a7377c4 100755 --- a/tools/macOS_dependencies_setup.sh +++ b/tools/macOS_dependencies_setup.sh @@ -164,6 +164,20 @@ EOF fi cd ../.. +echo "\nSetting up libgit2" +rm -rf libgit2 +git clone https://github.com/libgit2/libgit2.git + +if [ ! -d libgit2 ]; then + echo "libgit2 directory is missing, aborting." + exit +fi + +cd libgit2 +git checkout v1.6.3 +mkdir build +cd .. + echo "\nSetting up pugixml" rm -rf pugixml git clone https://github.com/zeux/pugixml.git