Commit 09a0352
authored
build(win): only pass /MANIFEST:NO to MSVC (#5129)
Fixes #5124
`fancy_add_executable()` currently adds the Windows manifest resource
file for all
`WIN32` builds, but it also unconditionally passes `/MANIFEST:NO` to the
linker.
That switch is MSVC-specific, so MinGW ends up forwarding it to `ld` as
a path
and the executable link fails.
This change keeps embedding `src/windows/oiio_exe.rc` for all Windows
toolchains,
but only adds `/MANIFEST:NO` when the build is using MSVC.
That preserves the intended long-path manifest behavior from #5066 while
letting
MinGW link the Windows executables again.
Assisted-by: Codex / GPT-5
Tests:
- Ran a targeted CMake smoke test that configures a dummy executable
with
`WIN32=TRUE,MSVC=TRUE` and verified that `/MANIFEST:NO` is present in
`LINK_OPTIONS` and the `.rc` file is attached as a source.
- Ran the same smoke test with `WIN32=TRUE,MSVC=FALSE` and verified that
the
`.rc` file is still attached but `/MANIFEST:NO` is not added.
- I could not run an actual MinGW build locally in this environment
because a
MinGW toolchain is not installed here.
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>1 parent 7355728 commit 09a0352
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
0 commit comments