Manifest embedding isn't working as expected with dpiAwareness
Using CMake 3.12 and Ninja bundled with Visual Studio Community 15.9.4.
Using the following myapp.manifest:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
</assembly>
If I let CMake try to embed it by listing it with executable source files:
add_executable( myapp WIN32 myapp.cpp myapp.manifest )
The app isn't acting like it's DPI-aware. However, if I specify the following linker options myself:
target_link_libraries( myapp -manifest:embed -manifestinput:"${PROJECT_SOURCE_DIR}/myapp.manifest" )
Then the app successfully links and runs with the specified dpiAwareness.
Edited by Craig Scott