forked from npshub/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BundlePython.cmake
47 lines (46 loc) · 1.69 KB
/
BundlePython.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
# ######################################################################################################################
# BundlePython.cmake
#
# This file contains the code to bundle the Python distribution from third party
#
# ######################################################################################################################
if(MSVC AND NOT CONDA_BUILD)
# ####################################################################################################################
# Bundle for package
# ####################################################################################################################
install(
DIRECTORY ${MSVC_PYTHON_EXECUTABLE_DIR}/DLLs
DESTINATION bin
PATTERN ".svn" EXCLUDE
PATTERN ".git" EXCLUDE
PATTERN "*_d.pyd" EXCLUDE
PATTERN "*_d.dll" EXCLUDE
)
install(
DIRECTORY ${MSVC_PYTHON_EXECUTABLE_DIR}/Lib
DESTINATION bin
PATTERN ".svn" EXCLUDE
PATTERN ".git" EXCLUDE
PATTERN "*_d.pyd" EXCLUDE
)
install(
DIRECTORY ${MSVC_PYTHON_EXECUTABLE_DIR}/Scripts
DESTINATION bin
PATTERN ".svn" EXCLUDE
PATTERN ".git" EXCLUDE
PATTERN "*_d.py" EXCLUDE
)
install(
DIRECTORY ${MSVC_PYTHON_EXECUTABLE_DIR}/tcl
DESTINATION bin
PATTERN ".svn" EXCLUDE
PATTERN ".git" EXCLUDE
)
install(FILES ${MSVC_PYTHON_EXECUTABLE_DIR}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}.dll
${Python_EXECUTABLE} ${Python_W_EXECUTABLE} DESTINATION bin
)
# Python >= 3 has an minimal API DLL too
if(EXISTS ${MSVC_PYTHON_EXECUTABLE_DIR}/python${Python_VERSION_MAJOR}.dll)
install(FILES ${MSVC_PYTHON_EXECUTABLE_DIR}/python${Python_VERSION_MAJOR}.dll DESTINATION bin)
endif()
endif()