瀏覽代碼

Everywhere: Add component declarations

This adds component declarations so that users can select to not build
certain parts of the OS.
Gunnar Beutner 4 年之前
父節點
當前提交
631d36fd98
共有 89 個文件被更改,包括 535 次插入8 次删除
  1. 1 1
      Tests/LibJS/CMakeLists.txt
  2. 1 1
      Tests/LibWasm/CMakeLists.txt
  3. 1 1
      Tests/LibWeb/CMakeLists.txt
  4. 6 0
      Userland/Applets/Audio/CMakeLists.txt
  5. 6 0
      Userland/Applets/ClipboardHistory/CMakeLists.txt
  6. 6 0
      Userland/Applets/Network/CMakeLists.txt
  7. 6 0
      Userland/Applets/ResourceGraph/CMakeLists.txt
  8. 6 0
      Userland/Applications/3DFileViewer/CMakeLists.txt
  9. 6 0
      Userland/Applications/About/CMakeLists.txt
  10. 6 0
      Userland/Applications/AnalogClock/CMakeLists.txt
  11. 7 0
      Userland/Applications/Browser/CMakeLists.txt
  12. 6 0
      Userland/Applications/Calculator/CMakeLists.txt
  13. 5 0
      Userland/Applications/Calendar/CMakeLists.txt
  14. 6 0
      Userland/Applications/CrashReporter/CMakeLists.txt
  15. 5 0
      Userland/Applications/Debugger/CMakeLists.txt
  16. 6 0
      Userland/Applications/DisplaySettings/CMakeLists.txt
  17. 7 0
      Userland/Applications/FileManager/CMakeLists.txt
  18. 6 0
      Userland/Applications/FontEditor/CMakeLists.txt
  19. 6 0
      Userland/Applications/Help/CMakeLists.txt
  20. 6 0
      Userland/Applications/HexEditor/CMakeLists.txt
  21. 5 0
      Userland/Applications/IRCClient/CMakeLists.txt
  22. 7 0
      Userland/Applications/ImageViewer/CMakeLists.txt
  23. 6 0
      Userland/Applications/KeyboardMapper/CMakeLists.txt
  24. 6 0
      Userland/Applications/KeyboardSettings/CMakeLists.txt
  25. 6 0
      Userland/Applications/Magnifier/CMakeLists.txt
  26. 6 0
      Userland/Applications/MouseSettings/CMakeLists.txt
  27. 5 0
      Userland/Applications/PDFViewer/CMakeLists.txt
  28. 7 0
      Userland/Applications/Piano/CMakeLists.txt
  29. 7 0
      Userland/Applications/PixelPaint/CMakeLists.txt
  30. 6 0
      Userland/Applications/Run/CMakeLists.txt
  31. 7 0
      Userland/Applications/SoundPlayer/CMakeLists.txt
  32. 5 0
      Userland/Applications/SpaceAnalyzer/CMakeLists.txt
  33. 5 0
      Userland/Applications/Spreadsheet/CMakeLists.txt
  34. 6 0
      Userland/Applications/SystemMonitor/CMakeLists.txt
  35. 6 0
      Userland/Applications/Terminal/CMakeLists.txt
  36. 7 0
      Userland/Applications/TextEditor/CMakeLists.txt
  37. 5 0
      Userland/Applications/ThemeEditor/CMakeLists.txt
  38. 6 0
      Userland/Applications/VideoPlayer/CMakeLists.txt
  39. 5 0
      Userland/Applications/Welcome/CMakeLists.txt
  40. 6 0
      Userland/Demos/CatDog/CMakeLists.txt
  41. 5 0
      Userland/Demos/Cube/CMakeLists.txt
  42. 5 0
      Userland/Demos/Eyes/CMakeLists.txt
  43. 5 0
      Userland/Demos/Fire/CMakeLists.txt
  44. 5 0
      Userland/Demos/LibGfxDemo/CMakeLists.txt
  45. 5 0
      Userland/Demos/LibGfxScaleDemo/CMakeLists.txt
  46. 5 0
      Userland/Demos/Mandelbrot/CMakeLists.txt
  47. 5 0
      Userland/Demos/Mouse/CMakeLists.txt
  48. 5 0
      Userland/Demos/Screensaver/CMakeLists.txt
  49. 5 0
      Userland/Demos/Starfield/CMakeLists.txt
  50. 5 0
      Userland/Demos/WidgetGallery/CMakeLists.txt
  51. 7 0
      Userland/DevTools/HackStudio/CMakeLists.txt
  52. 5 0
      Userland/DevTools/HackStudio/LanguageServers/Cpp/CMakeLists.txt
  53. 5 0
      Userland/DevTools/HackStudio/LanguageServers/Shell/CMakeLists.txt
  54. 6 0
      Userland/DevTools/Inspector/CMakeLists.txt
  55. 6 0
      Userland/DevTools/Playground/CMakeLists.txt
  56. 6 0
      Userland/DevTools/Profiler/CMakeLists.txt
  57. 6 0
      Userland/DevTools/UserspaceEmulator/CMakeLists.txt
  58. 6 0
      Userland/Games/2048/CMakeLists.txt
  59. 6 0
      Userland/Games/Breakout/CMakeLists.txt
  60. 7 0
      Userland/Games/Chess/CMakeLists.txt
  61. 6 0
      Userland/Games/GameOfLife/CMakeLists.txt
  62. 7 0
      Userland/Games/Hearts/CMakeLists.txt
  63. 6 0
      Userland/Games/Minesweeper/CMakeLists.txt
  64. 6 0
      Userland/Games/Pong/CMakeLists.txt
  65. 6 0
      Userland/Games/Snake/CMakeLists.txt
  66. 6 0
      Userland/Games/Solitaire/CMakeLists.txt
  67. 6 0
      Userland/Services/AudioServer/CMakeLists.txt
  68. 5 0
      Userland/Services/ChessEngine/CMakeLists.txt
  69. 6 0
      Userland/Services/Clipboard/CMakeLists.txt
  70. 6 0
      Userland/Services/CrashDaemon/CMakeLists.txt
  71. 6 0
      Userland/Services/DHCPClient/CMakeLists.txt
  72. 5 0
      Userland/Services/EchoServer/CMakeLists.txt
  73. 5 0
      Userland/Services/FileOperation/CMakeLists.txt
  74. 5 0
      Userland/Services/ImageDecoder/CMakeLists.txt
  75. 6 0
      Userland/Services/InspectorServer/CMakeLists.txt
  76. 6 0
      Userland/Services/KeyboardPreferenceLoader/CMakeLists.txt
  77. 6 0
      Userland/Services/LaunchServer/CMakeLists.txt
  78. 6 0
      Userland/Services/LookupServer/CMakeLists.txt
  79. 6 0
      Userland/Services/NotificationServer/CMakeLists.txt
  80. 5 0
      Userland/Services/RequestServer/CMakeLists.txt
  81. 6 0
      Userland/Services/SystemServer/CMakeLists.txt
  82. 6 0
      Userland/Services/Taskbar/CMakeLists.txt
  83. 5 0
      Userland/Services/TelnetServer/CMakeLists.txt
  84. 5 0
      Userland/Services/WebContent/CMakeLists.txt
  85. 5 0
      Userland/Services/WebServer/CMakeLists.txt
  86. 5 0
      Userland/Services/WebSocket/CMakeLists.txt
  87. 6 0
      Userland/Services/WindowServer/CMakeLists.txt
  88. 6 0
      Userland/Shell/CMakeLists.txt
  89. 41 5
      Userland/Utilities/CMakeLists.txt

+ 1 - 1
Tests/LibJS/CMakeLists.txt

@@ -1,2 +1,2 @@
 serenity_testjs_test(test-js.cpp test-js)
-install(TARGETS test-js RUNTIME DESTINATION bin)
+install(TARGETS test-js RUNTIME DESTINATION bin OPTIONAL)

+ 1 - 1
Tests/LibWasm/CMakeLists.txt

@@ -1,2 +1,2 @@
 serenity_testjs_test(test-wasm.cpp test-wasm LIBS LibWasm)
-install(TARGETS test-wasm RUNTIME DESTINATION bin)
+install(TARGETS test-wasm RUNTIME DESTINATION bin OPTIONAL)

+ 1 - 1
Tests/LibWeb/CMakeLists.txt

@@ -1,2 +1,2 @@
 serenity_testjs_test(test-web.cpp test-web LIBS LibWeb)
-install(TARGETS test-web RUNTIME DESTINATION bin)
+install(TARGETS test-web RUNTIME DESTINATION bin OPTIONAL)

+ 6 - 0
Userland/Applets/Audio/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Audio.Applet
+    REQUIRED
+    TARGETS Audio.Applet
+)
+
 set(SOURCES
     main.cpp
 )

+ 6 - 0
Userland/Applets/ClipboardHistory/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    ClipboardHistory.Applet
+    REQUIRED
+    TARGETS ClipboardHistory.Applet
+)
+
 set(SOURCES
     ClipboardHistoryModel.cpp
     main.cpp

+ 6 - 0
Userland/Applets/Network/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Network.Applet
+    REQUIRED
+    TARGETS Network.Applet
+)
+
 set(SOURCES
     main.cpp
 )

+ 6 - 0
Userland/Applets/ResourceGraph/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    ResourceGraph.Applet
+    REQUIRED
+    TARGETS ResourceGraph.Applet
+)
+
 set(SOURCES
     main.cpp
 )

+ 6 - 0
Userland/Applications/3DFileViewer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    3DFileViewer
+    RECOMMENDED
+    TARGETS 3DFileViewer
+)
+
 set(SOURCES
     Mesh.cpp
     WavefrontOBJLoader.cpp

+ 6 - 0
Userland/Applications/About/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    About
+    REQUIRED
+    TARGETS About
+)
+
 set(SOURCES
     main.cpp
 )

+ 6 - 0
Userland/Applications/AnalogClock/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    AnalogClock
+    RECOMMENDED
+    TARGETS AnalogClock
+)
+
 set(SOURCES
         main.cpp
         AnalogClock.cpp

+ 7 - 0
Userland/Applications/Browser/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    Browser
+    RECOMMENDED
+    TARGETS Browser
+    DEPENDS ImageDecoder RequestServer WebContent WebSocket
+)
+
 compile_gml(BrowserWindow.gml BrowserWindowGML.h browser_window_gml)
 compile_gml(EditBookmark.gml EditBookmarkGML.h edit_bookmark_gml)
 compile_gml(Tab.gml TabGML.h tab_gml)

+ 6 - 0
Userland/Applications/Calculator/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Calculator
+    RECOMMENDED
+    TARGETS Calculator
+)
+
 compile_gml(CalculatorWindow.gml CalculatorGML.h calculator_gml)
 set(SOURCES
     main.cpp

+ 5 - 0
Userland/Applications/Calendar/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Calendar
+    TARGETS Calendar
+)
+
 compile_gml(CalendarWindow.gml CalendarWindowGML.h calendar_window_gml)
 
 set(SOURCES

+ 6 - 0
Userland/Applications/CrashReporter/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    CrashReporter
+    REQUIRED
+    TARGETS CrashReporter
+)
+
 compile_gml(CrashReporterWindow.gml CrashReporterWindowGML.h crash_reporter_window_gml)
 
 

+ 5 - 0
Userland/Applications/Debugger/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Debugger
+    TARGETS Debugger
+)
+
 set(SOURCES
     main.cpp
 )

+ 6 - 0
Userland/Applications/DisplaySettings/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    DisplaySettings
+    REQUIRED
+    TARGETS DisplaySettings
+)
+
 compile_gml(MonitorSettings.gml MonitorSettingsGML.h monitor_settings_window_gml)
 compile_gml(BackgroundSettings.gml BackgroundSettingsGML.h background_settings_gml)
 compile_gml(FontSettings.gml FontSettingsGML.h font_settings_gml)

+ 7 - 0
Userland/Applications/FileManager/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    FileManager
+    REQUIRED
+    TARGETS FileManager
+    DEPENDS FileOperation
+)
+
 compile_gml(FileManagerWindow.gml FileManagerWindowGML.h file_manager_window_gml)
 compile_gml(FileOperationProgress.gml FileOperationProgressGML.h file_operation_progress_gml)
 

+ 6 - 0
Userland/Applications/FontEditor/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    FontEditor
+    RECOMMENDED
+    TARGETS FontEditor
+)
+
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 compile_gml(FontEditorWindow.gml FontEditorWindowGML.h font_editor_window_gml)
 compile_gml(NewFontDialogPage1.gml NewFontDialogPage1GML.h new_font_dialog_page_1_gml)

+ 6 - 0
Userland/Applications/Help/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Help
+    RECOMMENDED
+    TARGETS Help
+)
+
 set(SOURCES
     History.cpp
     main.cpp

+ 6 - 0
Userland/Applications/HexEditor/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    HexEditor
+    RECOMMENDED
+    TARGETS HexEditor
+)
+
 compile_gml(HexEditorWindow.gml HexEditorWindowGML.h hex_editor_window_gml)
 compile_gml(GoToOffsetDialog.gml GoToOffsetDialogGML.h go_to_offset_dialog_gml)
 compile_gml(FindDialog.gml FindDialogGML.h find_dialog_gml)

+ 5 - 0
Userland/Applications/IRCClient/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    IRCClient
+    TARGETS IRCClient
+)
+
 set(SOURCES
     IRCAppWindow.cpp
     IRCChannel.cpp

+ 7 - 0
Userland/Applications/ImageViewer/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    ImageViewer
+    RECOMMENDED
+    TARGETS ImageViewer
+    DEPENDS ImageDecoder
+)
+
 set(SOURCES
     main.cpp
         ViewWidget.cpp

+ 6 - 0
Userland/Applications/KeyboardMapper/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    KeyboardMapper
+    RECOMMENDED
+    TARGETS KeyboardMapper
+)
+
 set(SOURCES
     KeyboardMapperWidget.cpp
     KeyButton.cpp

+ 6 - 0
Userland/Applications/KeyboardSettings/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    KeyboardSettings
+    REQUIRED
+    TARGETS KeyboardSettings
+)
+
 set(SOURCES
     main.cpp
 )

+ 6 - 0
Userland/Applications/Magnifier/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Magnifier
+    RECOMMENDED
+    TARGETS Magnifier
+)
+
 set(SOURCES
     MagnifierWidget.cpp
     MagnifierWidget.h

+ 6 - 0
Userland/Applications/MouseSettings/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    MouseSettings
+    REQUIRED
+    TARGETS MouseSettings
+)
+
 compile_gml(MouseSettingsWindow.gml MouseSettingsWindowGML.h mouse_settings_window_gml)
 
 set(SOURCES

+ 5 - 0
Userland/Applications/PDFViewer/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    PDFViewer
+    TARGETS PDFViewer
+)
+
 set(SOURCES
     NumericInput.cpp
     OutlineModel.cpp

+ 7 - 0
Userland/Applications/Piano/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    Piano
+    RECOMMENDED
+    TARGETS Piano
+    DEPENDS AudioServer
+)
+
 set(SOURCES
     Track.cpp
     TrackManager.cpp

+ 7 - 0
Userland/Applications/PixelPaint/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    PixelPaint
+    RECOMMENDED
+    TARGETS PixelPaint
+    DEPENDS ImageDecoder
+)
+
 compile_gml(PixelPaintWindow.gml PixelPaintWindowGML.h pixel_paint_window_gml)
 
 set(SOURCES

+ 6 - 0
Userland/Applications/Run/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Run
+    REQUIRED
+    TARGETS Run
+)
+
 compile_gml(Run.gml RunGML.h run_gml)
 
 set(SOURCES

+ 7 - 0
Userland/Applications/SoundPlayer/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    SoundPlayer
+    RECOMMENDED
+    TARGETS SoundPlayer
+    DEPENDS AudioServer
+)
+
 set(SOURCES
     main.cpp
     PlaybackManager.cpp

+ 5 - 0
Userland/Applications/SpaceAnalyzer/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    SpaceAnalyzer
+    TARGETS SpaceAnalyzer
+)
+
 compile_gml(SpaceAnalyzer.gml SpaceAnalyzerGML.h space_analyzer_gml)
 
 set(SOURCES

+ 5 - 0
Userland/Applications/Spreadsheet/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Spreadsheet
+    TARGETS Spreadsheet
+)
+
 compile_gml(CondFormatting.gml CondFormattingGML.h cond_fmt_gml)
 compile_gml(CondView.gml CondFormattingViewGML.h cond_fmt_view_gml)
 compile_gml(csv_import.gml CSVImportGML.h csv_import_gml)

+ 6 - 0
Userland/Applications/SystemMonitor/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    SystemMonitor
+    REQUIRED
+    TARGETS SystemMonitor Profiler Inspector
+)
+
 set(SOURCES
     DevicesModel.cpp
     GraphWidget.cpp

+ 6 - 0
Userland/Applications/Terminal/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Terminal
+    REQUIRED
+    TARGETS Terminal utmpupdate
+)
+
 compile_gml(TerminalSettingsWindow.gml TerminalSettingsWindowGML.h terminal_settings_window_gml)
 
 set(SOURCES

+ 7 - 0
Userland/Applications/TextEditor/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    TextEditor
+    RECOMMENDED
+    TARGETS TextEditor
+    DEPENDS ImageDecoder RequestServer WebContent
+)
+
 compile_gml(TextEditorWindow.gml TextEditorWindowGML.h text_editor_window_gml)
 
 set(SOURCES

+ 5 - 0
Userland/Applications/ThemeEditor/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    ThemeEditor
+    TARGETS ThemeEditor
+)
+
 set(SOURCES
     PreviewWidget.cpp
     main.cpp

+ 6 - 0
Userland/Applications/VideoPlayer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    VideoPlayer
+    TARGETS VideoPlayer
+    DEPENDS AudioServer
+)
+
 set(SOURCES
     main.cpp
 )

+ 5 - 0
Userland/Applications/Welcome/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Welcome
+    TARGETS Welcome
+)
+
 compile_gml(WelcomeWindow.gml WelcomeWindowGML.h welcome_window_gml)
 
 set(SOURCES

+ 6 - 0
Userland/Demos/CatDog/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    CatDog
+    RECOMMENDED
+    TARGETS CatDog
+)
+
 set(SOURCES
     CatDog.cpp
     SpeechBubble.cpp

+ 5 - 0
Userland/Demos/Cube/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Cube
+    TARGETS Cube
+)
+
 set(SOURCES
     Cube.cpp
 )

+ 5 - 0
Userland/Demos/Eyes/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Eyes
+    TARGETS Eyes
+)
+
 set(SOURCES
     main.cpp
     EyesWidget.cpp

+ 5 - 0
Userland/Demos/Fire/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Fire
+    TARGETS Fire
+)
+
 set(SOURCES
     Fire.cpp
 )

+ 5 - 0
Userland/Demos/LibGfxDemo/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    LibGfxDemo
+    TARGETS LibGfxDemo
+)
+
 set(SOURCES
     main.cpp
 )

+ 5 - 0
Userland/Demos/LibGfxScaleDemo/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    LibGfxScaleDemo
+    TARGETS LibGfxScaleDemo
+)
+
 set(SOURCES
     main.cpp
 )

+ 5 - 0
Userland/Demos/Mandelbrot/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Mandelbrot
+    TARGETS Mandelbrot
+)
+
 set(SOURCES
     Mandelbrot.cpp
 )

+ 5 - 0
Userland/Demos/Mouse/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Mouse
+    TARGETS Mouse
+)
+
 set(SOURCES
     main.cpp
 )

+ 5 - 0
Userland/Demos/Screensaver/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Screensaver
+    TARGETS Screensaver
+)
+
 set(SOURCES
     Screensaver.cpp
 )

+ 5 - 0
Userland/Demos/Starfield/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    Starfield
+    TARGETS Starfield
+)
+
 set(SOURCES
     Starfield.cpp
 )

+ 5 - 0
Userland/Demos/WidgetGallery/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    WidgetGallery
+    TARGETS WidgetGallery
+)
+
 compile_gml(./GalleryGML/Window.gml WindowGML.h window_gml)
 compile_gml(./GalleryGML/BasicsTab.gml BasicsTabGML.h basics_tab_gml)
 compile_gml(./GalleryGML/SlidersTab.gml SlidersTabGML.h sliders_tab_gml)

+ 7 - 0
Userland/DevTools/HackStudio/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    HackStudio
+    RECOMMENDED
+    TARGETS HackStudio
+    DEPENDS CppLanguageServer ShellLanguageServer
+)
+
 add_subdirectory(LanguageServers)
 add_subdirectory(LanguageClients)
 

+ 5 - 0
Userland/DevTools/HackStudio/LanguageServers/Cpp/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    CppLanguageServer
+    TARGETS CppLanguageServer
+)
+
 set(SOURCES
     CppComprehensionEngine.cpp
     Tests.cpp

+ 5 - 0
Userland/DevTools/HackStudio/LanguageServers/Shell/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    ShellLanguageServer
+    TARGETS ShellLanguageServer
+)
+
 set(SOURCES
     ShellComprehensionEngine.cpp
     main.cpp

+ 6 - 0
Userland/DevTools/Inspector/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Inspector
+    RECOMMENDED
+    TARGETS Inspector
+)
+
 set(SOURCES
     main.cpp
     RemoteObject.cpp

+ 6 - 0
Userland/DevTools/Playground/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Playground
+    RECOMMENDED
+    TARGETS Playground
+)
+
 set(SOURCES
     main.cpp
     GMLAutocompleteProvider.cpp

+ 6 - 0
Userland/DevTools/Profiler/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Profiler
+    RECOMMENDED
+    TARGETS Profiler
+)
+
 set(SOURCES
         DisassemblyModel.cpp
         main.cpp

+ 6 - 0
Userland/DevTools/UserspaceEmulator/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    UserspaceEmulator
+    RECOMMENDED
+    TARGETS UserspaceEmulator
+)
+
 set(SOURCES
     Emulator.cpp
     Emulator_syscalls.cpp

+ 6 - 0
Userland/Games/2048/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    2048
+    RECOMMENDED
+    TARGETS 2048
+)
+
 set(SOURCES
     BoardView.cpp
     Game.cpp

+ 6 - 0
Userland/Games/Breakout/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Breakout
+    RECOMMENDED
+    TARGETS Breakout
+)
+
 set(SOURCES
     main.cpp
     Game.cpp

+ 7 - 0
Userland/Games/Chess/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    Chess
+    RECOMMENDED
+    TARGETS Chess
+    DEPENDS ChessEngine
+)
+
 set(SOURCES
     main.cpp
     ChessWidget.cpp

+ 6 - 0
Userland/Games/GameOfLife/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    GameOfLife
+    RECOMMENDED
+    TARGETS GameOfLife
+)
+
 compile_gml(GameOfLife.gml GameOfLifeGML.h game_of_life_gml)
 
 set(SOURCES

+ 7 - 0
Userland/Games/Hearts/CMakeLists.txt

@@ -1,3 +1,10 @@
+serenity_component(
+    Hearts
+    DESCRIPTION "Hearts game"
+    RECOMMENDED
+    TARGETS Hearts
+)
+
 compile_gml(Hearts.gml HeartsGML.h hearts_gml)
 
 set(SOURCES

+ 6 - 0
Userland/Games/Minesweeper/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Minesweeper
+    RECOMMENDED
+    TARGETS Minesweeper
+)
+
 set(SOURCES
     Field.cpp
     main.cpp

+ 6 - 0
Userland/Games/Pong/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Pong
+    RECOMMENDED
+    TARGETS Pong
+)
+
 set(SOURCES
     main.cpp
     Game.cpp

+ 6 - 0
Userland/Games/Snake/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Snake
+    RECOMMENDED
+    TARGETS Snake
+)
+
 set(SOURCES
     main.cpp
     SnakeGame.cpp

+ 6 - 0
Userland/Games/Solitaire/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Solitaire
+    RECOMMENDED
+    TARGETS Solitaire
+)
+
 compile_gml(Solitaire.gml SolitaireGML.h solitaire_gml)
 
 set(SOURCES

+ 6 - 0
Userland/Services/AudioServer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    AudioServer
+    RECOMMENDED
+    TARGETS AudioServer
+)
+
 compile_ipc(AudioServer.ipc AudioServerEndpoint.h)
 compile_ipc(AudioClient.ipc AudioClientEndpoint.h)
 

+ 5 - 0
Userland/Services/ChessEngine/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    ChessEngine
+    TARGETS ChessEngine
+)
+
 set(SOURCES
     ChessEngine.cpp
     main.cpp

+ 6 - 0
Userland/Services/Clipboard/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Clipboard
+    REQUIRED
+    TARGETS Clipboard
+)
+
 compile_ipc(ClipboardServer.ipc ClipboardServerEndpoint.h)
 compile_ipc(ClipboardClient.ipc ClipboardClientEndpoint.h)
 

+ 6 - 0
Userland/Services/CrashDaemon/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    CrashDaemon
+    REQUIRED
+    TARGETS CrashDaemon
+)
+
 set(SOURCES
     main.cpp
 )

+ 6 - 0
Userland/Services/DHCPClient/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    DHCPClient
+    REQUIRED
+    TARGETS DHCPClient
+)
+
 set(SOURCES
     DHCPv4Client.cpp
     DHCPv4.cpp

+ 5 - 0
Userland/Services/EchoServer/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    EchoServer
+    TARGETS EchoServer
+)
+
 set(SOURCES
     Client.cpp
     main.cpp

+ 5 - 0
Userland/Services/FileOperation/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    FileOperation
+    TARGETS FileOperation
+)
+
 set(SOURCES
     main.cpp
 )

+ 5 - 0
Userland/Services/ImageDecoder/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    ImageDecoder
+    TARGETS ImageDecoder
+)
+
 compile_ipc(ImageDecoderServer.ipc ImageDecoderServerEndpoint.h)
 compile_ipc(ImageDecoderClient.ipc ImageDecoderClientEndpoint.h)
 

+ 6 - 0
Userland/Services/InspectorServer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    InspectorServer
+    REQUIRED
+    TARGETS InspectorServer
+)
+
 compile_ipc(InspectorServer.ipc InspectorServerEndpoint.h)
 compile_ipc(InspectorClient.ipc InspectorClientEndpoint.h)
 

+ 6 - 0
Userland/Services/KeyboardPreferenceLoader/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    KeyboardPreferenceLoader
+    REQUIRED
+    TARGETS KeyboardPreferenceLoader keymap
+)
+
 set(SOURCES
     main.cpp
 )

+ 6 - 0
Userland/Services/LaunchServer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    LaunchServer
+    REQUIRED
+    TARGETS LaunchServer
+)
+
 compile_ipc(LaunchServer.ipc LaunchServerEndpoint.h)
 compile_ipc(LaunchClient.ipc LaunchClientEndpoint.h)
 

+ 6 - 0
Userland/Services/LookupServer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    LookupServer
+    REQUIRED
+    TARGETS LookupServer
+)
+
 compile_ipc(LookupServer.ipc LookupServerEndpoint.h)
 compile_ipc(LookupClient.ipc LookupClientEndpoint.h)
 

+ 6 - 0
Userland/Services/NotificationServer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    NotificationServer
+    REQUIRED
+    TARGETS NotificationServer
+)
+
 compile_ipc(NotificationServer.ipc NotificationServerEndpoint.h)
 compile_ipc(NotificationClient.ipc NotificationClientEndpoint.h)
 

+ 5 - 0
Userland/Services/RequestServer/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    RequestServer
+    TARGETS RequestServer
+)
+
 compile_ipc(RequestServer.ipc RequestServerEndpoint.h)
 compile_ipc(RequestClient.ipc RequestClientEndpoint.h)
 

+ 6 - 0
Userland/Services/SystemServer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    SystemServer
+    REQUIRED
+    TARGETS SystemServer
+)
+
 set(SOURCES
     main.cpp
     Service.cpp

+ 6 - 0
Userland/Services/Taskbar/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Taskbar
+    REQUIRED
+    TARGETS Taskbar
+)
+
 set(SOURCES
     main.cpp
     ClockWidget.cpp

+ 5 - 0
Userland/Services/TelnetServer/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    TelnetServer
+    TARGETS TelnetServer
+)
+
 set(SOURCES
     Client.cpp
     main.cpp

+ 5 - 0
Userland/Services/WebContent/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    WebContent
+    TARGETS WebContent
+)
+
 compile_ipc(WebContentServer.ipc WebContentServerEndpoint.h)
 compile_ipc(WebContentClient.ipc WebContentClientEndpoint.h)
 

+ 5 - 0
Userland/Services/WebServer/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    WebServer
+    TARGETS WebServer
+)
+
 set(SOURCES
     Client.cpp
     Configuration.cpp

+ 5 - 0
Userland/Services/WebSocket/CMakeLists.txt

@@ -1,3 +1,8 @@
+serenity_component(
+    WebSocket
+    TARGETS WebSocket
+)
+
 compile_ipc(WebSocketServer.ipc WebSocketServerEndpoint.h)
 compile_ipc(WebSocketClient.ipc WebSocketClientEndpoint.h)
 

+ 6 - 0
Userland/Services/WindowServer/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    WindowServer
+    REQUIRED
+    TARGETS WindowServer
+)
+
 compile_ipc(WindowServer.ipc WindowServerEndpoint.h)
 compile_ipc(WindowClient.ipc WindowClientEndpoint.h)
 compile_ipc(WindowManagerServer.ipc WindowManagerServerEndpoint.h)

+ 6 - 0
Userland/Shell/CMakeLists.txt

@@ -1,3 +1,9 @@
+serenity_component(
+    Shell
+    REQUIRED
+    TARGETS Shell
+)
+
 set(SOURCES
         AST.cpp
         Builtin.cpp

+ 41 - 5
Userland/Utilities/CMakeLists.txt

@@ -1,17 +1,53 @@
 file(GLOB CMD_SOURCES  CONFIGURE_DEPENDS "*.cpp")
-list(APPEND SPECIAL_TARGETS "test" "install")
+list(APPEND SPECIAL_TARGETS test install)
+list(APPEND REQUIRED_TARGETS
+    arp base64 basename cat chmod chown chroot clear cp cut date dd df dirname dmesg du echo env expr false fgrep
+    file find grep groups head host hostname id ifconfig kill killall ln ls mkdir mount mv nproc
+    pidof ping pmap ps readlink realpath reboot rm rmdir seq shutdown sleep sort stat stty su tail test
+    touch tr true umount uname uniq uptime w wc which whoami xargs yes
+)
+list(APPEND RECOMMENDED_TARGETS
+    adjtime aplay avol bt checksum chres cksum copy fortune gunzip gzip init keymap lsirq lsof lspci man mknod mktemp
+    modload modunload more nc netstat notify ntpquery open pape passwd pls printf pro shot tar tt unzip zip
+)
+
+# FIXME: Support specifying component dependencies for utilities (e.g. WebSocket for telws)
 
 foreach(CMD_SRC ${CMD_SOURCES})
     get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
     if (CMD_NAME IN_LIST SPECIAL_TARGETS)
-        add_executable("${CMD_NAME}-bin" ${CMD_SRC})
-        target_link_libraries("${CMD_NAME}-bin" LibCore)
-        install(TARGETS "${CMD_NAME}-bin" RUNTIME DESTINATION bin)
+        set(TARGET_NAME "${CMD_NAME}-bin")
+    else()
+        set(TARGET_NAME "${CMD_NAME}")
+    endif()
+    if(CMD_NAME IN_LIST REQUIRED_TARGETS)
+        serenity_component(
+            ${CMD_NAME}
+            REQUIRED
+            TARGETS ${TARGET_NAME}
+        )
+    elseif(CMD_NAME IN_LIST RECOMMENDED_TARGETS)
+        serenity_component(
+            ${CMD_NAME}
+            RECOMMENDED
+            TARGETS ${TARGET_NAME}
+        )
+    else()
+        serenity_component(
+            ${CMD_NAME}
+            TARGETS ${TARGET_NAME}
+        )
+    endif()
+    if (CMD_NAME IN_LIST SPECIAL_TARGETS)
+        add_executable(${TARGET_NAME} ${CMD_SRC})
+        target_link_libraries(${TARGET_NAME} LibCore)
+        install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin)
         install(CODE "file(RENAME ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME}-bin ${CMAKE_INSTALL_PREFIX}/bin/${CMD_NAME})")
     else()
         add_executable(${CMD_NAME} ${CMD_SRC})
+        set_target_properties(${CMD_NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE)
         target_link_libraries(${CMD_NAME} LibCore)
-        install(TARGETS ${CMD_NAME} RUNTIME DESTINATION bin)
+        install(TARGETS ${CMD_NAME} RUNTIME DESTINATION bin OPTIONAL)
     endif()
 endforeach()