[Git][wxwidgets/wxwidgets][master] 4 commits: Fix CMake build issues after enabling manifest from rc file

60 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Aug 24, 2023, 11:39:38 AM8/24/23
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 026528f8
    by Maarten Bent at 2023-08-24T16:26:47+02:00
    Fix CMake build issues after enabling manifest from rc file
    
  • 38504aca
    by Maarten Bent at 2023-08-24T16:28:39+02:00
    Don't ignore CMake files for msw clang build in CI
    
  • a5621953
    by Vadim Zeitlin at 2023-08-24T17:24:07+02:00
    Don't embed manifest in GUI test MSVS project neither
    
    This is similar to f6255e456b (Don't embed default manifest in minimal
    samples MSVC project, 2023-08-24) but for the GUI test, which was also
    broken by 5d630caabd (Make it enough to predefine only
    wxUSE_DPI_AWARE_MANIFEST, 2023-08-23).
    
  • 1d50fa52
    by Vadim Zeitlin at 2023-08-24T17:25:50+02:00
    Merge branch 'cmake-manifest' of https://github.com/MaartenBent/wxWidgets
    
    Really fix CMake build after the changes of 5d630caabd (Make it enough
    to predefine only wxUSE_DPI_AWARE_MANIFEST, 2023-08-23).
    
    See #23810.
    

5 changed files:

Changes:

  • .github/workflows/ci_msw.yml
    ... ... @@ -13,7 +13,6 @@ on:
    13 13
           - '.github/workflows/ci_mac.yml'
    
    14 14
           - '.github/workflows/ci_msw_cross.yml'
    
    15 15
           - '.github/workflows/docs_update.yml'
    
    16
    -      - 'build/cmake/**'
    
    17 16
           - 'build/tools/appveyor*.bat'
    
    18 17
           - 'distrib/**'
    
    19 18
           - 'docs/**'
    
    ... ... @@ -25,7 +24,6 @@ on:
    25 24
           - 'src/osx/**'
    
    26 25
           - '*.md'
    
    27 26
           - '*.yml'
    
    28
    -      - 'CMakeLists.txt'
    
    29 27
       pull_request:
    
    30 28
         branches:
    
    31 29
           - master
    
    ... ... @@ -37,7 +35,6 @@ on:
    37 35
           - '.github/workflows/ci_mac.yml'
    
    38 36
           - '.github/workflows/ci_msw_cross.yml'
    
    39 37
           - '.github/workflows/docs_update.yml'
    
    40
    -      - 'build/cmake/**'
    
    41 38
           - 'build/tools/appveyor*.bat'
    
    42 39
           - 'distrib/**'
    
    43 40
           - 'docs/**'
    
    ... ... @@ -49,7 +46,6 @@ on:
    49 46
           - 'src/osx/**'
    
    50 47
           - '*.md'
    
    51 48
           - '*.yml'
    
    52
    -      - 'CMakeLists.txt'
    
    53 49
     
    
    54 50
     concurrency:
    
    55 51
       group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
    

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

  • samples/minimal/CMakeLists.txt
    ... ... @@ -46,7 +46,7 @@ set(SRC_FILES
    46 46
         )
    
    47 47
     
    
    48 48
     if(WIN32)
    
    49
    -    # Include a RC file for windows
    
    49
    +    # Include a RC file for windows, for icon and manifest
    
    50 50
         list(APPEND SRC_FILES ../sample.rc)
    
    51 51
     elseif(APPLE)
    
    52 52
         # Add an icon for the apple .app file
    
    ... ... @@ -58,7 +58,10 @@ add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE ${SRC_FILES})
    58 58
     # Link required libraries to the executable
    
    59 59
     target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES})
    
    60 60
     
    
    61
    -if(APPLE)
    
    61
    +if(MSVC)
    
    62
    +    # Prevent duplicate manifest, it is already added via sample.rc
    
    63
    +    set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/MANIFEST:NO")
    
    64
    +elseif(APPLE)
    
    62 65
         set_target_properties(${PROJECT_NAME} PROPERTIES
    
    63 66
             RESOURCE "../../src/osx/carbon/wxmac.icns"
    
    64 67
             MACOSX_BUNDLE_ICON_FILE wxmac.icns
    

  • tests/test.vcxproj
    ... ... @@ -104,27 +104,35 @@
    104 104
       </PropertyGroup>
    
    105 105
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    
    106 106
         <LinkIncremental>true</LinkIncremental>
    
    107
    +    <EmbedManifest>false</EmbedManifest>
    
    107 108
       </PropertyGroup>
    
    108 109
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    
    109 110
         <LinkIncremental>false</LinkIncremental>
    
    111
    +    <EmbedManifest>false</EmbedManifest>
    
    110 112
       </PropertyGroup>
    
    111 113
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
    
    112 114
         <LinkIncremental>true</LinkIncremental>
    
    115
    +    <EmbedManifest>false</EmbedManifest>
    
    113 116
       </PropertyGroup>
    
    114 117
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
    
    115 118
         <LinkIncremental>false</LinkIncremental>
    
    119
    +    <EmbedManifest>false</EmbedManifest>
    
    116 120
       </PropertyGroup>
    
    117 121
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    
    118 122
         <LinkIncremental>true</LinkIncremental>
    
    123
    +    <EmbedManifest>false</EmbedManifest>
    
    119 124
       </PropertyGroup>
    
    120 125
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    
    121 126
         <LinkIncremental>false</LinkIncremental>
    
    127
    +    <EmbedManifest>false</EmbedManifest>
    
    122 128
       </PropertyGroup>
    
    123 129
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
    
    124 130
         <LinkIncremental>true</LinkIncremental>
    
    131
    +    <EmbedManifest>false</EmbedManifest>
    
    125 132
       </PropertyGroup>
    
    126 133
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
    
    127 134
         <LinkIncremental>false</LinkIncremental>
    
    135
    +    <EmbedManifest>false</EmbedManifest>
    
    128 136
       </PropertyGroup>
    
    129 137
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    
    130 138
         <Midl>
    
    ... ... @@ -165,9 +173,7 @@
    165 173
         <Bscmake>
    
    166 174
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    167 175
         </Bscmake>
    
    168
    -    <Manifest>
    
    169
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    170
    -    </Manifest>
    
    176
    +    <Manifest />
    
    171 177
       </ItemDefinitionGroup>
    
    172 178
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    
    173 179
         <Midl>
    
    ... ... @@ -208,9 +214,7 @@
    208 214
         <Bscmake>
    
    209 215
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    210 216
         </Bscmake>
    
    211
    -    <Manifest>
    
    212
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    213
    -    </Manifest>
    
    217
    +    <Manifest />
    
    214 218
       </ItemDefinitionGroup>
    
    215 219
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
    
    216 220
         <Midl>
    
    ... ... @@ -251,9 +255,7 @@
    251 255
         <Bscmake>
    
    252 256
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    253 257
         </Bscmake>
    
    254
    -    <Manifest>
    
    255
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    256
    -    </Manifest>
    
    258
    +    <Manifest />
    
    257 259
       </ItemDefinitionGroup>
    
    258 260
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
    
    259 261
         <Midl>
    
    ... ... @@ -294,9 +296,7 @@
    294 296
         <Bscmake>
    
    295 297
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    296 298
         </Bscmake>
    
    297
    -    <Manifest>
    
    298
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    299
    -    </Manifest>
    
    299
    +    <Manifest />
    
    300 300
       </ItemDefinitionGroup>
    
    301 301
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    
    302 302
         <Midl>
    
    ... ... @@ -337,9 +337,7 @@
    337 337
         <Bscmake>
    
    338 338
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    339 339
         </Bscmake>
    
    340
    -    <Manifest>
    
    341
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    342
    -    </Manifest>
    
    340
    +    <Manifest />
    
    343 341
       </ItemDefinitionGroup>
    
    344 342
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    
    345 343
         <Midl>
    
    ... ... @@ -380,9 +378,7 @@
    380 378
         <Bscmake>
    
    381 379
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    382 380
         </Bscmake>
    
    383
    -    <Manifest>
    
    384
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    385
    -    </Manifest>
    
    381
    +    <Manifest />
    
    386 382
       </ItemDefinitionGroup>
    
    387 383
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
    
    388 384
         <Midl>
    
    ... ... @@ -423,9 +419,7 @@
    423 419
         <Bscmake>
    
    424 420
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    425 421
         </Bscmake>
    
    426
    -    <Manifest>
    
    427
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    428
    -    </Manifest>
    
    422
    +    <Manifest />
    
    429 423
       </ItemDefinitionGroup>
    
    430 424
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
    
    431 425
         <Midl>
    
    ... ... @@ -466,9 +460,7 @@
    466 460
         <Bscmake>
    
    467 461
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    468 462
         </Bscmake>
    
    469
    -    <Manifest>
    
    470
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    471
    -    </Manifest>
    
    463
    +    <Manifest />
    
    472 464
       </ItemDefinitionGroup>
    
    473 465
       <ItemGroup>
    
    474 466
         <ClCompile Include="any\anytest.cpp" />
    
    ... ... @@ -571,4 +563,4 @@
    571 563
       <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    
    572 564
       <ImportGroup Label="ExtensionTargets">
    
    573 565
       </ImportGroup>
    
    574
    -</Project>
    566
    +</Project>
    \ No newline at end of file

  • tests/test_gui.vcxproj
    ... ... @@ -103,27 +103,35 @@
    103 103
       </PropertyGroup>
    
    104 104
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    
    105 105
         <LinkIncremental>true</LinkIncremental>
    
    106
    +    <EmbedManifest>false</EmbedManifest>
    
    106 107
       </PropertyGroup>
    
    107 108
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    
    108 109
         <LinkIncremental>false</LinkIncremental>
    
    110
    +    <EmbedManifest>false</EmbedManifest>
    
    109 111
       </PropertyGroup>
    
    110 112
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
    
    111 113
         <LinkIncremental>true</LinkIncremental>
    
    114
    +    <EmbedManifest>false</EmbedManifest>
    
    112 115
       </PropertyGroup>
    
    113 116
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
    
    114 117
         <LinkIncremental>false</LinkIncremental>
    
    118
    +    <EmbedManifest>false</EmbedManifest>
    
    115 119
       </PropertyGroup>
    
    116 120
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    
    117 121
         <LinkIncremental>true</LinkIncremental>
    
    122
    +    <EmbedManifest>false</EmbedManifest>
    
    118 123
       </PropertyGroup>
    
    119 124
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    
    120 125
         <LinkIncremental>false</LinkIncremental>
    
    126
    +    <EmbedManifest>false</EmbedManifest>
    
    121 127
       </PropertyGroup>
    
    122 128
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
    
    123 129
         <LinkIncremental>true</LinkIncremental>
    
    130
    +    <EmbedManifest>false</EmbedManifest>
    
    124 131
       </PropertyGroup>
    
    125 132
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
    
    126 133
         <LinkIncremental>false</LinkIncremental>
    
    134
    +    <EmbedManifest>false</EmbedManifest>
    
    127 135
       </PropertyGroup>
    
    128 136
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    
    129 137
         <Midl>
    
    ... ... @@ -164,9 +172,7 @@
    164 172
         <Bscmake>
    
    165 173
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    166 174
         </Bscmake>
    
    167
    -    <Manifest>
    
    168
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    169
    -    </Manifest>
    
    175
    +    <Manifest />
    
    170 176
       </ItemDefinitionGroup>
    
    171 177
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    
    172 178
         <Midl>
    
    ... ... @@ -207,9 +213,7 @@
    207 213
         <Bscmake>
    
    208 214
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    209 215
         </Bscmake>
    
    210
    -    <Manifest>
    
    211
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    212
    -    </Manifest>
    
    216
    +    <Manifest />
    
    213 217
       </ItemDefinitionGroup>
    
    214 218
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
    
    215 219
         <Midl>
    
    ... ... @@ -250,9 +254,7 @@
    250 254
         <Bscmake>
    
    251 255
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    252 256
         </Bscmake>
    
    253
    -    <Manifest>
    
    254
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    255
    -    </Manifest>
    
    257
    +    <Manifest />
    
    256 258
       </ItemDefinitionGroup>
    
    257 259
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
    
    258 260
         <Midl>
    
    ... ... @@ -293,9 +295,7 @@
    293 295
         <Bscmake>
    
    294 296
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    295 297
         </Bscmake>
    
    296
    -    <Manifest>
    
    297
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    298
    -    </Manifest>
    
    298
    +    <Manifest />
    
    299 299
       </ItemDefinitionGroup>
    
    300 300
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    
    301 301
         <Midl>
    
    ... ... @@ -336,9 +336,7 @@
    336 336
         <Bscmake>
    
    337 337
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    338 338
         </Bscmake>
    
    339
    -    <Manifest>
    
    340
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    341
    -    </Manifest>
    
    339
    +    <Manifest />
    
    342 340
       </ItemDefinitionGroup>
    
    343 341
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    
    344 342
         <Midl>
    
    ... ... @@ -379,9 +377,7 @@
    379 377
         <Bscmake>
    
    380 378
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    381 379
         </Bscmake>
    
    382
    -    <Manifest>
    
    383
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    384
    -    </Manifest>
    
    380
    +    <Manifest />
    
    385 381
       </ItemDefinitionGroup>
    
    386 382
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
    
    387 383
         <Midl>
    
    ... ... @@ -422,9 +418,7 @@
    422 418
         <Bscmake>
    
    423 419
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    424 420
         </Bscmake>
    
    425
    -    <Manifest>
    
    426
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    427
    -    </Manifest>
    
    421
    +    <Manifest />
    
    428 422
       </ItemDefinitionGroup>
    
    429 423
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
    
    430 424
         <Midl>
    
    ... ... @@ -465,9 +459,7 @@
    465 459
         <Bscmake>
    
    466 460
           <SuppressStartupBanner>true</SuppressStartupBanner>
    
    467 461
         </Bscmake>
    
    468
    -    <Manifest>
    
    469
    -      <AdditionalManifestFiles>./../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
    
    470
    -    </Manifest>
    
    462
    +    <Manifest />
    
    471 463
       </ItemDefinitionGroup>
    
    472 464
       <ItemGroup>
    
    473 465
         <ClCompile Include="asserthelper.cpp" />
    
    ... ... @@ -590,4 +582,4 @@
    590 582
       <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    
    591 583
       <ImportGroup Label="ExtensionTargets">
    
    592 584
       </ImportGroup>
    
    593
    -</Project>
    585
    +</Project>
    \ No newline at end of file


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help

Reply all
Reply to author
Forward
0 new messages