Fix Python package installation in CMake for tests.

This commit is contained in:
Mikaël Capelle
2023-04-09 20:34:26 +02:00
parent 2eabaf1774
commit 1effc57990
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -30,7 +30,9 @@ QT_ROOT=set:${QT_ROOT}"
mo2_python_pip_install(python-tests
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pylibs
PACKAGES pytest PyQt6==6.3.0)
PACKAGES pytest
PyQt${QT_MAJOR_VERSION}==${QT_VERSION}
PyQt${QT_MAJOR_VERSION}-Qt${QT_MAJOR_VERSION}==${QT_VERSION})
add_dependencies(python-tests mobase)
set_target_properties(python-tests PROPERTIES FOLDER tests/python)
+3 -1
View File
@@ -19,7 +19,9 @@ target_link_libraries(runner-tests PUBLIC runner)
set(PYLIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/pylibs)
mo2_python_pip_install(runner-tests
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pylibs
PACKAGES pytest PyQt6==6.3.0)
PACKAGES
PyQt${QT_MAJOR_VERSION}==${QT_VERSION}
PyQt${QT_MAJOR_VERSION}-Qt${QT_MAJOR_VERSION}==${QT_VERSION})
add_dependencies(runner-tests mobase)