Files
gentoo-zh/dev-libs/qnodeeditor/files/qnodeeditor-2.1.7_p20210113-qt6.patch
T

57 lines
1.4 KiB
Diff

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,12 +35,12 @@
#add_subdirectory(external)
# Find the QtWidgets library
-find_package(Qt5 5.3 COMPONENTS
+find_package(Qt6 6.0 COMPONENTS
Core
Widgets
Gui)
-qt5_add_resources(RESOURCES ./resources/resources.qrc)
+qt_add_resources(RESOURCES ./resources/resources.qrc)
# Unfortunately, as we have a split include/src, AUTOMOC doesn't work.
# We'll have to manually specify some files
@@ -93,14 +93,14 @@
target_link_libraries(nodes
PUBLIC
- Qt5::Core
- Qt5::Widgets
- Qt5::Gui
+ Qt6::Core
+ Qt6::Widgets
+ Qt6::Gui
)
target_compile_definitions(nodes
PUBLIC
- ${Qt5Widgets_DEFINITIONS}
+ ${QtWidgets_DEFINITIONS}
NODE_EDITOR_SHARED
PRIVATE
NODE_EDITOR_EXPORTS
@@ -133,7 +133,7 @@
file(GLOB_RECURSE HEADERS_TO_MOC include/nodes/internal/*.hpp)
-qt5_wrap_cpp(nodes_moc
+qt_wrap_cpp(nodes_moc
${HEADERS_TO_MOC}
TARGET nodes
OPTIONS --no-notes # Don't display a note for the headers which don't produce a moc_*.cpp
--- a/cmake/NodeEditorConfig.cmake.in
+++ b/cmake/NodeEditorConfig.cmake.in
@@ -4,7 +4,7 @@
# NOTE Had to use find_package because find_dependency does not support COMPONENTS or MODULE until 3.8.0
-find_package(Qt5 REQUIRED COMPONENTS
+find_package(Qt6 REQUIRED COMPONENTS
Core
Widgets
Gui