Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Guillaume_G:WSL
mingw64-kconfig
0002-Add-cross-compile-support-for-kconfig_comp...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Add-cross-compile-support-for-kconfig_compiler-and-k.patch of Package mingw64-kconfig
From ea2c2d0b016081ffa27b20bebb45cc2376a1472b Mon Sep 17 00:00:00 2001 From: Ralf Habacker <ralf.habacker@freenet.de> Date: Fri, 8 Jul 2022 10:15:40 +0200 Subject: [PATCH 2/5] Add cross compile support for kconfig_compiler and kconf_update When cross compiling, use KCONFIG_COMPILER_EXECUTABLE and KCONF_UPDATE_EXECUTABLE if set, as host provided native tools. --- KF5ConfigConfig.cmake.in | 6 ++++++ src/kconf_update/CMakeLists.txt | 8 +++++++- src/kconfig_compiler/CMakeLists.txt | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/KF5ConfigConfig.cmake.in b/KF5ConfigConfig.cmake.in index d24ae2b..1d240f7 100644 --- a/KF5ConfigConfig.cmake.in +++ b/KF5ConfigConfig.cmake.in @@ -20,5 +20,11 @@ if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING) include("${KCONFIGCOMPILER_PATH}") else() include("${CMAKE_CURRENT_LIST_DIR}/KF5ConfigCompilerTargets.cmake") + if(CMAKE_CROSSCOMPILING AND KCONFIG_COMPILER_EXECUTABLE) + set_target_properties(KF5::kconfig_compiler PROPERTIES IMPORTED_LOCATION_NONE ${KCONFIG_COMPILER_EXECUTABLE}) + endif() + if(CMAKE_CROSSCOMPILING AND KCONF_UPDATE_EXECUTABLE) + set_target_properties(KF5::kconf_update PROPERTIES IMPORTED_LOCATION_NONE ${KCONF_UPDATE_EXECUTABLE}) + endif() endif() include("${CMAKE_CURRENT_LIST_DIR}/KF5ConfigMacros.cmake") diff --git a/src/kconf_update/CMakeLists.txt b/src/kconf_update/CMakeLists.txt index 4a551f5..ed40498 100644 --- a/src/kconf_update/CMakeLists.txt +++ b/src/kconf_update/CMakeLists.txt @@ -17,11 +17,17 @@ ecm_qt_declare_logging_category(kconf_update_SRCS ) add_executable(kconf_update ${kconf_update_SRCS}) -add_executable(KF5::kconf_update ALIAS kconf_update) target_link_libraries(kconf_update Qt5::Core KF5::ConfigCore) include(ECMMarkNonGuiExecutable) ecm_mark_nongui_executable(kconf_update) +if(CMAKE_CROSSCOMPILING AND KCONF_UPDATE_EXECUTABLE) + add_executable(KF5::kconf_update IMPORTED GLOBAL) + set_target_properties(KF5::kconf_update PROPERTIES IMPORTED_LOCATION ${KCONF_UPDATE_EXECUTABLE}) +else() + add_executable(KF5::kconf_update ALIAS kconf_update) +endif() + file( GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kconf-exec.h CONTENT "#define KCONF_UPDATE_EXECUTABLE \"$<TARGET_FILE:kconf_update>\"" diff --git a/src/kconfig_compiler/CMakeLists.txt b/src/kconfig_compiler/CMakeLists.txt index 2bd41ce..491cd67 100644 --- a/src/kconfig_compiler/CMakeLists.txt +++ b/src/kconfig_compiler/CMakeLists.txt @@ -19,6 +19,8 @@ if(CMAKE_TOOLCHAIN_FILE) if(BUILD_TESTING) message(WARNING "Testing should be disabled on cross-compilation") endif() + add_executable(KF5::kconfig_compiler IMPORTED GLOBAL) + set_target_properties(KF5::kconfig_compiler PROPERTIES IMPORTED_LOCATION ${KCONFIG_COMPILER_EXECUTABLE}) else() add_executable(KF5::kconfig_compiler ALIAS kconfig_compiler) endif() -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor