File: CMakeLists.txt

package info (click to toggle)
qttools-opensource-src 5.15.17-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 58,636 kB
  • sloc: cpp: 204,308; xml: 3,621; ansic: 265; javascript: 120; perl: 118; makefile: 64; java: 32
file content (25 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (6)
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)