From 0231bb83a212258b46b0a66319bc90b984cc694c Mon Sep 17 00:00:00 2001 From: Tian Jin Date: Tue, 21 Jan 2020 11:08:16 -0500 Subject: [PATCH] Properly link with ZLIB. (#40) --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b537820..73c0ffe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,8 +69,9 @@ add_subdirectory(runtime) add_executable(onnf main.cpp) target_link_libraries(onnf builder ${MLIRLibs} onnf_transform onnf_shape_inference onnf_lower_frontend) -set_target_properties(onnf PROPERTIES LINK_FLAGS "-lz") whole_archive_link_mlir(onnf ${MLIRWholeArchiveLibs}) +find_package(ZLIB REQUIRED) +target_link_libraries(onnf ${ZLIB_LIBRARIES}) target_include_directories(onnf PRIVATE ${CMAKE_SOURCE_DIR}) target_include_directories(onnf PRIVATE ${CMAKE_BINARY_DIR})