Warning, /frameworks/solid/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 include(ECMAddTests)
0002 
0003 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Concurrent Test)
0004 
0005 ########### fakehardwaretest ###############
0006 
0007 if (BUILD_DEVICE_BACKEND_fakehw)
0008     ecm_add_test(fakehardwaretest.cpp LINK_LIBRARIES KF6Solid_static Qt6::Xml Qt6::Test)
0009     # QT5 TODO Port solid to QFINDTESTDATA
0010     target_compile_definitions(fakehardwaretest PRIVATE SOLID_STATIC_DEFINE=1 TEST_DATA="${CMAKE_CURRENT_SOURCE_DIR}/../src/solid/devices/backends/fakehw/fakecomputer.xml")
0011 endif()
0012 
0013 ########### solidhwtest ###############
0014 
0015 if (BUILD_DEVICE_BACKEND_fakehw)
0016     ecm_add_test(solidhwtest.cpp LINK_LIBRARIES Qt6::Xml Qt6::Test ${LIBS} KF6Solid_static)
0017     target_compile_definitions(solidhwtest PRIVATE SOLID_STATIC_DEFINE=1 FAKE_COMPUTER_XML="${CMAKE_CURRENT_SOURCE_DIR}/../src/solid/devices/backends/fakehw/fakecomputer.xml")
0018     target_include_directories(solidhwtest PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src/solid/devices/backends/fakehw)
0019 endif()
0020 
0021 ########### solidmttest ###############
0022 
0023 ecm_add_test(solidmttest.cpp LINK_LIBRARIES Qt6::Xml Qt6::Test ${LIBS} KF6Solid_static Qt6::Concurrent)
0024 target_compile_definitions(solidmttest PRIVATE SOLID_STATIC_DEFINE=1)
0025 
0026 ########### solidmttest ###############
0027 if (WITH_NEW_SOLID_JOB)
0028     ecm_add_test(solidjobtest.cpp LINK_LIBRARIES Qt6::Test ${LIBS} KF6Solid_static)
0029 endif()
0030 
0031 ########### solidpowertest ###############
0032 if (WITH_NEW_SOLID_JOB AND WITH_NEW_POWER_ASYNC_API)
0033     ecm_add_test(solidpowertest.cpp LINK_LIBRARIES Qt6::Test ${LIBS} KF6Solid_static)
0034 endif()
0035 
0036 ########### solidpowertest ###############
0037 if(WITH_NEW_POWER_ASYNC_API AND WITH_NEW_POWER_ASYNC_FREEDESKTOP)
0038     ecm_add_test(
0039         solidfreedesktoptest.cpp
0040         fakeUpower.cpp
0041         fakelogind.cpp
0042         TEST_NAME "solidfreedesktopbackend"
0043         LINK_LIBRARIES Qt6::Test Qt6::DBus ${LIBS} KF6Solid_static
0044     )
0045 endif()
0046 
0047 ########### logindinhibitionargument ###########
0048 if(WITH_NEW_POWER_ASYNC_API AND WITH_NEW_POWER_ASYNC_FREEDESKTOP)
0049     ecm_add_test(
0050         logindinhibitionargumenttest.cpp
0051         ../src/solid/power/backends/freedesktop/logindinhibitionargument.cpp
0052         TEST_NAME "logindinhibitionargument"
0053         LINK_LIBRARIES Qt6::Test KF6Solid_static
0054     )
0055 endif()