(macOS) Added the libgit2 library as a dependency

This commit is contained in:
Leon Styhre 2023-03-22 00:17:26 +01:00
parent b5d1dfe8ef
commit c8f318b344
4 changed files with 33 additions and 0 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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