diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index dbe41f1fd..ff45c85fe 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -4,11 +4,6 @@ option(LLAMA_SERVER_SSL "Build SSL support for the server" OFF) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -if (MINGW) - # fix: https://github.com/ggerganov/llama.cpp/actions/runs/9651004652/job/26617901362?pr=8006 - add_compile_definitions(_WIN32_WINNT=${GGML_WIN_VER}) -endif() - set(TARGET_SRCS server.cpp utils.hpp @@ -58,6 +53,7 @@ if (LLAMA_SERVER_SSL) endif() if (WIN32) + add_compile_definitions(-D_WIN32_WINNT=${GGML_WIN_VER} -DWINVER=${GGML_WIN_VER}) TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32) endif() diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index 425a25895..a29a1e883 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -1208,9 +1208,8 @@ if (GGML_CUDA) add_compile_options("$<$:${CUDA_FLAGS}>") endif() -if (MINGW) - # Target Windows 8 for PrefetchVirtualMemory - add_compile_definitions(_WIN32_WINNT=${GGML_WIN_VER}) +if (WIN32) + add_compile_definitions(-D_WIN32_WINNT=${GGML_WIN_VER} -DWINVER=${GGML_WIN_VER}) endif() #