Commit 67e9424
committed
Improve library dependencies for Windows builds
Due to a change in MSYS2, Boost::locale now links statically by default,
which in turn causes CMake not to find the dynamically linked DLLs for
ICU during packaging of the release build. Setting Boost_USE_STATIC_LIBS
forces dynamic linking of Boost::locale and assumes that the DLLs for
ICU can be found at the same path as those for Boost::locale during
packaging of the release build.
Use CMake's LOCATION property to retrieve the location of dependencies
that are IMPORTED targets. This will still be problematic for static
dependencies that themselves have DLLs as dependencies but there doesn't
appear to be an elegant CMake solution to address this.
The $<PATH:GET_PARENT_PATH,...> generator requires CMake >=3.24 which is
fine because Windows release builds already assume a very up-to-date
build environment.
Exclude the C/C++ runtime from the runtime dependency set of library
targets to avoid ambiguity if multiple C/C++ toolchains are available.
Instead, let windeployqt be fully responsible for providing the C/C++
runtime.1 parent e219acc commit 67e9424
2 files changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
| 251 | + | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
267 | | - | |
| 268 | + | |
268 | 269 | | |
269 | | - | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
417 | | - | |
| 416 | + | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
| 429 | + | |
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
432 | | - | |
| 433 | + | |
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| |||
0 commit comments