@@ -13,8 +13,11 @@ set(TVM_RUNNER_SOURCES
1313set (RTVM_LINKER_LIBS "" )
1414
1515if (WIN32 )
16- list (APPEND RTVM_SOURCES ../cpp_rpc/win32_process.cc)
17- list (APPEND TVM_RUNNER_SOURCES ../cpp_rpc/win32_process.cc)
16+ file (GLOB ZLIB_SRC
17+ "../../3rdparty/zlib/*.c"
18+ )
19+ list (APPEND RTVM_SOURCES ${ZLIB_SRC} )
20+ list (APPEND TVM_RUNNER_SOURCES ${ZLIB_SRC} )
1821endif ()
1922
2023# Set output to same directory as the other TVM libs
@@ -55,6 +58,7 @@ target_include_directories(
5558 rtvm
5659 PUBLIC "../../include"
5760 PUBLIC "../../3rdparty/cnpy"
61+ PUBLIC "../../3rdparty/zlib"
5862 PUBLIC DLPACK_PATH
5963 PUBLIC DMLC_PATH
6064)
@@ -72,9 +76,13 @@ if (BUILD_FOR_ANDROID AND USE_HEXAGON)
7276endif ()
7377
7478if (BUILD_STATIC_RUNTIME)
75- list (APPEND RTVM_LINKER_LIBS -Wl,--whole-archive tvm_runtime -Wl,--no -whole-archive z )
79+ list (APPEND RTVM_LINKER_LIBS -Wl,--whole-archive tvm_runtime -Wl,--no -whole-archive)
7680else ()
77- list (APPEND RTVM_LINKER_LIBS tvm_runtime z)
81+ list (APPEND RTVM_LINKER_LIBS tvm_runtime)
82+ endif ()
83+
84+ if (NOT WIN32 )
85+ list (APPEND RTVM_LINKER_LIBS z)
7886endif ()
7987
8088target_link_libraries (rtvm ${RTVM_LINKER_LIBS} )
@@ -84,6 +92,7 @@ target_include_directories(
8492 tvm_runner_objs
8593 PUBLIC "../../include"
8694 PUBLIC "../../3rdparty/cnpy"
95+ PUBLIC "../../3rdparty/zlib"
8796 PUBLIC DLPACK_PATH
8897 PUBLIC DMLC_PATH
8998)
0 commit comments