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})