Fix compile for Release and Debug in Windows

This commit is contained in:
SimoneN64
2024-09-03 23:03:36 +02:00
parent 2daeb549a2
commit 226684ed51
3 changed files with 33 additions and 3 deletions

View File

@@ -30,3 +30,35 @@ jobs:
name: kaizen-linux name: kaizen-linux
path: upload path: upload
if-no-files-found: error if-no-files-found: error
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
with:
submodules: recursive
- name: Setup dependencies
run: |
vcpkg install sdl2[vulkan]:x64-windows
- name: Setup Qt
uses: jurplel/install-qt-action@v3
with:
arch: win64_msvc2019_64
version: 6.6.*
- name: Build Kaizen
run: |
cmake -B build -T clangcl -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
- name: Collect artifacts
run: |
mkdir upload
cp build/src/frontend/Release/kaizen-qt.exe upload
mkdir upload/resources
cp resources/* upload/resources
cp build/src/frontend/Release/SDL2.dll upload
windeployqt --dir upload upload/kaizen-qt.exe
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: kaizen-windows
path: upload
if-no-files-found: error

View File

@@ -49,9 +49,6 @@ add_library(parallel-rdp
if(WIN32) if(WIN32)
target_compile_definitions(parallel-rdp PUBLIC VK_USE_PLATFORM_WIN32_KHR) target_compile_definitions(parallel-rdp PUBLIC VK_USE_PLATFORM_WIN32_KHR)
if(MSVC)
target_compile_options(parallel-rdp PUBLIC /EHa)
endif()
else() else()
target_link_libraries(parallel-rdp PUBLIC dl) target_link_libraries(parallel-rdp PUBLIC dl)
endif() endif()

View File

@@ -42,6 +42,7 @@ include_directories(
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF) option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF)
option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." OFF) option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." OFF)
option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." OFF) option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." OFF)
option(BUILD_SHARED_LIBS OFF)
add_subdirectory(../../external/discord_rpc discord_rpc) add_subdirectory(../../external/discord_rpc discord_rpc)
add_subdirectory(../../external/json json) add_subdirectory(../../external/json json)