Verified Commit cf0be2fb authored by ivan tkachenko's avatar ivan tkachenko
Browse files

kcminit: Symlink kcminit_start instead of compiling twice

and also reformat CMakeLists in a more consistent way.
parent ac7369fd
Pipeline #209161 passed with stage
in 11 minutes and 47 seconds
########### next target ###############
set(kcminit_SRCS main.cpp)
add_executable(kcminit ${kcminit_SRCS})
target_link_libraries(kcminit Qt::Core Qt::Gui Qt::DBus KF5::CoreAddons KF5::Service KF5::I18n KF5::ConfigCore PW::KWorkspace)
install(TARGETS kcminit ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
########### next target ###############
# TODO might be simpler to make <whatever>_startup to be a symlink to <whatever>
set(kcminit_startup_SRCS main.cpp)
add_executable(kcminit_startup ${kcminit_startup_SRCS})
ecm_install_configured_files(INPUT plasma-kcminit-phase1.service.in plasma-kcminit.service.in
DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
target_link_libraries(kcminit_startup Qt::Core Qt::Gui Qt::DBus KF5::CoreAddons KF5::Service KF5::I18n KF5::ConfigCore PW::KWorkspace)
install(TARGETS kcminit_startup ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
add_executable(kcminit main.cpp)
target_link_libraries(kcminit
Qt::Core
Qt::Gui
Qt::DBus
KF5::CoreAddons
KF5::Service
KF5::I18n
KF5::ConfigCore
PW::KWorkspace
)
install(TARGETS kcminit ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
add_custom_command(TARGET kcminit POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink kcminit kcminit_startup)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kcminit_startup DESTINATION ${KDE_INSTALL_BINDIR})
ecm_install_configured_files(
INPUT
plasma-kcminit-phase1.service.in
plasma-kcminit.service.in
DESTINATION
${KDE_INSTALL_SYSTEMDUSERUNITDIR}
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment