mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 13:45:38 +00:00
(Unix) Added the libgit2 library as a dependency
This commit is contained in:
parent
6347ec9a3d
commit
32db3d78b1
25
CMake/Packages/FindLibgit2.cmake
Normal file
25
CMake/Packages/FindLibgit2.cmake
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Find the git2 library.
|
||||
#
|
||||
# GIT2_INCLUDE_DIRS - Where to find git2.h, etc.
|
||||
# GIT2_LIBRARIES - List of libraries when using libgit2.
|
||||
# GIT2_FOUND - True if libgit2 is found.
|
||||
|
||||
# GIT2_INCLUDE_PATH
|
||||
find_path(GIT2_INCLUDE_PATH NAMES git2.h)
|
||||
# GIT2_LIBRARY
|
||||
find_library(GIT2_LIBRARY NAMES git2)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set GIT2_FOUND to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libgit2 REQUIRED_VARS GIT2_LIBRARY GIT2_INCLUDE_PATH)
|
||||
|
||||
if(GIT2_FOUND)
|
||||
set(GIT2_INCLUDE_DIR ${GIT2_INCLUDE_PATH})
|
||||
set(GIT2_INCLUDE_DIRS ${GIT2_INCLUDE_PATH})
|
||||
set(GIT2_LIBRARIES ${GIT2_LIBRARY})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
GIT2_INCLUDE_PATH
|
||||
GIT2_LIBRARY
|
||||
)
|
|
@ -134,6 +134,7 @@ elseif(NOT EMSCRIPTEN)
|
|||
find_package(FFmpeg REQUIRED)
|
||||
find_package(FreeImage REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
find_package(Libgit2 REQUIRED)
|
||||
find_package(Pugixml REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
endif()
|
||||
|
@ -451,6 +452,7 @@ else()
|
|||
${FFMPEG_INCLUDE_DIRS}
|
||||
${FreeImage_INCLUDE_DIRS}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${GIT2_INCLUDE_PATH}
|
||||
${PUGIXML_INCLUDE_DIRS}
|
||||
${SDL2_INCLUDE_DIR})
|
||||
endif()
|
||||
|
@ -563,6 +565,7 @@ else()
|
|||
${FFMPEG_LIBRARIES}
|
||||
${FreeImage_LIBRARIES}
|
||||
${FREETYPE_LIBRARIES}
|
||||
${GIT2_LIBRARY}
|
||||
${PUGIXML_LIBRARIES}
|
||||
${SDL2_LIBRARY})
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue