forked from Slicer/SlicerGitSVNArchive
-
Notifications
You must be signed in to change notification settings - Fork 2
/
External_python-GitPython.cmake
37 lines (29 loc) · 1.15 KB
/
External_python-GitPython.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
set(proj python-GitPython)
# Set dependency list
set(${proj}_DEPENDENCIES python python-setuptools python-gitdb)
# Include dependent projects if any
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)
if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
# XXX - Add a test checking if <proj> is available
endif()
if(NOT DEFINED ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
set(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} ${${CMAKE_PROJECT_NAME}_USE_SYSTEM_python})
endif()
if(NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
URL "https://pypi.python.org/packages/source/G/GitPython/GitPython-0.3.2.RC1.tar.gz"
URL_MD5 "849082fe29adc653a3621465213cab96"
SOURCE_DIR ${proj}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${PYTHON_EXECUTABLE} setup.py install
DEPENDS
${${proj}_DEPENDENCIES}
)
# See #3749 - Delete test files causing packaging to fail on windows
ExternalProject_PythonModule_InstallTreeCleanup(${proj} "git" "test")
else()
ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
endif()