add_library(chase_qol bottom_hook.cpp settings.cpp display_tab.cpp view_layout.cpp ui_layout.cpp game_tab.cpp controls_tab.cpp window_apply.cpp controls_file.cpp active_settings.cpp menu_stores.cpp front_panel.cpp front_page_rules.cpp front_panel_clicks.cpp ui_nav.cpp ui_page_controls.cpp ui_page_qol.cpp controls_swap.cpp keep_settings.cpp pc_controls.cpp controls_merge.cpp pc_vehicle_controls.cpp pc_mouse_camera.cpp mouse_sensitivity.cpp slot_page_entry.cpp)
target_link_libraries(chase_qol PUBLIC chase_input chase_assets)
target_include_directories(chase_qol PUBLIC ${CMAKE_SOURCE_DIR}/src)
target_compile_features(chase_qol PUBLIC cxx_std_17)
target_compile_options(chase_qol PRIVATE -Wall -Wextra -Wpedantic)
if(TARGET chase_render)
  add_library(chase_qol_view view_hook.cpp hud_hook.cpp)
  target_link_libraries(chase_qol_view PUBLIC chase_qol chase_render)
  target_compile_options(chase_qol_view PRIVATE -Wall -Wextra -Wpedantic)
  add_library(chase_qol_hud hud_parts_hook.cpp movie_subtitle_overlay.cpp)
  target_link_libraries(chase_qol_hud PUBLIC chase_qol_view chase_frontend)
  target_compile_options(chase_qol_hud PRIVATE -Wall -Wextra -Wpedantic)
  add_library(chase_qol_paint ui_paint.cpp ui_backdrop.cpp)
  target_link_libraries(chase_qol_paint PUBLIC chase_qol chase_render)
  target_compile_options(chase_qol_paint PRIVATE -Wall -Wextra -Wpedantic)
  add_library(chase_qol_minimap minimap.cpp)
  target_link_libraries(chase_qol_minimap PUBLIC chase_qol chase_render chase_frontend)
  target_compile_options(chase_qol_minimap PRIVATE -Wall -Wextra -Wpedantic)
endif()
if(TARGET chase_render)
  add_library(chase_qol_window menu_window_sdl.cpp pause_entry.cpp front_panel_present.cpp front_loading_spinner.cpp front_panel_clicks_sdl.cpp ui_menu_sdl.cpp pc_mouse_camera_sdl.cpp)
  target_link_libraries(chase_qol_window PUBLIC chase_qol_paint chase_qol_hud chase_frontend chase_render PkgConfig::SDL2)
  target_compile_options(chase_qol_window PRIVATE -Wall -Wextra -Wpedantic)
endif()

target_sources(chase_qol PRIVATE ui_page_game.cpp ui_page_display.cpp ui_page_display_view.cpp view_distance.cpp room_request_hook.cpp)
if(TARGET chase_qol_paint)
  target_sources(chase_qol_paint PRIVATE ui_menu.cpp)
endif()
