-
Notifications
You must be signed in to change notification settings - Fork 7
/
pil.cmake
46 lines (37 loc) · 1.22 KB
/
pil.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
38
39
40
41
42
43
44
45
46
#
# Install pil library from source
#
if (NOT pil_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (python)
include (numpy)
include (jpeg)
include (tiff)
include (libpng)
include (freetype)
external_source (pil
1.1.7
Imaging-1.1.7.tar.gz
fc14a54e1ce02a0225be8854bfba478e
http://effbot.org/downloads
FORCE)
# Fix library and path names in setup.py
set (pil_PATCH ${PYTHON_EXE} ${PROJECT_SOURCE_DIR}/patches/patch_pil.py ${pil_SRC_DIR} ${ILASTIK_DEPENDENCY_DIR})
message ("Installing ${pil_NAME} into ilastik build area: ${ILASTIK_DEPENDENCY_DIR} ...")
ExternalProject_Add(${pil_NAME}
DEPENDS ${python_NAME} ${numpy_NAME} ${jpeg_NAME} ${libpng_NAME} ${tiff_NMAE} ${freetype_NMAE}
PREFIX ${ILASTIK_DEPENDENCY_DIR}
URL ${pil_URL}
URL_MD5 ${pil_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ${pil_PATCH}
CONFIGURE_COMMAND ""
BUILD_COMMAND ${PYTHON_EXE} setup.py build_ext -c msvc
BUILD_IN_SOURCE 1
TEST_COMMAND ""
INSTALL_COMMAND ${PYTHON_EXE} setup.py install
)
set_target_properties(${pil_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT pil_NAME)