File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ macro (fancy_add_executable)
4444 check_is_enabled (${_target_NAME} _target_NAME_enabled)
4545 if (_target_NAME_enabled)
4646 add_executable (${_target_NAME} ${_target_SRC} )
47+ if (WIN32 )
48+ # Disable default manifest generation to avoid conflicts.
49+ target_link_options (${_target_NAME} PRIVATE "/MANIFEST:NO" )
50+ # Include Windows resource file, which will in turn embed our exe manifest.
51+ target_sources (${_target_NAME} PRIVATE "${PROJECT_SOURCE_DIR} /src/windows/oiio_exe.rc" )
52+ endif ()
4753 target_include_directories (${_target_NAME} PRIVATE ${_target_INCLUDE_DIRS} )
4854 target_include_directories (${_target_NAME} SYSTEM PRIVATE ${_target_SYSTEM_INCLUDE_DIRS} )
4955 target_compile_definitions (${_target_NAME} PRIVATE
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" standalone =" yes" ?>
2+ <assembly xmlns =" urn:schemas-microsoft-com:asm.v1" manifestVersion =" 1.0" >
3+ <trustInfo xmlns =" urn:schemas-microsoft-com:asm.v3" >
4+ <security >
5+ <requestedPrivileges >
6+ <requestedExecutionLevel level =" asInvoker" uiAccess =" false" ></requestedExecutionLevel >
7+ </requestedPrivileges >
8+ </security >
9+ </trustInfo >
10+ <application xmlns =" urn:schemas-microsoft-com:asm.v3" >
11+ <windowsSettings xmlns : ws2 =" http://schemas.microsoft.com/SMI/2016/WindowsSettings" >
12+ <ws2 : longPathAware >true</ws2 : longPathAware >
13+ </windowsSettings >
14+ </application >
15+ </assembly >
Original file line number Diff line number Diff line change 1+ // Resource script for OIIO EXEs.
2+
3+ // The value is invariant, so should be safe to hardcode, but we could replace
4+ // 24 with `RT_MANIFEST` by adding `#include "winres.h"` first.
5+ // Reference: https://learn.microsoft.com/en-us/windows/win32/menurc/user-defined-resource
6+ 1 24 "oiio_exe.manifest"
You can’t perform that action at this time.
0 commit comments