fix Qt error

This commit is contained in:
Putta Khunchalee 2022-06-07 17:29:34 +07:00
parent c7f5e79037
commit 94a63991e5
2 changed files with 24 additions and 16 deletions

View File

@ -53,6 +53,10 @@ jobs:
uses: actions/checkout@v3
with:
lfs: true
- name: Install Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install -y qt5-default
- name: Run CMake
run: cmake -B _Build/_Linux -S source -D CMAKE_BUILD_TYPE=Release -D KYTY_FINAL=1
- name: Build

View File

@ -45,28 +45,32 @@ endif()
add_dependencies(launcher KytyGitVersion)
find_program(QT_WINDEPLOYQT NAMES windeployqt PATHS "${Qt5_DIR}/../../../bin")
if(NOT QT_WINDEPLOYQT)
message(FATAL_ERROR "Could not find windeployqt")
endif()
set(launcher_name "launcher")
set_target_properties(launcher PROPERTIES OUTPUT_NAME ${launcher_name})
install(TARGETS launcher DESTINATION .)
install(CODE "
execute_process(
COMMAND ${QT_WINDEPLOYQT} \"\${CMAKE_INSTALL_PREFIX}/${launcher_name}.exe\"
--no-svg
--no-angle
--no-opengl
--no-opengl-sw
--no-system-d3d-compiler
--no-translations
)
")
if(WIN32)
find_program(QT_WINDEPLOYQT NAMES windeployqt PATHS "${Qt5_DIR}/../../../bin")
if(NOT QT_WINDEPLOYQT)
message(FATAL_ERROR "Could not find windeployqt")
endif()
install(CODE "
execute_process(
COMMAND ${QT_WINDEPLOYQT} \"\${CMAKE_INSTALL_PREFIX}/${launcher_name}.exe\"
--no-svg
--no-angle
--no-opengl
--no-opengl-sw
--no-system-d3d-compiler
--no-translations
)
")
endif()
qt5_create_translation(QM_FILES ${launcher_src} ${launcher_forms} ${launcher_ts} OPTIONS -I ${CMAKE_SOURCE_DIR}/launcher/include)