-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (39 loc) · 1.48 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.16)
project(qmlcutiewlcplugin VERSION 1.0 LANGUAGES C CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui WaylandClient Quick)
pkg_check_modules(CUTIEWLC cutiewlc REQUIRED IMPORTED_TARGET)
pkg_check_modules(FOREIGN_TP_MGMT qt6-foreign-toplevel-management REQUIRED IMPORTED_TARGET)
pkg_check_modules(OUTPUT_PWR_MGMT qt6-output-power-management REQUIRED IMPORTED_TARGET)
pkg_check_modules(SCREENCOPY qt6-screencopy REQUIRED IMPORTED_TARGET)
qt_standard_project_setup()
set(plugin_SOURCES
src/plugin.cpp src/plugin.h
src/cutieappthumbnail.cpp src/cutieappthumbnail.h)
qt6_add_library(qmlcutiewlcplugin
SHARED
${plugin_SOURCES}
)
target_include_directories(qmlcutiewlcplugin PUBLIC
src
)
target_link_libraries(qmlcutiewlcplugin PUBLIC
Qt::Core
Qt::Gui
Qt::WaylandClient
Qt::Quick
PkgConfig::CUTIEWLC
PkgConfig::FOREIGN_TP_MGMT
PkgConfig::OUTPUT_PWR_MGMT
PkgConfig::SCREENCOPY
)
install(TARGETS qmlcutiewlcplugin
RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/qml/Cutie/Wlc"
BUNDLE DESTINATION "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/qml/Cutie/Wlc"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/qml/Cutie/Wlc"
)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/qmldir
DESTINATION "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/qml/Cutie/Wlc")