Skip to content

Commit 723d4b5

Browse files
authored
Improve build system configuration (#121)
Overall, the changes are syntactic cleanups, but there are some important changes: - The dependency management is now using CMake `FetchContent` instead of Git submodules. This was because it integrates better with the build system and because `FetchContent` was a newer and less familiar feature when I created the project. - Updated the toolchain configuration to match Visual Studio's default settings, particularly for the Release configuration. Previously the binaries were larger due to CMake defaults missing specific optimization flags, which resulted in unnecessary padding. - Configured the build to output artifacts (the DLLs) to the `${CMAKE_BINARY_DIR}/bin` directory, regardless of the which configuration is selected in Visual Studio.
1 parent c59f2b4 commit 723d4b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+624
-656
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
New-Item -ItemType directory -Path $packagingDir/red4ext/plugins
6666
6767
# Copy the build artifacts.
68-
Copy-Item -Path ./${{ matrix.config }}/bin/winmm.dll -Destination $packagingDir/bin/x64
69-
Copy-Item -Path ./${{ matrix.config }}/bin/RED4ext.dll -Destination $packagingDir/red4ext
68+
Copy-Item -Path ./bin/winmm.dll -Destination $packagingDir/bin/x64
69+
Copy-Item -Path ./bin/RED4ext.dll -Destination $packagingDir/red4ext
7070
7171
# Copy the license and third-party licenses.
7272
Copy-Item -Path ../LICENSE.md -Destination $packagingDir/red4ext/LICENSE.txt
@@ -83,8 +83,8 @@ jobs:
8383
New-Item -ItemType directory -Path $packagingDir/red4ext
8484
8585
# Copy the PDBs.
86-
Copy-Item -Path ./${{ matrix.config }}/bin/winmm.pdb -Destination $packagingDir/bin/x64
87-
Copy-Item -Path ./${{ matrix.config }}/bin/RED4ext.pdb -Destination $packagingDir/red4ext
86+
Copy-Item -Path ./bin/winmm.pdb -Destination $packagingDir/bin/x64
87+
Copy-Item -Path ./bin/RED4ext.pdb -Destination $packagingDir/red4ext
8888
8989
- name: Upload ZIP
9090
uses: actions/upload-artifact@v4

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
working-directory: build
3232
run: |
3333
cmake `
34-
-DRED4EXT_IS_CI_RELEASE=YES `
34+
-DRED4EXT_GIT_METADATA=YES `
3535
${{ github.workspace }}
3636
3737
- name: Build
@@ -53,8 +53,8 @@ jobs:
5353
New-Item -ItemType directory -Path $packagingDir/red4ext/plugins
5454
5555
# Copy the build artifacts.
56-
Copy-Item -Path ./${{ env.config }}/bin/winmm.dll -Destination $packagingDir/bin/x64
57-
Copy-Item -Path ./${{ env.config }}/bin/RED4ext.dll -Destination $packagingDir/red4ext
56+
Copy-Item -Path ./bin/winmm.dll -Destination $packagingDir/bin/x64
57+
Copy-Item -Path ./bin/RED4ext.dll -Destination $packagingDir/red4ext
5858
5959
# Copy the license and third-party licenses.
6060
Copy-Item -Path ../LICENSE.md -Destination $packagingDir/red4ext/LICENSE.txt
@@ -74,8 +74,8 @@ jobs:
7474
New-Item -ItemType directory -Path $packagingDir/red4ext
7575
7676
# Copy the PDBs.
77-
Copy-Item -Path ./${{ env.config }}/bin/winmm.pdb -Destination $packagingDir/bin/x64
78-
Copy-Item -Path ./${{ env.config }}/bin/RED4ext.pdb -Destination $packagingDir/red4ext
77+
Copy-Item -Path ./bin/winmm.pdb -Destination $packagingDir/bin/x64
78+
Copy-Item -Path ./bin/RED4ext.pdb -Destination $packagingDir/red4ext
7979
8080
# Create the ZIP file.
8181
7z a red4ext_${env:RED4EXT_VERSION}_pdbs.zip $packagingDir/*

0 commit comments

Comments
 (0)