ladybird/UI/Qt/CMakeLists.txt
ayeteadoe 9ec1643d88 CMake: Add helper to ensure vcpkg DLLs are copied to the output dir
The BUILD_RPATH/INSTALL_RPATH CMake infrastructure is not supported
on Windows, but we want to ensure Ladybird executables are runnable
after the build phase so there can be an efficient dev loop.
lagom_copy_runtime_dlls() can be used by executable targets so all
their dependent dlls are copied to their output directory in their
post build step.
2025-08-23 16:04:36 -06:00

37 lines
873 B
CMake

qt_add_executable(ladybird main.cpp)
target_sources(ladybird PRIVATE
Application.cpp
Autocomplete.cpp
BrowserWindow.cpp
FindInPageWidget.cpp
Icon.cpp
LocationEdit.cpp
Settings.cpp
Tab.cpp
TabBar.cpp
TVGIconEngine.cpp
StringUtils.cpp
WebContentView.cpp
ladybird.qrc
)
target_link_libraries(ladybird PRIVATE Qt::Core Qt::Gui Qt::Widgets)
lagom_copy_runtime_dlls(ladybird)
create_ladybird_bundle(ladybird)
if (WIN32)
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()