File: CMakeLists.txt

package info (click to toggle)
kf6-frameworkintegration 6.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: cpp: 826; sh: 13; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 897 bytes parent folder | download
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
include(ECMMarkAsTest)
include(ECMMarkNonGuiExecutable)
include(ECMAddTests)

find_package(Qt6Test ${REQUIRED_QT_VERSION} CONFIG QUIET)

if(NOT TARGET Qt6::Test)
    message(STATUS "Qt6Test not found, autotests will not be built.")
    return()
endif()

set(CONFIGFILE "${CMAKE_CURRENT_SOURCE_DIR}/kdeplatformtheme_kdeglobals")
configure_file(kdeplatformtheme_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeplatformtheme_config.h)

remove_definitions(-DQT_NO_CAST_FROM_ASCII)

macro(FRAMEWORKINTEGRATION_TESTS _testname)
    ecm_add_test(${_testname}.cpp ${ARGN}
                 LINK_LIBRARIES Qt6::Test KF6::ConfigCore KF6::IconThemes KF6::Style KF6::Notifications
                 TEST_NAME ${_testname}
                 NAME_PREFIX "frameworkintegration-")
    set_target_properties(${_testname} PROPERTIES COMPILE_FLAGS "-DUNIT_TEST")
endmacro()

frameworkintegration_tests(
  kstyle_unittest
)