summaryrefslogtreecommitdiff
path: root/indra/cmake/DepsBuild.cmake
blob: f4d80e9a67e77319eb78345908034c0981067b36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- cmake -*-
find_program(GIT git)

macro( checkout_deps_repository DEPSREPO DEPSDIR DEPSTAG)
  execute_process(
	  COMMAND ${GIT} "clone" ${DEPSREPO} ${DEPSDIR}
	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../..
  )
  execute_process(
	  COMMAND ${GIT} "checkout" ${DEPSTAG}
	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../${DEPSDIR}
  )
  execute_process(
	  COMMAND ${GIT} "pull"
	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../${DEPSDIR}
  )
endmacro( checkout_deps_repository )