diff --git a/CMakeLists.txt b/CMakeLists.txt index 2136b3f..0858e29 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,9 +53,7 @@ if(LLVM_MLBRIDGE) LINK_LIBS ModelRunnerLib - $ - tf_xla_runtime - protobuf::libprotobuf + SerDesLib ) target_include_directories(LLVMMLBridge SYSTEM PUBLIC ${Protobuf_INCLUDE_DIRS} ${TENSORFLOW_AOT_PATH}/include) @@ -66,7 +64,7 @@ else() llvm_map_components_to_libnames(llvm_libs support core irreader analysis TransformUtils) add_library(MLCompilerBridge STATIC tools.cpp) - target_link_libraries(MLCompilerBridge PUBLIC SerDesLib ModelRunnerLib ONNXModelRunnerLib ${llvm_libs} tf_xla_runtime protobuf::libprotobuf) + target_link_libraries(MLCompilerBridge PUBLIC SerDesLib ModelRunnerLib ONNXModelRunnerLib ${llvm_libs}) set_target_properties(MLCompilerBridge PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set_property(TARGET MLCompilerBridge PROPERTY POSITION_INDEPENDENT_CODE 1) install(TARGETS MLCompilerBridge DESTINATION lib) diff --git a/MLModelRunner/ONNXModelRunner/CMakeLists.txt b/MLModelRunner/ONNXModelRunner/CMakeLists.txt index 92f9a1a..ea31f4b 100755 --- a/MLModelRunner/ONNXModelRunner/CMakeLists.txt +++ b/MLModelRunner/ONNXModelRunner/CMakeLists.txt @@ -50,6 +50,6 @@ add_library(ONNXModelRunnerLib OBJECT onnx.cpp ) endif(LLVM_MLBRIDGE) -target_link_libraries(ONNXModelRunnerLib PUBLIC onnxruntime) target_include_directories(ONNXModelRunnerLib PUBLIC "${ONNXRUNTIME_ROOTDIR}/include" "${ONNXRUNTIME_ROOTDIR}/include/onnxruntime/core/session" ${TENSORFLOW_AOT_PATH}/include) target_link_directories(ONNXModelRunnerLib PUBLIC ${ONNXRUNTIME_ROOTDIR}/lib) +target_link_libraries(ONNXModelRunnerLib PRIVATE onnxruntime) diff --git a/SerDes/CMakeLists.txt b/SerDes/CMakeLists.txt index d06ef68..0709da4 100755 --- a/SerDes/CMakeLists.txt +++ b/SerDes/CMakeLists.txt @@ -15,4 +15,5 @@ else() add_library(SerDesCLib OBJECT TensorSpec.cpp jsonSerDes.cpp bitstreamSerDes.cpp JSON.cpp) endif() -target_include_directories(SerDesLib PRIVATE ${TENSORFLOW_AOT_PATH}/include) +target_include_directories(SerDesLib PUBLIC ${TENSORFLOW_AOT_PATH}/include) +target_link_libraries(SerDesLib PRIVATE tf_xla_runtime)