build(win): create portable.txt file automatically

This commit is contained in:
Nikhil Narayana 2024-03-26 10:16:58 -07:00
commit 913ae9351d
No known key found for this signature in database
GPG key ID: 2D6E647B8732451F

View file

@ -493,6 +493,11 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_BINARY_DIR}/cargo/build/x86_64-pc-windows-msvc/${CMAKE_BUILD_TYPE_LOWER}/slippi_rust_extensions.pdb" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/slippi_rust_extensions.pdb"
)
# create portable.txt automatically for Windows since we always use portable builds for dev and release
add_custom_command(TARGET dolphin-emu POST_BUILD
COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/portable.txt"
)
# Delegate to Qt's official deployment binary on Windows to copy over the necessary Qt-specific libraries, etc.
get_target_property(MOC_EXECUTABLE_LOCATION Qt6::moc IMPORTED_LOCATION)
get_filename_component(QT_BINARY_DIRECTORY "${MOC_EXECUTABLE_LOCATION}" DIRECTORY)