diff --git a/src/native/external/zlib.cmake b/src/native/external/zlib.cmake index b08d2574df6746..862e10118cd72c 100644 --- a/src/native/external/zlib.cmake +++ b/src/native/external/zlib.cmake @@ -31,7 +31,7 @@ set(ZLIB_SOURCES_BASE # enable custom zlib allocator add_definitions(-DMY_ZCALLOC) -if(CLR_CMAKE_HOST_WIN32) +if(HOST_WIN32 OR CLR_CMAKE_TARGET_WIN32) set(ZLIB_SOURCES_BASE ${ZLIB_SOURCES_BASE} ../../libs/System.IO.Compression.Native/zlib_allocator_win.c) else() set(ZLIB_SOURCES_BASE ${ZLIB_SOURCES_BASE} ../../libs/System.IO.Compression.Native/zlib_allocator_unix.c)