forked from Slicer/SlicerGitSVNArchive
-
Notifications
You must be signed in to change notification settings - Fork 2
/
External_python-chardet.cmake
34 lines (27 loc) · 1.01 KB
/
External_python-chardet.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
set(proj python-chardet)
# Set dependency list
set(${proj}_DEPENDENCIES python python-setuptools python-async python-smmap)
# 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/c/chardet/chardet-2.2.1.tar.gz"
URL_MD5 "4a758402eaefd0331bdedc7ecb6f452c"
SOURCE_DIR ${proj}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${PYTHON_EXECUTABLE} setup.py install
DEPENDS
${${proj}_DEPENDENCIES}
)
else()
ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
endif()