summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_uiplugin_via_designer/CMakeLists.txt
blob: b8edeaa8e80c275caf84766429c9c0aa3eefb27e (plain)
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

# Backward compatibility test that code prior to Qt 5.5 linking to
# Qt5::Designer gets the required include directories for using
# the QDesignerCustomWidgetInterface.

cmake_minimum_required(VERSION 2.8.11)
project(test_uiplugin_via_designer)

find_package(Qt5Widgets REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Designer REQUIRED)

set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

if (NOT CMAKE_VERSION VERSION_LESS 3.0)
  set(CMAKE_HAS_INTERFACE 1)
else()
  set(CMAKE_HAS_INTERFACE 0)
endif()

add_definitions(-DTEST_UIPLUGIN_USAGE_REQUIREMENTS=${CMAKE_HAS_INTERFACE})

add_library(my_designer_plugin my_designer_plugin.cpp)
target_link_libraries(my_designer_plugin Qt5::Designer)