Commit 96ec4d98 for whisper.cpp

commit 96ec4d9823e9d0211944172da35f9f29134af990
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Date:   Mon Nov 23 11:11:53 2026 +0100

    ggml : revert 5922450fbce (#4200)

    This commit reverts the ggml part of Commit
    5922450fbce1ed9d1648babd0d5ac4520055b436 ("cmake : propagate
    deprecated options and fix math library check on Windows (#4168)").

    The motivation for this is that I should have pushed back on this
    change, the ggml change that is and asked for this to be applied in
    llama.cpp instead. The reason for reverting this is that it is
    currently preventing us from releasing whisper.cpp as the release check
    if failing:
    https://github.com/ggml-org/whisper.cpp/actions/runs/44767860506/job/136397241243#step:4:22

    I'll open a PR for this change in llama.cpp after this has.

    Refs: https://github.com/ggml-org/whisper.cpp/pull/4168
    Refs: https://github.com/ggml-org/llama.cpp/pull/32864

diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt
index 109363d4..5ff78f24 100644
--- a/ggml/src/CMakeLists.txt
+++ b/ggml/src/CMakeLists.txt
@@ -621,7 +621,7 @@ endforeach()

 target_link_libraries(ggml-base PRIVATE Threads::Threads)

-if (MATH_LIBRARY)
+if (DEFINED MATH_LIBRARY)
     target_link_libraries(ggml-base PRIVATE ${MATH_LIBRARY})
 elseif (NOT WIN32 AND NOT DEFINED ENV{ONEAPI_ROOT})
     target_link_libraries(ggml-base PRIVATE m)