void-packages/srcpkgs/kdesignerplugin/patches/kdesignerplugin-on-crossbui...

21 lines
769 B
Diff

On cross-build, use the host's binary.
Apply to both cross-build kdesignerplugin's package and use its package from others.
--- a/KF5DesignerPluginMacros.cmake
+++ b/KF5DesignerPluginMacros.cmake
@@ -51,9 +51,14 @@
get_filename_component(basename ${input} NAME_WE)
set(source ${CMAKE_CURRENT_BINARY_DIR}/${basename}widgets.cpp)
+ set(KGENDESIGNERPLUGIN_LOCATION KF5::kgendesignerplugin)
+ if(CMAKE_CROSSCOMPILING)
+ set(KGENDESIGNERPLUGIN_LOCATION /usr/bin/kgendesignerplugin)
+ endif()
+
# create source file from the .widgets file
add_custom_command(OUTPUT ${source}
- COMMAND KF5::kgendesignerplugin
+ COMMAND ${KGENDESIGNERPLUGIN_LOCATION}
ARGS -o ${source} ${input}
MAIN_DEPENDENCY ${input})