File: CMakeLists.txt

package info (click to toggle)
wacomtablet 3.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 4,952 kB
  • sloc: cpp: 15,275; xml: 189; makefile: 8; sh: 5
file content (78 lines) | stat: -rw-r--r-- 2,749 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
cmake_minimum_required(VERSION 3.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

cmake_policy(SET CMP0048 NEW)
project(wacomtablet VERSION "3.1.1")

set(QT_MIN_VERSION "5.7.0")
find_package(ECM 1.6.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake/modules)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(FeatureSummary)
include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMQtDeclareLoggingCategory)

ecm_setup_version(${PROJECT_VERSION}
    VARIABLE_PREFIX WACOMTABLET
    VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/wacomtablet-version.h"
)

find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets DBus X11Extras Qml)
find_package(KF5 REQUIRED COMPONENTS CoreAddons I18n GlobalAccel Config XmlGui WidgetsAddons WindowSystem Notifications DBusAddons Plasma DocTools)
find_package(XCB OPTIONAL_COMPONENTS XINPUT)
find_package(X11 REQUIRED COMPONENTS XLIB)
find_package(XorgWacom REQUIRED)
find_package(LibWacom REQUIRED)

# xcb-xinput is an experimental API and is not built by default in the xcb
# repository. Downstream distributions without xcb-xinput, such as Kubuntu, can
# build using the Xlib version of the library instead.
#
# Because Qt5 uses xcb exclusively for native event handling, kded is unable
# to monitor hotplugging events, since these are signaled as xinput events.
#
# Users can enable xcb-xinput by building xcb with the configuration flag --enable-xinput.
if(XCB_XINPUT_FOUND)
    message(STATUS "Using XCB_XINPUT.  Please note this is an unstable API.")
    set(USING_X_LIBRARIES XCB::XINPUT ${X11_Xinput_LIB})
    add_definitions(-DHAVE_XCB_XINPUT)
else()
    message(STATUS "Falling back to X11_XINPUT.")
    set(USING_X_LIBRARIES ${X11_LIBRARIES} ${X11_Xinput_LIB})
endif()

if(${LIBWACOM_VERSION} VERSION_LESS "0.29")
    message(STATUS "Button detection with libwacom requires version at least 0.29. Detected version is: " ${LIBWACOM_VERSION})
    add_definitions(-DLIBWACOM_EVDEV_MISSING)
endif()

add_definitions( -DQT_STRICT_ITERATORS )
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
add_definitions( -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS )

add_subdirectory( src )
add_subdirectory( data )
add_subdirectory( images )
add_subdirectory( doc )

### Tests
if(BUILD_TESTING)
  find_package(Qt5Test ${QT_MIN_VERSION} CONFIG REQUIRED)
  add_subdirectory( autotests )
endif()


feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

find_package(KF5I18n CONFIG REQUIRED)
ki18n_install(po)

  find_package(KF5DocTools CONFIG)
  if(KF5DocTools_FOUND)
    kdoctools_install(po)
  endif()