From 226684ed512db68fadaa74bdb533fc5b78c0aabe Mon Sep 17 00:00:00 2001 From: SimoneN64 Date: Tue, 3 Sep 2024 23:03:36 +0200 Subject: [PATCH] Fix compile for Release and Debug in Windows --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++ external/parallel-rdp/CMakeLists.txt | 3 --- src/frontend/CMakeLists.txt | 1 + 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 355c6c86..1e54cfd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,4 +29,36 @@ jobs: with: name: kaizen-linux path: upload + 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 \ No newline at end of file diff --git a/external/parallel-rdp/CMakeLists.txt b/external/parallel-rdp/CMakeLists.txt index c482bc76..14a7615f 100644 --- a/external/parallel-rdp/CMakeLists.txt +++ b/external/parallel-rdp/CMakeLists.txt @@ -49,9 +49,6 @@ add_library(parallel-rdp if(WIN32) target_compile_definitions(parallel-rdp PUBLIC VK_USE_PLATFORM_WIN32_KHR) - if(MSVC) - target_compile_options(parallel-rdp PUBLIC /EHa) - endif() else() target_link_libraries(parallel-rdp PUBLIC dl) endif() diff --git a/src/frontend/CMakeLists.txt b/src/frontend/CMakeLists.txt index 0b840e48..56676514 100644 --- a/src/frontend/CMakeLists.txt +++ b/src/frontend/CMakeLists.txt @@ -42,6 +42,7 @@ include_directories( option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF) option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." 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/json json)