CMake: make tests independent of Qt5/6
This commit is contained in:
parent
b905afb169
commit
2b40ab9a5b
@ -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} )
|
||||
|
Loading…
Reference in New Issue
Block a user