build: fix CUE4Parse linking

This commit is contained in:
2026-06-18 02:23:17 -03:00
parent e732676d25
commit 3293c2081e
2 changed files with 13 additions and 21 deletions
+8 -16
View File
@@ -62,20 +62,13 @@ if (UNLOCKER_DUMPER)
set(CUE4PARSE_NATIVE_DIR "${cue4parse_SOURCE_DIR}/CUE4Parse-Natives")
add_subdirectory(${CUE4PARSE_NATIVE_DIR})
# net
set(CUE4PARSE_NET_DIR "${cue4parse_SOURCE_DIR}/CUE4Parse")
set(CUE4PARSE_OUTPUT_DIR "${CUE4PARSE_NET_DIR}/bin/$(Configuration)/net8.0")
add_custom_target(CUE4Parse-Net
COMMAND dotnet build "${CUE4PARSE_NET_DIR}/CUE4Parse.csproj"
--configuration $(Configuration)
-p:BuildNatives=false
-p:SkipNativeBuild=true
-p:CMakeExitCode=0
--output "${CUE4PARSE_OUTPUT_DIR}"
WORKING_DIRECTORY "${CUE4PARSE_NET_DIR}"
COMMENT "Building CUE4Parse"
include_external_msproject(
CUE4Parse-Net
"${cue4parse_SOURCE_DIR}/CUE4Parse/CUE4Parse.csproj"
TYPE "9A19103F-16F7-4668-BE54-9A1E7A4F7556"
PLATFORM "Any CPU"
)
add_dependencies(CUE4Parse-Net CUE4Parse-Natives)
endif()
set(SEALLIB_ASSERT ON CACHE BOOL "" FORCE)
@@ -116,9 +109,8 @@ endif()
# dumper
# ------------------------------
if (UNLOCKER_DUMPER)
include_external_msproject(hex-dumped "${CMAKE_CURRENT_SOURCE_DIR}/src/dumper/hex-dumped.csproj")
set_target_properties(hex-dumped PROPERTIES VS_PROJECT_TYPE "9A19103F-16F7-4668-BE54-9A1E7A4F7556")
add_dependencies(hex-dumped CUE4Parse-Natives CUE4Parse-Net)
include_external_msproject(hex-dumped "${CMAKE_CURRENT_SOURCE_DIR}/src/dumper/hex-dumped.csproj" TYPE "9A19103F-16F7-4668-BE54-9A1E7A4F7556")
add_dependencies(hex-dumped CUE4Parse-Net)
endif()
# ------------------------------
+4 -4
View File
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{3CC38FE8-76CA-38B5-8D90-6E68FA37A029}</ProjectGuid>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
@@ -9,9 +8,9 @@
<Platforms>x64</Platforms>
<Configurations>Debug;Release</Configurations>
<Version>1.0.0</Version>
<OutputPath>..\..\proj\$(Configuration)\</OutputPath>
<BaseIntermediateOutputPath>..\..\proj\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<BaseOutputPath>$(SolutionDir)bin\$(MSBuildProjectName)\</BaseOutputPath>
<BaseIntermediateOutputPath>$(SolutionDir)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -23,8 +22,9 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\proj\_deps\cue4parse-src\CUE4Parse\CUE4Parse.csproj">
<ProjectReference Include="$(SolutionDir)_deps\cue4parse-src\CUE4Parse\CUE4Parse.csproj">
<Project>{E3464BCC-66F1-3FBA-B83E-B064C2637900}</Project>
<Properties>BuildNatives=false;SkipNativeBuild=true;CMakeExitCode=0;Platform=AnyCPU</Properties>
</ProjectReference>
</ItemGroup>
</Project>