Skip to content
Snippets Groups Projects
Commit 2b40ab9a authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

CMake: make tests independent of Qt5/6

parent b905afb1
No related branches found
No related tags found
No related merge requests found
......@@ -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})
......
......@@ -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} )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment