diff options
| author | tony mancill <tmancill@debian.org> | 2026-05-04 20:56:26 -0700 |
|---|---|---|
| committer | tony mancill <tmancill@debian.org> | 2026-05-04 20:56:26 -0700 |
| commit | 968f87a8adf2eadd3a7f4b5000dac88ab0f7dc57 (patch) | |
| tree | f824c17c62d6d03f9348b51a3ae85256492a8814 /CMake | |
| parent | c23b939ac13a16e4fa8861a5d2e3053b4d90b512 (diff) | |
| parent | 35a0b17a46923a56ca7f6dc649868609815c70b1 (diff) | |
Merge branch 'debian/latest' into debian/trixie-backports
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/Modules/FindFFTW3.cmake | 36 | ||||
| -rw-r--r-- | CMake/Modules/wsjtx-manifest.rc.in | 5 |
2 files changed, 34 insertions, 7 deletions
diff --git a/CMake/Modules/FindFFTW3.cmake b/CMake/Modules/FindFFTW3.cmake index 999c2ffe..7264f582 100644 --- a/CMake/Modules/FindFFTW3.cmake +++ b/CMake/Modules/FindFFTW3.cmake @@ -64,14 +64,36 @@ foreach (_comp ${_components}) endif (_comp STREQUAL "single") endforeach (_comp ${_components}) -# If using threads, we need to link against threaded libraries as well - except on Windows. -if (NOT WIN32 AND _use_threads) +# If using threads, link against threaded libraries when they exist as +# separate files. Linux/macOS always ship threads separately. On Windows +# this depends on the toolchain: MSYS2 (used by CI) ships fftw3f_threads +# as a separate import library, but the official fftw.org prebuilt DLLs +# bundle threads into the main library — there is no separate file. Probe +# for the separate library and only add it to the link list if found, so +# both Windows toolchains link correctly without an environment-aware +# switch. +if (_use_threads) set (_thread_libs) - foreach (_lib ${_libraries}) - list (APPEND _thread_libs ${_lib}_threads) - endforeach (_lib ${_libraries}) - set (_libraries ${_thread_libs} ${_libraries}) -endif (NOT WIN32 AND _use_threads) + if (WIN32) + foreach (_lib ${_libraries}) + find_library (_${_lib}_threads_path + NAMES ${_lib}_threads ${_lib}_threads-3 + HINTS ${FFTW3_ROOT_DIR} + PATH_SUFFIXES lib) + if (_${_lib}_threads_path) + list (APPEND _thread_libs ${_lib}_threads) + endif () + mark_as_advanced (_${_lib}_threads_path) + endforeach (_lib ${_libraries}) + else (WIN32) + foreach (_lib ${_libraries}) + list (APPEND _thread_libs ${_lib}_threads) + endforeach (_lib ${_libraries}) + endif (WIN32) + if (_thread_libs) + set (_libraries ${_thread_libs} ${_libraries}) + endif () +endif (_use_threads) # Keep a list of variable names that we need to pass on to # find_package_handle_standard_args(). diff --git a/CMake/Modules/wsjtx-manifest.rc.in b/CMake/Modules/wsjtx-manifest.rc.in new file mode 100644 index 00000000..8a366085 --- /dev/null +++ b/CMake/Modules/wsjtx-manifest.rc.in @@ -0,0 +1,5 @@ +// Resource script that embeds wsjtx.exe.manifest into the executable +// as resource ID 1, type RT_MANIFEST (24). Configured at CMake time +// so the path to the manifest is absolute regardless of the windres +// working directory. +1 24 "@WSJTX_MANIFEST_PATH@" |
