kauth: fix use for cross compilation

This commit is contained in:
Piotr Wójcik 2018-07-16 17:08:11 +02:00 committed by maxice8
parent dbd723f914
commit 9e97ee3698
2 changed files with 12 additions and 18 deletions

View File

@ -1,21 +1,15 @@
--- KF5AuthConfig.cmake.in.ORIG
diff --git KF5AuthConfig.cmake.in KF5AuthConfig.cmake.in
index 0895e60..59fe53b 100644
--- KF5AuthConfig.cmake.in
+++ KF5AuthConfig.cmake.in
@@ -21,4 +21,8 @@
@@ -17,8 +17,8 @@ include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthMacros.cmake")
if(NOT "${KAUTH_BACKEND_NAME}" STREQUAL "FAKE")
if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING)
- find_file(TARGETSFILE KF5Auth/KF5AuthToolsTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
- include("${TARGETSFILE}")
+ find_file(TARGETSFILE_AUTH KF5Auth/KF5AuthToolsTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
+ include("${TARGETSFILE_AUTH}")
else()
include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthToolsTargets.cmake")
endif()
+ if(CMAKE_CROSSCOMPILING)
+ set_target_properties(KF5::kauth-policy-gen PROPERTIES IMPORTED_LOCATION_NONE /usr/lib/libexec/kauth/kauth-policy-gen)
+ set_target_properties(KF5::kauth-policy-gen PROPERTIES IMPORTED_LOCATION /usr/lib/libexec/kauth/kauth-policy-gen)
+ endif()
endif()
--- cmake/KF5AuthMacros.cmake.ORIG
+++ cmake/KF5AuthMacros.cmake
@@ -65,0 +66,4 @@
+ set(KAUTH_POLICY_GEN_LOCATION KF5::kauth-policy-gen)
+ if(CMAKE_CROSSCOMPILING)
+ get_target_property(KAUTH_POLICY_GEN_LOCATION KF5::kauth-policy-gen LOCATION)
+ endif()
@@ -67 +71 @@
- COMMAND KF5::kauth-policy-gen ${_input} ${_output}
+ COMMAND ${KAUTH_POLICY_GEN_LOCATION} ${_input} ${_output}

View File

@ -1,7 +1,7 @@
# Template file for 'kauth'
pkgname=kauth
version=5.47.0
revision=1
revision=2
build_style=cmake
hostmakedepends="extra-cmake-modules pkg-config"
makedepends="kcoreaddons-devel polkit-qt5-devel"