From 173b33592739f9a671f34eb816499ef32fe65c06 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sun, 21 Jun 2015 02:14:54 +0200 Subject: Make it possible to use kconfig_compiler from different sources This way we can specify the used tooling targets to be used, useful if we're cross-compiling, since we get to use the tooling that runs in the local platform. REVIEW: 124104 --- src/kconfig_compiler/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/kconfig_compiler/CMakeLists.txt b/src/kconfig_compiler/CMakeLists.txt index ec4a7335..0937f578 100644 --- a/src/kconfig_compiler/CMakeLists.txt +++ b/src/kconfig_compiler/CMakeLists.txt @@ -7,10 +7,17 @@ add_executable(kconfig_compiler ${kconfig_compiler_SRCS}) set_target_properties(kconfig_compiler PROPERTIES OUTPUT_NAME "kconfig_compiler_kf5" ) -add_executable(KF5::kconfig_compiler ALIAS kconfig_compiler) + +if(CMAKE_TOOLCHAIN_FILE) + if(BUILD_TESTING) + message("Testing should be disabled on cross-compilation") + endif() +else() + add_executable(KF5::kconfig_compiler ALIAS kconfig_compiler) +endif() find_package(Qt5Xml 5.2.0 REQUIRED NO_MODULE) target_link_libraries(kconfig_compiler Qt5::Xml) -install(TARGETS kconfig_compiler EXPORT KF5ConfigTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS kconfig_compiler EXPORT KF5ConfigCompilerTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) -- cgit v1.2.1