This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyqt4.cmake
65 lines (54 loc) · 1.81 KB
/
pyqt4.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# Install pyqt4 libraries from source
#
if (NOT pyqt4_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (PatchSupport)
include (python)
include (qt4)
include (sip)
message ("Installing ${pyqt4_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
external_source (pyqt4
4.10.3
PyQt-mac-gpl-4.10.3.tar.gz
4dfb646512dd479cfa7518605eda1f32
http://iweb.dl.sourceforge.net/project/pyqt/PyQt4/PyQt-4.10.3)
set (EXTRA_PYQT4_CONFIG_FLAGS
--use-arch=x86_64)
elseif (${WIN32})
external_source (pyqt4
4.10.3
PyQt-win-gpl-4.10.3.zip
14f09b0ed9f04daf8f19f680d3b90e8b
http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10.3)
elseif (${UNIX})
external_source (pyqt4
4.10.3
PyQt-x11-gpl-4.10.3.tar.gz
8b13d2ab64e4d2fd0037b81b7e78c15c
http://iweb.dl.sourceforge.net/project/pyqt/PyQt4/PyQt-4.10.3)
else ()
message (FATAL_ERROR "ERROR: Cannot detect valid system in pyqt4 cmake file")
endif()
ExternalProject_Add(${pyqt4_NAME}
DEPENDS ${python_NAME} ${sip_NAME} ${qt4_NAME}
PREFIX ${BUILDEM_DIR}
URL ${pyqt4_URL}
URL_MD5 ${pyqt4_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} ${pyqt4_SRC_DIR}/configure.py
--confirm-license
--verbose
-q "${BUILDEM_DIR}/bin/qmake"
${EXTRA_PYQT4_CONFIG_FLAGS}
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE)
INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install
BUILD_IN_SOURCE 1
)
set_target_properties(${pyqt4_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT pyqt4_NAME)