File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,31 @@ message(STATUS "QT_VERSION_MAJOR = ${QT_VERSION_MAJOR}")
3434
3535find_package (Python3 COMPONENTS Development)
3636
37+ # Set the environment as defined in Readme.md
38+ # Set environment variables for Python
39+ if (Python3_FOUND)
40+ set (PYTHON_VERSION "${Python3_VERSION_MAJOR} .${Python3_VERSION_MINOR} " )
41+ set (PYTHON_PATH "${Python3_PREFIX} " )
42+ set (PYTHON_LIB "${Python3_PREFIX} /libs" )
43+ set (PYTHON_DIR "${Python3_PREFIX} " )
44+ set (ENV{PYTHON_VERSION} "${PYTHON_VERSION} " )
45+ set (ENV{PYTHON_PATH} "${PYTHON_PATH} " )
46+ set (ENV{PYTHON_LIB} "${PYTHON_LIB} " )
47+ set (ENV{PYTHON_DIR} "${PYTHON_DIR} " )
48+ endif ()
49+
50+ # Set QTDIR environment variable to Qt installation root
51+ if (FORCE_BUILD_QT5)
52+ if (DEFINED Qt5_DIR)
53+ set (ENV{QTDIR} "${Qt5_DIR} " )
54+ endif ()
55+ else ()
56+ if (DEFINED Qt6_DIR)
57+ set (ENV{QTDIR} "${Qt6_DIR} " )
58+ endif ()
59+ endif ()
60+
61+
3762set (PYTHONQT_SUFFIX Qt${QT_VERSION_MAJOR} .${QT_VERSION_MINOR} -Python${Python3_VERSION_MAJOR} .${Python3_VERSION_MINOR} )
3863include_directories (src)
3964add_subdirectory (generator)
You can’t perform that action at this time.
0 commit comments