File: CMakeLists.txt

package info (click to toggle)
kwindowsystem 5.116.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,624 kB
  • sloc: cpp: 21,787; makefile: 7; sh: 1
file content (32 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
remove_definitions(-DQT_NO_CAST_FROM_ASCII)
remove_definitions(-DQT_NO_CAST_TO_ASCII)

include(ECMMarkAsTest)

find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test Widgets)

macro(kwindowsystem_executable_tests)
  foreach(_testname ${ARGN})
    add_executable(${_testname} ${_testname}.cpp)
    target_link_libraries(${_testname} Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Widgets KF5::WindowSystem)
    ecm_mark_as_test(${_testname})
  endforeach(_testname)
endmacro()

kwindowsystem_executable_tests(
  blurbehindtest
  backgroundcontrasttest
)

if(KWINDOWSYSTEM_HAVE_X11)
    kwindowsystem_executable_tests(
      icontest
      createpixmapfromhandletest
      setmainwindowtest
    )
    if (TARGET Qt5::X11Extras)
        target_link_libraries(icontest Qt5::X11Extras)
    elseif (TARGET Qt6::Gui)
        target_link_libraries(icontest Qt6::GuiPrivate)
    endif()
endif()