-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (58 loc) · 2.53 KB
/
CMakeLists.txt
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
65
66
67
CMAKE_MINIMUM_REQUIRED(VERSION 3.19)
PROJECT(Illyrian VERSION 0.3.5)
SET(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/dist" CACHE STRING "" FORCE)
SET(Illyrian_INSTALL_PATH illyrian)
CONFIGURE_FILE(${CMAKE_CURRENT_LIST_DIR}/illyrian/version.py ${CMAKE_CURRENT_BINARY_DIR}/illyrian/version.py @ONLY)
INSTALL(FILES
${CMAKE_CURRENT_LIST_DIR}/LICENSE
DESTINATION .)
INSTALL(FILES
${CMAKE_CURRENT_LIST_DIR}/README.md
${CMAKE_CURRENT_LIST_DIR}/illyrian/__init__.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/__main__.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/env.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/info.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/run.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/verify.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/wheel.py
${CMAKE_CURRENT_BINARY_DIR}/illyrian/version.py
DESTINATION ${Illyrian_INSTALL_PATH})
INSTALL(FILES
${CMAKE_CURRENT_LIST_DIR}/illyrian/manylinux/__init__.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/manylinux/code.py
DESTINATION ${Illyrian_INSTALL_PATH}/manylinux)
INSTALL(FILES
${CMAKE_CURRENT_LIST_DIR}/illyrian/util/__init__.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/util/code.py
DESTINATION ${Illyrian_INSTALL_PATH}/util)
INSTALL(FILES
${CMAKE_CURRENT_LIST_DIR}/illyrian/cpython/__init__.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/cpython/code.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/cpython/cpython36.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/cpython/cpython37.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/cpython/cpython38.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/cpython/cpython39.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/cpython/cpython310.py
${CMAKE_CURRENT_LIST_DIR}/illyrian/cpython/cpython311.py
DESTINATION ${Illyrian_INSTALL_PATH}/cpython)
INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/illyrian/cmake/illyrian.cmake DESTINATION ${Illyrian_INSTALL_PATH}/cmake)
INCLUDE(illyrian/cmake/illyrian.cmake)
ILLYRIAN_FIND_PYTHON()
ILLYRIAN_INSTALL_PYTHON_PACKAGE("pydot")
ILLYRIAN_INSTALL_PYTHON_PACKAGE("auditwheel")
IF("${Python3_VERSION_MINOR}" LESS 7)
ILLYRIAN_INSTALL_PYTHON_PACKAGE("importlib_resources")
ENDIF()
ADD_PYTHON_WHEEL(dist ${CMAKE_CURRENT_LIST_DIR}/illyrian.json)
ILLYRIAN_INSTALL_FIND_BEGIN(Illyrian PYTHON_NAME illyrian FILE "__main__.py")
ILLYRIAN_INSTALL_FIND_REQUIRED(FILE Illyrian MAIN "__main__.py" PATHS "\${Illyrian_DIR}")
ILLYRIAN_INSTALL_FIND_REQUIRED(FILE Illyrian CMAKE "illyrian.cmake" PATHS "\${Illyrian_DIR}/cmake")
ILLYRIAN_INSTALL_FIND_END(Illyrian
VERSION_FILE "\${Illyrian_DIR}/version.py"
VERSION_REGEX "__version__ = '([0-9\\.]+)'"
APPEND
"IF(Illyrian_FOUND)"
"\tINCLUDE(\${Illyrian_CMAKE})"
"ENDIF()"
DESTINATION illyrian/cmake
)