Fix CMake build issues after enabling manifest from rc file

This commit is contained in:
Maarten Bent 2023-08-24 15:53:00 +02:00
parent 10d09ec2b2
commit 026528f861
No known key found for this signature in database
GPG key ID: 58AAEE3F4A4FD070
2 changed files with 10 additions and 3 deletions

View file

@ -801,7 +801,11 @@ function(wx_add name group)
add_executable(${target_name} ${exe_type} ${src_files})
if (DEFINED wxUSE_DPI_AWARE_MANIFEST_VALUE)
set_target_properties(${target_name} PROPERTIES LINK_FLAGS "/MANIFEST:NO")
if(MSVC)
# Manifest is included via .rc file.
# Disable the default manifest added by CMake to prevent dupicate manifest error.
set_target_properties(${target_name} PROPERTIES LINK_FLAGS "/MANIFEST:NO")
endif()
target_compile_definitions(${target_name} PRIVATE wxUSE_DPI_AWARE_MANIFEST=${wxUSE_DPI_AWARE_MANIFEST_VALUE})
endif()
endif()