Warning, /frameworks/solid/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 include(ECMAddTests) 0002 0003 find_package(Qt${QT_MAJOR_VERSION} ${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 KF5Solid_static Qt${QT_MAJOR_VERSION}::Xml Qt${QT_MAJOR_VERSION}::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 Qt${QT_MAJOR_VERSION}::Xml Qt${QT_MAJOR_VERSION}::Test ${LIBS} KF5Solid_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 Qt${QT_MAJOR_VERSION}::Xml Qt${QT_MAJOR_VERSION}::Test ${LIBS} KF5Solid_static Qt${QT_MAJOR_VERSION}::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 Qt${QT_MAJOR_VERSION}::Test ${LIBS} KF5Solid_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 Qt${QT_MAJOR_VERSION}::Test ${LIBS} KF5Solid_static) 0034 endif() 0035 0036 ########### solidpowertest ############### 0037 if(WITH_NEW_POWER_ASYNC_API AND WITH_NEW_POWER_ASYNC_FREEDESKTOP) 0038 set(solidFreedesktopTest_SRCS solidfreedesktoptest.cpp fakeUpower.cpp fakelogind.cpp) 0039 ecm_add_test(${solidFreedesktopTest_SRCS} TEST_NAME "solidfreedesktopbackend" LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::DBus ${LIBS} KF5Solid_static) 0040 endif() 0041 0042 ########### logindinhibitionargument ########### 0043 if(WITH_NEW_POWER_ASYNC_API AND WITH_NEW_POWER_ASYNC_FREEDESKTOP) 0044 set(solidLogindInhibitionArgument_SRCS 0045 logindinhibitionargumenttest.cpp 0046 ../src/solid/power/backends/freedesktop/logindinhibitionargument.cpp 0047 ) 0048 ecm_add_test(${solidLogindInhibitionArgument_SRCS} TEST_NAME "logindinhibitionargument" LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5Solid_static) 0049 endif()