Update kwayland build rules for newer version
This commit is contained in:
		
							parent
							
								
									96d9bcd5ff
								
							
						
					
					
						commit
						6f391285c4
					
				
					 2 changed files with 2 additions and 106 deletions
				
			
		
							
								
								
									
										9
									
								
								external/kwayland/CMakeLists.txt
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								external/kwayland/CMakeLists.txt
									
										
									
									
										vendored
									
									
								
							|  | @ -76,11 +76,6 @@ ExternalProject_Add_StepDependencies(plasma-wayland-protocols configure extra-cm | |||
| ExternalProject_Get_property(plasma-wayland-protocols BINARY_DIR) | ||||
| set(plasma_wayland_protocols_binary_dir ${BINARY_DIR}) | ||||
| 
 | ||||
| set(kwayland_patch_command) | ||||
| if (DESKTOP_APP_QT6) | ||||
|     set(kwayland_patch_command PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/kwayland-qt6.patch) | ||||
| endif() | ||||
| 
 | ||||
| ExternalProject_Add(kwayland | ||||
|     URL ${third_party_loc}/kwayland | ||||
|     CMAKE_GENERATOR Ninja | ||||
|  | @ -88,11 +83,11 @@ ExternalProject_Add(kwayland | |||
|         -DCMAKE_BUILD_TYPE=Release | ||||
|         -DBUILD_SHARED_LIBS=OFF | ||||
|         -DBUILD_TESTING=OFF | ||||
|         -DBUILD_WITH_QT6=${DESKTOP_APP_QT6} | ||||
|         -DEXCLUDE_DEPRECATED_BEFORE_AND_AT=5.91.0 | ||||
|         -DCMAKE_PREFIX_PATH=${wayland_protocols_binary_dir} | ||||
|         -DECM_DIR=${extra_cmake_modules_binary_dir}/share/ECM/cmake | ||||
|         -DPlasmaWaylandProtocols_DIR=${plasma_wayland_protocols_binary_dir}/lib/cmake/PlasmaWaylandProtocols | ||||
|     ${kwayland_patch_command} | ||||
|     BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target KF5WaylandClient | ||||
|     STEP_TARGETS build | ||||
|     EXCLUDE_FROM_ALL TRUE | ||||
|     BUILD_BYPRODUCTS <BINARY_DIR>/lib/libKF5WaylandClient.a | ||||
|  |  | |||
							
								
								
									
										99
									
								
								external/kwayland/kwayland-qt6.patch
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										99
									
								
								external/kwayland/kwayland-qt6.patch
									
										
									
									
										vendored
									
									
								
							|  | @ -1,99 +0,0 @@ | |||
| diff --git a/CMakeLists.txt b/CMakeLists.txt
 | ||||
| index b478cde..5f19170 100644
 | ||||
| --- a/CMakeLists.txt
 | ||||
| +++ b/CMakeLists.txt
 | ||||
| @@ -31,10 +31,8 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KWAYLAND
 | ||||
|   | ||||
|  # Dependencies | ||||
|  set(REQUIRED_QT_VERSION 5.15.2) | ||||
| -find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Private)
 | ||||
| -find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Concurrent WaylandClient)
 | ||||
| -
 | ||||
| -find_package(QtWaylandScanner REQUIRED)
 | ||||
| +find_package(Qt6Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Private)
 | ||||
| +find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Concurrent WaylandClient)
 | ||||
|   | ||||
|  find_package(Wayland 1.15 COMPONENTS Client Server) | ||||
|  set_package_properties(Wayland PROPERTIES | ||||
| @@ -69,14 +67,8 @@ add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02)
 | ||||
|  # Subdirectories | ||||
|  ecm_install_po_files_as_qm(po) | ||||
|   | ||||
| -find_package(QtWaylandScanner REQUIRED)
 | ||||
|  add_subdirectory(src) | ||||
|   | ||||
| -if (BUILD_TESTING)
 | ||||
| -    add_subdirectory(autotests)
 | ||||
| -    add_subdirectory(tests)
 | ||||
| -endif()
 | ||||
| -
 | ||||
|  # create a Config.cmake and a ConfigVersion.cmake file and install them | ||||
|  set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Wayland") | ||||
|   | ||||
| diff --git a/KF5WaylandConfig.cmake.in b/KF5WaylandConfig.cmake.in
 | ||||
| index ef20432..1294d3e 100644
 | ||||
| --- a/KF5WaylandConfig.cmake.in
 | ||||
| +++ b/KF5WaylandConfig.cmake.in
 | ||||
| @@ -1,7 +1,7 @@
 | ||||
|  @PACKAGE_INIT@ | ||||
|   | ||||
|  include(CMakeFindDependencyMacro) | ||||
| -find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
 | ||||
| +find_dependency(Qt6Gui @REQUIRED_QT_VERSION@)
 | ||||
|   | ||||
|  include("${CMAKE_CURRENT_LIST_DIR}/KF5WaylandTargets.cmake") | ||||
|  @PACKAGE_INCLUDE_QCHTARGETS@ | ||||
| diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
 | ||||
| index c8a307c..e6497c8 100644
 | ||||
| --- a/src/CMakeLists.txt
 | ||||
| +++ b/src/CMakeLists.txt
 | ||||
| @@ -1,6 +1,4 @@
 | ||||
|  add_subdirectory(client) | ||||
| -add_subdirectory(server)
 | ||||
| -add_subdirectory(tools)
 | ||||
|   | ||||
|  ecm_qt_install_logging_categories( | ||||
|      EXPORT KWAYLAND | ||||
| @@ -36,7 +34,7 @@ if(BUILD_QCH)
 | ||||
|              ${KWaylandServer_APIDOX_SRCS} | ||||
|          MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" | ||||
|          LINK_QCHS | ||||
| -            Qt5Gui_QCH
 | ||||
| +            Qt6Gui_QCH
 | ||||
|          INCLUDE_DIRS | ||||
|              ${KWaylandClient_APIDOX_BUILD_INCLUDE_DIRS} | ||||
|              ${KWaylandServer_APIDOX_BUILD_INCLUDE_DIRS} | ||||
| diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt
 | ||||
| index b7ec33a..efb390a 100644
 | ||||
| --- a/src/client/CMakeLists.txt
 | ||||
| +++ b/src/client/CMakeLists.txt
 | ||||
| @@ -3,7 +3,7 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII)
 | ||||
|  remove_definitions(-DQT_NO_CAST_TO_ASCII) | ||||
|   | ||||
|  # needed to access QPA | ||||
| -include_directories(SYSTEM ${Qt5Gui_PRIVATE_INCLUDE_DIRS})
 | ||||
| +include_directories(SYSTEM ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
 | ||||
|   | ||||
|  set(CLIENT_LIB_SRCS | ||||
|      appmenu.cpp | ||||
| @@ -256,10 +256,17 @@ ecm_generate_export_header(KF5WaylandClient
 | ||||
|   | ||||
|  target_include_directories(KF5WaylandClient INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KWayland/Client>") | ||||
|   | ||||
| +target_include_directories(KF5WaylandClient
 | ||||
| +    PRIVATE ${Wayland_Client_INCLUDE_DIR}
 | ||||
| +        ${Qt6Concurrent_INCLUDE_DIRS}
 | ||||
| +)
 | ||||
| +
 | ||||
| +get_target_property(Qt6Concurrent_LIBRARIES Qt6::Concurrent IMPORTED_LOCATION)
 | ||||
| +
 | ||||
|  target_link_libraries(KF5WaylandClient | ||||
| -    PUBLIC Qt5::Gui
 | ||||
| -    PRIVATE Wayland::Client
 | ||||
| -        Qt5::Concurrent
 | ||||
| +    PUBLIC Qt6::Gui
 | ||||
| +    PRIVATE ${Wayland_Client_LIBRARY}
 | ||||
| +        ${Qt6Concurrent_LIBRARIES}
 | ||||
|  ) | ||||
|   | ||||
|  set_target_properties(KF5WaylandClient PROPERTIES VERSION   ${KWAYLAND_VERSION} | ||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ilya Fedin
						Ilya Fedin