project("desktoptojson")

include(ECMMarkNonGuiExecutable)

add_executable(desktoptojson
    main.cpp
    kconfigtojson.cpp
)
add_executable(KF5::desktoptojson ALIAS desktoptojson)

# Mark it as non-gui so we won't create an app bundle on Mac OS X
ecm_mark_nongui_executable(desktoptojson)

target_link_libraries(desktoptojson
    Qt5::Core
    KF5::ConfigCore
)

# "export" this target too so we can use the LOCATION property of the imported target in
# FindKDE4Internal.cmake to get the full path to the installed executable instead of using
# FIND_PROGRAM(), Alex
install(TARGETS desktoptojson EXPORT KF5ServiceTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
