project( KGRUBEditor )
find_package( KDE4 REQUIRED )

option( ENABLE_KCM "Build KGRUBEditor and show it under System Settings." ON )
option( ENABLE_APP "Build KGRUBEditor and show it (as stand-alone application) under the menu." ON )

if( ENABLE_KCM OR ENABLE_APP )
   add_subdirectory( cfg )
   add_subdirectory( icons )
   add_subdirectory( kns )
   add_subdirectory( pics )
   add_subdirectory( src )
else( ENABLE_KCM OR ENABLE_APP )
   message( SEND_ERROR "Don't turn both components (KCM+APP) off. KGRUBEditor will be neither compiled nor installed." )
endif( ENABLE_KCM OR ENABLE_APP )

if( ENABLE_KCM )
   install( FILES other/kgrubeditor.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
endif( ENABLE_KCM )

if( ENABLE_APP )
   install( FILES other/kgrubeditor_app.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
endif( ENABLE_APP )
