Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / kappfinder / CMakeLists.txt
blob35dc0cae6d860e1caffa4387864fab3333cb718f
1 OPTION(RUN_KAPPFINDER "Installing non-KDE applications" OFF)
3 add_subdirectory(apps)
4 add_subdirectory(pics)
6 set(kappfinder_SRCS
7     main.cpp
8     toplevel.cpp
9     common.cpp)
11 kde4_add_executable(kappfinder ${kappfinder_SRCS})
13 target_link_libraries(kappfinder ${KDE4_KIO_LIBS})
15 install(TARGETS kappfinder DESTINATION ${BIN_INSTALL_DIR})
17 set(kappfinder_install_SRCS
18     main_install.cpp
19     common.cpp )
21 kde4_add_executable(kappfinder_install ${kappfinder_install_SRCS})
23 target_link_libraries(kappfinder_install ${KDE4_KDEUI_LIBS})
25 install(FILES kappfinder.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
27 kde4_install_icons(${ICON_INSTALL_DIR})
29 if(RUN_KAPPFINDER)
30    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/run_kappfinder.cmake "exec_program(${CMAKE_CURRENT_BINARY_DIR}/kappfinder_install ARGS \"${DATA_INSTALL_DIR}\")\n")
31    # and add it as post-install script to any of the installed targets, so it will be executed during "make install"
32    set_target_properties(kappfinder_install PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/run_kappfinder.cmake)
33 endif(RUN_KAPPFINDER)