From 1c3e9ee80e754938070eb2736f0af03f84734fa0 Mon Sep 17 00:00:00 2001 From: Hjalte Sorgenfrei Mac Dalland Date: Thu, 16 Feb 2023 11:44:11 +0100 Subject: [PATCH] Build windows as in the good old days --- .github/workflows/windows_build.yml | 4 ++-- CMakeLists.txt | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 98a8405..82430db 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -31,14 +31,14 @@ jobs: run: cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S${{github.workspace}} -B${{github.workspace}}/build -G "Visual Studio 17 2022" -T host=x64 -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - name: Build - run: cmake --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: Archive Release uses: thedoctor0/zip-release@main with: type: 'zip' filename: 'windows-x64-release.zip' - path: ${{github.workspace}}/build/Release/bin + path: ${{github.workspace}}/build/Release - name: Upload Release uses: marvinpinto/action-automatic-releases@v1.2.1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 54caaac..ea70d14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,10 +11,7 @@ if(MSVC) if (NOT CMAKE_BUILD_TYPE) # Assume debug if dont have specified. Makes it work for vscode. set(CMAKE_BUILD_TYPE "Debug") endif() - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${CMAKE_BUILD_TYPE}/lib) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${CMAKE_BUILD_TYPE}/lib) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${CMAKE_BUILD_TYPE}/bin) - set(BUILD_OUTPUT_PATH ${CMAKE_BINARY_DIR}/build/${CMAKE_BUILD_TYPE}/bin) + set(BUILD_OUTPUT_PATH ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}) else() set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)