mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Copy Qt dependencies on Windows
This commit is contained in:
parent
319fe957f7
commit
bdd4d6e658
1 changed files with 19 additions and 1 deletions
|
@ -24,3 +24,21 @@ target_link_libraries(xivlauncher Qt6::Core Qt6::Widgets Qt6::Network qt6keychai
|
|||
target_include_directories(xivlauncher PRIVATE
|
||||
${CMAKE_BINARY_DIR}/_deps/qtkeychain-src
|
||||
${CMAKE_BINARY_DIR}/_deps/qtkeychain-build)
|
||||
|
||||
install(TARGETS xivlauncher
|
||||
DESTINATION "${INSTALL_BIN_PATH}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
get_target_property(QMAKE_EXE Qt6::qmake IMPORTED_LOCATION)
|
||||
get_filename_component(QT_BIN_DIR "${QMAKE_EXE}" DIRECTORY)
|
||||
|
||||
find_program(WINDEPLOYQT_ENV_SETUP qtenv2.bat HINTS "${QT_BIN_DIR}")
|
||||
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${QT_BIN_DIR}")
|
||||
|
||||
# Run windeployqt immediately after build
|
||||
add_custom_command(TARGET xivlauncher
|
||||
POST_BUILD
|
||||
COMMAND "${WINDEPLOYQT_ENV_SETUP}" && "${WINDEPLOYQT_EXECUTABLE}" \"$<TARGET_FILE:xivlauncher>\"
|
||||
)
|
||||
endif()
|
Loading…
Add table
Reference in a new issue