Skip to content

Commit

Permalink
Better premake support for Visual Studio
Browse files Browse the repository at this point in the history
* Add a "windows_runtime=dynamic_release" option for Unreal
* Enable parallel building

Diffs=
66d9f1725 Better premake support for Visual Studio (#7779)

Co-authored-by: Chris Dalton <[email protected]>
  • Loading branch information
csmartdalton and csmartdalton committed Aug 8, 2024
1 parent 725788d commit 5b70b81
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f0da6a7a097a782df5839390097254bbfb8d9a00
66d9f1725eca90876a29f029de002b2a4f919a19
4 changes: 2 additions & 2 deletions build/build_rive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ case "$RIVE_BUILD_SYSTEM" in
for TARGET in $@; do
MSVC_TARGETS="$MSVC_TARGETS -t:$TARGET"
done
echo msbuild.exe "./$RIVE_OUT/rive.sln" -p:UseMultiToolTask=true -m:$NUM_CORES $MSVC_TARGETS
msbuild.exe "./$RIVE_OUT/rive.sln" -p:UseMultiToolTask=true -m:$NUM_CORES $MSVC_TARGETS
echo msbuild.exe "./$RIVE_OUT/rive.sln" $MSVC_TARGETS
msbuild.exe "./$RIVE_OUT/rive.sln" $MSVC_TARGETS
;;
*)
echo "Unsupported buildsystem $RIVE_BUILD_SYSTEM"
Expand Down
12 changes: 12 additions & 0 deletions build/rive_build_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ newoption({
{ 'static', 'Use static runtime' },
{ 'dynamic', 'Use dynamic runtime' },
{ 'dynamic_debug', 'Use dynamic runtime force debug' },
{ 'dynamic_release', 'Use dynamic runtime force release' },
},
default = 'default',
})
Expand Down Expand Up @@ -196,6 +197,12 @@ do
runtime('Debug')
end

filter({ 'system:windows', 'options:windows_runtime=dynamic_release' })
do
staticruntime('off')
runtime('Release')
end

filter('system:windows')
do
architecture('x64')
Expand Down Expand Up @@ -285,6 +292,11 @@ do
})
end

filter({ 'action:vs2022' })
do
flags({ 'MultiProcessorCompile' })
end

filter({})

-- Don't use filter() here because we don't want to generate the "android_ndk" toolset if not
Expand Down

0 comments on commit 5b70b81

Please sign in to comment.