Warning, /graphics/okular/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) 0002 0003 include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) 0004 0005 macro(add_conf_unittest _source) 0006 set(_test ${_source} ../part/editdrawingtooldialog.cpp) 0007 get_filename_component(_name ${_source} NAME_WE) 0008 add_executable( ${_name} ${_test} ) 0009 add_test( NAME ${_name} COMMAND ${_name} ) 0010 ecm_mark_as_test(${_name}) 0011 target_link_libraries( ${_name} 0012 Qt6::Test 0013 Qt6::Widgets 0014 Qt6::Xml 0015 KF6::I18n 0016 KF6::Completion 0017 KF6::WidgetsAddons 0018 ) 0019 endmacro () 0020 0021 add_conf_unittest(editdrawingtooldialogtest.cpp) 0022 0023 ecm_add_test(shelltest.cpp ../shell/shellutils.cpp 0024 TEST_NAME "shelltest" 0025 LINK_LIBRARIES Qt6::Test okularcore 0026 ) 0027 0028 if(Poppler_Qt6_FOUND) 0029 if (BUILD_DESKTOP) 0030 ecm_add_test(parttest.cpp closedialoghelper.cpp 0031 TEST_NAME "parttest" 0032 LINK_LIBRARIES Qt6::Widgets Qt6::Test Qt6::Xml okularcore okularpart 0033 ) 0034 endif() 0035 0036 ecm_add_test(visibilitytest.cpp 0037 TEST_NAME "visibilitytest" 0038 LINK_LIBRARIES Qt6::Widgets Qt6::Test okularcore 0039 ) 0040 0041 ecm_add_test(jsfunctionstest.cpp 0042 TEST_NAME "jsfunctionstest" 0043 LINK_LIBRARIES Qt6::Widgets Qt6::Test okularcore 0044 ) 0045 0046 ecm_add_test(formattest.cpp 0047 TEST_NAME "formattest" 0048 LINK_LIBRARIES Qt6::Widgets Qt6::Test okularcore 0049 ) 0050 0051 ecm_add_test(keystroketest.cpp 0052 TEST_NAME "keystroketest" 0053 LINK_LIBRARIES Qt6::Widgets Qt6::Test okularcore 0054 ) 0055 0056 ecm_add_test(signunsignedfieldtest.cpp 0057 TEST_NAME "signunsignedfieldtest" 0058 LINK_LIBRARIES Qt6::Widgets Qt6::Test okularcore 0059 ) 0060 endif() 0061 0062 ecm_add_test(suggestedfilenametest.cpp 0063 TEST_NAME "suggestedfilenametest" 0064 LINK_LIBRARIES Qt6::Test okularcore KF6::I18n 0065 ) 0066 0067 ecm_add_test(documenttest.cpp 0068 TEST_NAME "documenttest" 0069 LINK_LIBRARIES Qt6::Widgets Qt6::Test Qt6::Xml okularcore KF6::ThreadWeaver 0070 ) 0071 0072 ecm_add_test(searchtest.cpp 0073 TEST_NAME "searchtest" 0074 LINK_LIBRARIES Qt6::Widgets Qt6::Test Qt6::Xml okularcore 0075 ) 0076 0077 ecm_add_test(annotationstest.cpp 0078 TEST_NAME "annotationstest" 0079 LINK_LIBRARIES Qt6::Widgets Qt6::Test Qt6::Xml okularcore 0080 ) 0081 0082 ecm_add_test(urldetecttest.cpp 0083 TEST_NAME "urldetecttest" 0084 LINK_LIBRARIES Qt6::Widgets Qt6::Test Qt6::Xml KF6::CoreAddons 0085 ) 0086 0087 ecm_add_test(editannotationcontentstest.cpp testingutils.cpp 0088 TEST_NAME "editannotationcontentstest" 0089 LINK_LIBRARIES Qt6::Widgets Qt6::Test Qt6::Xml okularcore 0090 ) 0091 0092 ecm_add_test(addremoveannotationtest.cpp testingutils.cpp 0093 TEST_NAME "addremoveannotationtest" 0094 LINK_LIBRARIES Qt6::Widgets Qt6::Test Qt6::Xml okularcore 0095 ) 0096 0097 ecm_add_test(translateannotationtest.cpp testingutils.cpp 0098 TEST_NAME "translateannotationtest" 0099 LINK_LIBRARIES Qt6::Widgets Qt6::Test Qt6::Xml okularcore 0100 ) 0101 0102 ecm_add_test(modifyannotationpropertiestest.cpp testingutils.cpp 0103 TEST_NAME "modifyannotationpropertiestest" 0104 LINK_LIBRARIES Qt6::Widgets Qt6::Test okularcore 0105 ) 0106 0107 ecm_add_test(editformstest.cpp 0108 TEST_NAME "editformstest" 0109 LINK_LIBRARIES Qt6::Widgets Qt6::Test okularcore 0110 ) 0111 0112 ecm_add_test(calculatetexttest.cpp 0113 TEST_NAME "calculatetexttest" 0114 LINK_LIBRARIES Qt6::Widgets Qt6::Test okularcore 0115 ) 0116 0117 ecm_add_test(check_distinguished_name_parser.cpp 0118 TEST_NAME "distinguishednameparser" 0119 LINK_LIBRARIES Qt6::Test) 0120 0121 if(PlasmaActivities_FOUND AND BUILD_DESKTOP) 0122 ecm_add_test(mainshelltest.cpp ../shell/okular_main.cpp ../shell/shellutils.cpp ../shell/shell.cpp ../shell/welcomescreen.cpp ../shell/recentitemsmodel.cpp closedialoghelper.cpp 0123 TEST_NAME "mainshelltest" 0124 LINK_LIBRARIES Qt6::Test Plasma::Activities okularpart okularcore 0125 ) 0126 target_compile_definitions(mainshelltest PRIVATE OKULAR_BINARY="$<TARGET_FILE:okular>") 0127 0128 if (HAVE_X11) 0129 target_link_libraries(mainshelltest Qt6::GuiPrivate) 0130 endif() 0131 endif() 0132 0133 if(BUILD_DESKTOP) 0134 ecm_add_test(annotationtoolbartest.cpp ../shell/okular_main.cpp ../shell/shellutils.cpp ../shell/shell.cpp ../shell/welcomescreen.cpp ../shell/recentitemsmodel.cpp closedialoghelper.cpp ../shell/welcomescreen.ui 0135 TEST_NAME "annotationtoolbartest" 0136 LINK_LIBRARIES Qt6::Test okularpart 0137 ) 0138 0139 if (HAVE_X11) 0140 target_link_libraries(annotationtoolbartest Qt6::GuiPrivate) 0141 endif() 0142 endif() 0143 0144 ecm_add_test(generatorstest.cpp 0145 TEST_NAME "generatorstest" 0146 LINK_LIBRARIES Qt6::Test KF6::CoreAddons okularcore 0147 ) 0148 target_compile_definitions(generatorstest PRIVATE GENERATORS_BUILD_DIR="${CMAKE_BINARY_DIR}/generators") 0149 0150 ecm_add_test(signatureformtest.cpp 0151 TEST_NAME "signatureformtest" 0152 LINK_LIBRARIES Qt6::Test okularcore 0153 ) 0154 0155 find_package(Discount) 0156 0157 if(Discount_FOUND) 0158 ecm_add_test(markdowntest.cpp ../generators/markdown/converter.cpp 0159 TEST_NAME "markdowntest" 0160 LINK_LIBRARIES Qt6::Test okularcore KF6::I18n PkgConfig::Discount 0161 ) 0162 endif() 0163 0164 ecm_add_test(toggleactionmenutest.cpp ../part/toggleactionmenu.cpp 0165 TEST_NAME "toggleactionmenutest" 0166 LINK_LIBRARIES Qt6::Test KF6::WidgetsAddons 0167 )