aboutsummaryrefslogtreecommitdiff
path: root/src/kconfig_compiler
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2021-05-27 03:54:31 +0200
committerFriedrich W. H. Kossebau <kossebau@kde.org>2021-05-27 03:54:31 +0200
commite4a9b977d47cc1ec01282212039ed58241eafcf4 (patch)
tree56460fefb804a0ff23ef809f5e9ca203660ec109 /src/kconfig_compiler
parent9fe58ac80574ca668c23ba662e73de5e5b054c1f (diff)
downloadkconfig-e4a9b977d47cc1ec01282212039ed58241eafcf4.tar.gz
kconfig-e4a9b977d47cc1ec01282212039ed58241eafcf4.tar.bz2
Use more target-centric cmake code
NO_CHANGELOG
Diffstat (limited to 'src/kconfig_compiler')
-rw-r--r--src/kconfig_compiler/CMakeLists.txt20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/kconfig_compiler/CMakeLists.txt b/src/kconfig_compiler/CMakeLists.txt
index 2bd41cec..0e11ee58 100644
--- a/src/kconfig_compiler/CMakeLists.txt
+++ b/src/kconfig_compiler/CMakeLists.txt
@@ -1,6 +1,14 @@
+add_executable(kconfig_compiler)
+if(CMAKE_TOOLCHAIN_FILE)
+ if(BUILD_TESTING)
+ message(WARNING "Testing should be disabled on cross-compilation")
+ endif()
+else()
+ add_executable(KF5::kconfig_compiler ALIAS kconfig_compiler)
+endif()
-set(kconfig_compiler_SRCS
+target_sources(kconfig_compiler PRIVATE
KConfigParameters.cpp
KConfigCodeGeneratorBase.cpp
KConfigHeaderGenerator.cpp
@@ -9,20 +17,10 @@ set(kconfig_compiler_SRCS
kconfig_compiler.cpp
)
-
-add_executable(kconfig_compiler ${kconfig_compiler_SRCS})
set_target_properties(kconfig_compiler PROPERTIES
OUTPUT_NAME "kconfig_compiler_kf5"
)
-if(CMAKE_TOOLCHAIN_FILE)
- if(BUILD_TESTING)
- message(WARNING "Testing should be disabled on cross-compilation")
- endif()
-else()
- add_executable(KF5::kconfig_compiler ALIAS kconfig_compiler)
-endif()
-
target_link_libraries(kconfig_compiler Qt5::Xml)
ecm_mark_nongui_executable(kconfig_compiler)