ladybird/UI/Qt/CMakeLists.txt
ayeteadoe 95f239a357 CMake: Add Windows executable helper function
The function currently has 2 purposes: (1) To copy dependent dlls for
executables to output binary directory. This ensures that these helper
processes can be ran after a build given not all DLLs from vcpkg libs
get implicitly copied to the bin folder. (2) Allow fully background
and/or GUI processes to use the Windows Subsystem. This prevents
unnecessarily launching a console for the process, as we either require
no user interaction or the user interaction is all handled in the GUI.
2025-10-29 21:07:52 -06:00

38 lines
884 B
CMake

qt_add_executable(ladybird main.cpp)
target_sources(ladybird PRIVATE
Application.cpp
Autocomplete.cpp
BrowserWindow.cpp
FindInPageWidget.cpp
Icon.cpp
LocationEdit.cpp
Menu.cpp
Settings.cpp
StringUtils.cpp
Tab.cpp
TabBar.cpp
TVGIconEngine.cpp
WebContentView.cpp
ladybird.qrc
)
target_link_libraries(ladybird PRIVATE Qt::Core Qt::Gui Qt::Widgets)
create_ladybird_bundle(ladybird)
if (WIN32)
lagom_windows_bin(ladybird)
qt_generate_deploy_script(
TARGET ladybird
OUTPUT_SCRIPT ladybird_deploy_script
CONTENT "
qt_deploy_runtime_dependencies(
EXECUTABLE $<TARGET_FILE:ladybird>
PLUGINS_DIR $<TARGET_FILE_DIR:ladybird>
)
")
add_custom_command(TARGET ladybird POST_BUILD
COMMAND ${CMAKE_COMMAND}
-P ${ladybird_deploy_script}
COMMAND_EXPAND_LISTS
)
endif()