forked from linuxdeepin/qt5platform-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: change qmake to cmake (linuxdeepin#185)
* chore: change qmake to cmake change qmake project to cmake project Log: change qmake to cmake * chore(debian): add the kf5wayland-dev depend in control file To resolve the issue that Imported target "Deepin::WaylandClient" includes non-existent path /usr/include/KF5 in its INTERFACE_INCLUDE_DIRECTORIES. Log: add the kf5wayland-dev depend in control file --------- Co-authored-by: wangfei <[email protected]>
- Loading branch information
1 parent
fd191f4
commit 6acff43
Showing
23 changed files
with
404 additions
and
443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
cmake_minimum_required(VERSION 3.10) | ||
|
||
set(VERSION | ||
"5.6.8" | ||
CACHE STRING "define project version" | ||
) | ||
|
||
project(qt5platform-plugins | ||
VERSION ${VERSION} | ||
DESCRIPTION "DTK platform plugin module" | ||
HOMEPAGE_URL "https://github.com/linuxdeepin/qt5platform-plugins" | ||
LANGUAGES CXX C | ||
) | ||
|
||
include(GNUInstallDirs) | ||
include(CMakePackageConfigHelpers) | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(REQUIRED_QT_VERSION 5.15.0) | ||
|
||
add_subdirectory(xcb) | ||
add_subdirectory(wayland) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
list(APPEND GLOBAL_HEADERS | ||
${CMAKE_CURRENT_LIST_DIR}/dbackingstoreproxy.h | ||
${CMAKE_CURRENT_LIST_DIR}/dnativesettings.h | ||
${CMAKE_CURRENT_LIST_DIR}/dopenglpaintdevice.h | ||
${CMAKE_CURRENT_LIST_DIR}/dxcbxsettings.h | ||
${CMAKE_CURRENT_LIST_DIR}/global.h | ||
${CMAKE_CURRENT_LIST_DIR}/vtablehook.h | ||
${CMAKE_CURRENT_LIST_DIR}/dplatformsettings.h | ||
${CMAKE_CURRENT_LIST_DIR}/ddesktopinputselectioncontrol.h | ||
${CMAKE_CURRENT_LIST_DIR}/dinputselectionhandle.h | ||
${CMAKE_CURRENT_LIST_DIR}/dapplicationeventmonitor.h | ||
${CMAKE_CURRENT_LIST_DIR}/dselectedtexttooltip.h | ||
) | ||
list(APPEND GLOBAL_SOURCES | ||
${CMAKE_CURRENT_LIST_DIR}/dbackingstoreproxy.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/dnativesettings.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/dopenglpaintdevice.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/dxcbxsettings.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/global.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/vtablehook.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/dplatformsettings.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/ddesktopinputselectioncontrol.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/dinputselectionhandle.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/dapplicationeventmonitor.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/dselectedtexttooltip.cpp | ||
) | ||
|
||
include_directories(${CMAKE_CURRENT_LIST_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
add_subdirectory(dwayland) | ||
add_subdirectory(wayland-shell) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
project(dwayland) | ||
|
||
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui WaylandClient XkbCommonSupport) | ||
|
||
add_definitions(-DQT5DWAYLANDPLUGIN_LIBRARY -DQT_DEPRECATED_WARNINGS) | ||
|
||
file(GLOB GLOBAL_HEADERS | ||
${CMAKE_CURRENT_LIST_DIR}/*.h | ||
${CMAKE_SOURCE_DIR}/src/global.h | ||
${CMAKE_SOURCE_DIR}/src/vtablehook.h | ||
${CMAKE_SOURCE_DIR}/src/dxcbxsettings.h | ||
${CMAKE_SOURCE_DIR}/src/dplatformsettings.h | ||
${CMAKE_SOURCE_DIR}/src/dnativesettings.h | ||
) | ||
file(GLOB GLOBAL_SOURCES | ||
${CMAKE_CURRENT_LIST_DIR}/*.cpp | ||
${CMAKE_SOURCE_DIR}/src/global.cpp | ||
${CMAKE_SOURCE_DIR}/src/vtablehook.cpp | ||
${CMAKE_SOURCE_DIR}/src/dxcbxsettings.cpp | ||
${CMAKE_SOURCE_DIR}/src/dplatformsettings.cpp | ||
${CMAKE_SOURCE_DIR}/src/dnativesettings.cpp | ||
) | ||
|
||
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin/plugins/platforms) | ||
|
||
add_library(${PROJECT_NAME} MODULE main.cpp ${GLOBAL_SOURCES} ${GLOBAL_HEADERS}) | ||
|
||
target_compile_definitions(${PROJECT_NAME} | ||
PRIVATE | ||
QT5DWAYLANDPLUGIN_LIBRARY | ||
QT_DEPRECATED_WARNINGS | ||
) | ||
|
||
target_include_directories(${PROJECT_NAME} | ||
PRIVATE | ||
${CMAKE_SOURCE_DIR}/src | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
PRIVATE | ||
Qt5::Core | ||
Qt5::GuiPrivate | ||
Qt5::XkbCommonSupportPrivate | ||
Qt5::WaylandClientPrivate | ||
) | ||
|
||
if(NOT INSTALL_PATH) | ||
set(INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}/qt5/plugins/platforms) | ||
endif() | ||
install(TARGETS ${PROJECT_NAME} DESTINATION ${INSTALL_PATH}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
project(kwayland-shell) | ||
|
||
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui Widgets XkbCommonSupport WaylandClient) | ||
|
||
include(wayland-shell.cmake) | ||
|
||
try_compile(DEEPIN_KWIN_TEST_COMPILE_RESULT ${CMAKE_CURRENT_BINARY_DIR}/deepin-kwin-test | ||
${CMAKE_CURRENT_LIST_DIR}/config.tests/deepin-kwin-test deepin-kwin-test) | ||
|
||
try_compile(WAYLAND_TEST_COMPILE_RESULT ${CMAKE_CURRENT_BINARY_DIR}/wayland_test | ||
${CMAKE_CURRENT_LIST_DIR}/config.tests/wayland_test wayland_test) | ||
|
||
if(WAYLAND_TEST_COMPILE_RESULT) | ||
add_definitions(-DUSE_DEEPIN_WAYLAND) | ||
set(GLOBAL_HEADERS | ||
dwaylandshellmanager.h | ||
dkeyboard.h | ||
${CMAKE_SOURCE_DIR}/src/global.h | ||
${CMAKE_SOURCE_DIR}/src/vtablehook.h | ||
) | ||
set(GLOBAL_SOURCES | ||
dwaylandshellmanager.cpp | ||
dkeyboard.cpp | ||
${CMAKE_SOURCE_DIR}/src/global.cpp | ||
${CMAKE_SOURCE_DIR}/src/vtablehook.cpp | ||
) | ||
else() | ||
message(WARNING "QtWayland version incompatible") | ||
endif() | ||
|
||
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin/plugins/wayland-shell-integration) | ||
|
||
add_library(${PROJECT_NAME} MODULE main.cpp ${GLOBAL_SOURCES} ${GLOBAL_HEADERS}) | ||
|
||
target_compile_definitions(${PROJECT_NAME} | ||
PRIVATE | ||
QT5DWAYLANDPLUGIN_LIBRARY | ||
QT_DEPRECATED_WARNINGS | ||
) | ||
|
||
if(DEEPIN_KWIN_TEST_COMPILE_RESULT) | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE D_DEEPIN_KWIN) | ||
endif() | ||
|
||
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src) | ||
|
||
list(APPEND COMMON_LIBS | ||
Qt5::Core | ||
Qt5::Gui | ||
Qt5::GuiPrivate | ||
Qt5::Widgets | ||
Qt5::WidgetsPrivate | ||
Qt5::WaylandClient | ||
Qt5::WaylandClientPrivate | ||
Qt5::XkbCommonSupportPrivate | ||
) | ||
target_link_libraries(${PROJECT_NAME} ${COMMON_LIBS}) | ||
|
||
if(NOT INSTALL_PATH) | ||
set(INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}/qt5/plugins/wayland-shell-integration) | ||
endif() | ||
install(TARGETS ${PROJECT_NAME} DESTINATION ${INSTALL_PATH}) |
29 changes: 29 additions & 0 deletions
29
wayland/wayland-shell/config.tests/deepin-kwin-test/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(deepin-kwin-test) | ||
|
||
set(REQUIRED_QT_VERSION 5.15.0) | ||
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS WaylandClient) | ||
|
||
include(../../wayland-shell.cmake) | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(AUTOMOC_COMPILER_PREDEFINES ON) | ||
|
||
add_executable(${PROJECT_NAME} main.cpp) | ||
|
||
list(APPEND COMMON_LIBS | ||
Qt5::WaylandClientPrivate | ||
) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC ${COMMON_LIBS}) | ||
|
||
target_include_directories(${PROJECT_NAME} PUBLIC | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
${CMAKE_SOURCE_DIR} | ||
) |
3 changes: 0 additions & 3 deletions
3
wayland/wayland-shell/config.tests/deepin-kwin-test/deepin-kwin-test.pro
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
wayland/wayland-shell/config.tests/wayland_test/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(wayland_test) | ||
|
||
set(REQUIRED_QT_VERSION 5.15.0) | ||
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui WaylandClient XkbCommonSupport) | ||
|
||
include(../../wayland-shell.cmake) | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(AUTOMOC_COMPILER_PREDEFINES ON) | ||
|
||
add_executable(${PROJECT_NAME} main.cpp) | ||
|
||
list(APPEND COMMON_LIBS | ||
Qt5::Core | ||
Qt5::CorePrivate | ||
Qt5::GuiPrivate | ||
Qt5::WaylandClientPrivate | ||
Qt5::XkbCommonSupportPrivate | ||
) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC ${COMMON_LIBS}) | ||
|
||
target_include_directories(${PROJECT_NAME} PUBLIC | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
${CMAKE_SOURCE_DIR} | ||
) |
Oops, something went wrong.