kauth: add cross-compilation workaround to KAUTH_INSTALL_ACTIONS
This commit is contained in:
parent
30d37b3102
commit
6c6f103b79
@ -13,3 +13,33 @@ index 0895e60..59fe53b 100644
|
|||||||
else()
|
else()
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthToolsTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthToolsTargets.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
--- cmake/KF5AuthMacros.cmake 2018-08-26 14:57:02.703186769 +0200
|
||||||
|
+++ cmake/KF5AuthMacros.cmake 2018-08-26 14:58:26.469054620 +0200
|
||||||
|
@@ -63,12 +63,21 @@
|
||||||
|
set(_output ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.policy)
|
||||||
|
get_filename_component(_input ${ACTIONS_FILE} ABSOLUTE)
|
||||||
|
|
||||||
|
- add_custom_command(OUTPUT ${_output}
|
||||||
|
- COMMAND KF5::kauth-policy-gen ${_input} ${_output}
|
||||||
|
- MAIN_DEPENDENCY ${_input}
|
||||||
|
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
- COMMENT "Generating ${HELPER_ID}.policy"
|
||||||
|
- DEPENDS KF5::kauth-policy-gen)
|
||||||
|
+ if(CMAKE_CROSSCOMPILING)
|
||||||
|
+ add_custom_command(OUTPUT ${_output}
|
||||||
|
+ COMMAND "/usr/lib/libexec/kauth/kauth-policy-gen" ${_input} ${_output}
|
||||||
|
+ MAIN_DEPENDENCY ${_input}
|
||||||
|
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
+ COMMENT "Generating ${HELPER_ID}.policy"
|
||||||
|
+ DEPENDS KF5::kauth-policy-gen)
|
||||||
|
+ else()
|
||||||
|
+ add_custom_command(OUTPUT ${_output}
|
||||||
|
+ COMMAND KF5::kauth-policy-gen ${_input} ${_output}
|
||||||
|
+ MAIN_DEPENDENCY ${_input}
|
||||||
|
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
+ COMMENT "Generating ${HELPER_ID}.policy"
|
||||||
|
+ DEPENDS KF5::kauth-policy-gen)
|
||||||
|
+ endif()
|
||||||
|
add_custom_target(${HELPER_ID}.policy-customtarget ALL COMMENT "actions for ${HELPER_ID}" DEPENDS ${_output})
|
||||||
|
|
||||||
|
install(FILES ${_output} DESTINATION ${KAUTH_POLICY_FILES_INSTALL_DIR})
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Template file for 'kauth'
|
# Template file for 'kauth'
|
||||||
pkgname=kauth
|
pkgname=kauth
|
||||||
version=5.49.0
|
version=5.49.0
|
||||||
revision=1
|
revision=2
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
hostmakedepends="extra-cmake-modules pkg-config"
|
hostmakedepends="extra-cmake-modules pkg-config"
|
||||||
makedepends="kcoreaddons-devel polkit-qt5-devel"
|
makedepends="kcoreaddons-devel polkit-qt5-devel"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user