diff --git a/CMakeModules/CalamaresAddLibrary.cmake b/CMakeModules/CalamaresAddLibrary.cmake index 0cbad7424..bc9b4ba6d 100644 --- a/CMakeModules/CalamaresAddLibrary.cmake +++ b/CMakeModules/CalamaresAddLibrary.cmake @@ -86,9 +86,9 @@ function(calamares_add_library) # add link targets target_link_libraries(${target} LINK_PUBLIC ${Calamares_LIBRARIES} - Qt5::Core - Qt5::Gui - Qt5::Widgets + ${qtname}::Core + ${qtname}::Gui + ${qtname}::Widgets ) if(LIBRARY_LINK_LIBRARIES) target_link_libraries(${target} LINK_PUBLIC ${LIBRARY_LINK_LIBRARIES}) diff --git a/CMakeModules/CalamaresAddTest.cmake b/CMakeModules/CalamaresAddTest.cmake index b40e92939..984077e83 100644 --- a/CMakeModules/CalamaresAddTest.cmake +++ b/CMakeModules/CalamaresAddTest.cmake @@ -36,8 +36,8 @@ function(calamares_add_test name) LINK_LIBRARIES Calamares::calamares ${TEST_LIBRARIES} - Qt5::Core - Qt5::Test + ${qtname}::Core + ${qtname}::Test ) calamares_automoc( ${TEST_NAME} ) # We specifically pass in the source directory of the test-being- @@ -47,7 +47,7 @@ function(calamares_add_test name) PRIVATE -DBUILD_AS_TEST="${CMAKE_CURRENT_SOURCE_DIR}" ${TEST_DEFINITIONS} ) if(TEST_GUI) - target_link_libraries(${TEST_NAME} Calamares::calamaresui Qt5::Gui) + target_link_libraries(${TEST_NAME} Calamares::calamaresui ${qtname}::Gui) endif() if(TEST_RESOURCES) calamares_autorcc( ${TEST_NAME} ${TEST_RESOURCES} )