include(FindPkgConfig)
+find_package(Git)
+if(GIT_FOUND)
+ execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD OUTPUT_VARIABLE __tstr)
+ string(FIND ${__tstr} "fatal" __notfound)
+ string(REPLACE "\n" "" __tstr2 ${__tstr})
+ if(${__notfound} EQUAL -1)
+ add_definitions(-D__GIT_REPO_VERSION=${__tstr2})
+ else()
+ add_definitions(-U__GIT_REPO_VERSION)
+ endif()
+endif()
+
include(FindLibAV)
if(LIBAV_FOUND)
add_definitions(-DUSE_LIBAV)