process cases of ALT as special rules
This commit is contained in:
@@ -6,6 +6,32 @@ Though this project do has a .vcxproj file,
|
||||
you can only edit but not compile in visul studio.
|
||||
Currently you can only compile this lib via Clang and cmake.
|
||||
|
||||
## Build output and managed deployment
|
||||
|
||||
From the repository root:
|
||||
|
||||
```powershell
|
||||
cmake --preset clang-debug -S src/Nitload.Native
|
||||
cmake --build cmake_build/clang-debug --target Nitload.Native
|
||||
```
|
||||
|
||||
CMake writes `Nitload.Native.dll` and its linker PDB to `bin/win-x64` on Windows x64
|
||||
(Linux uses `bin/linux-x64/libNitload.Native.so`). Debug and release presets currently
|
||||
share this platform directory; the most recent native build is the deployed version.
|
||||
`NIF_BUILD_OUTPUT_DIR` can override the destination. Managed builds pass their expected
|
||||
RID as `NIF_EXPECTED_RID` so an incompatible native target is rejected before deployment.
|
||||
|
||||
`StgSharpDebug.csproj` enables `BuildNativeBeforeManaged` and `RequireNativeLibrary`.
|
||||
Its build runs the incremental CMake build (`clang-debug` for Debug, `clang-release`
|
||||
otherwise), then deploys the native library to the executable's actual `TargetDir`.
|
||||
Other managed projects copy an existing native artifact without invoking CMake.
|
||||
Managed-output staging never copies deployed native files back over the CMake artifact.
|
||||
|
||||
To use a prebuilt native artifact, pass `-p:BuildNativeBeforeManaged=false`. A matching
|
||||
Clang/Ninja environment and the local GLFW static library are required for native builds.
|
||||
Cross-target builds require a matching toolchain/preset; changing a managed platform alone
|
||||
does not cross-compile the C library.
|
||||
|
||||
## Code Layout
|
||||
|
||||
Conventions:
|
||||
|
||||
Reference in New Issue
Block a user