diff --git a/CMakeLists.txt b/CMakeLists.txt index c7b5a64056..cb42f35eee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/ include(GNUInstallDirs) -set(URANIUM_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../uranium/scripts" CACHE DIRECTORY "The location of the scripts directory of the Uranium repository") +set(URANIUM_DIR "${CMAKE_SOURCE_DIR}/../Uranium" CACHE DIRECTORY "The location of the Uranium repository") +set(URANIUM_SCRIPTS_DIR "${URANIUM_DIR}/scripts" CACHE DIRECTORY "The location of the scripts directory of the Uranium repository") # Tests include(CuraTests) diff --git a/cmake/CuraTests.cmake b/cmake/CuraTests.cmake index 5c58330a48..cf9fa4ba68 100644 --- a/cmake/CuraTests.cmake +++ b/cmake/CuraTests.cmake @@ -30,13 +30,13 @@ function(cura_add_test) set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT PYTHONPATH=${_PYTHONPATH}) endfunction() -cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH "${CMAKE_SOURCE_DIR}/../Uranium:${CMAKE_SOURCE_DIR}") +cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH "${CMAKE_SOURCE_DIR}:${URANIUM_DIR}") file(GLOB_RECURSE _plugins plugins/*/__init__.py) foreach(_plugin ${_plugins}) get_filename_component(_plugin_directory ${_plugin} DIRECTORY) if(EXISTS ${_plugin_directory}/tests) get_filename_component(_plugin_name ${_plugin_directory} NAME) - cura_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${CMAKE_SOURCE_DIR}/../Uranium:${CMAKE_SOURCE_DIR}:${_plugin_directory}") + cura_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${_plugin_directory}:${CMAKE_SOURCE_DIR}:${URANIUM_DIR}") endif() endforeach()