From 8f7004b297f822f31b03580441274e2e47ce851a Mon Sep 17 00:00:00 2001 From: Wenbing Li <10278425+wenbingl@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:21:13 -0800 Subject: [PATCH] more corrections --- CMakeLists.txt | 6 +++++- test/test_tools_add_pre_post_processing_to_model.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d30b9340..fd8b40d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -666,7 +666,11 @@ if(OCOS_ENABLE_VISION) elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS") # Use ImageIO on Apple platforms set(_DEFAULT_CODEC_ENABLE OFF) - target_link_libraries(ocos_operators PRIVATE "-framework CoreFoundation" "-framework CoreGraphics" "-framework ImageIO" "-framework CoreServices" "-framework MobileCoreServices") + set(_APPLE_FRAMEWORKS "-framework CoreFoundation" "-framework CoreGraphics" "-framework ImageIO" "-framework CoreServices") + if(CMAKE_SYSTEM_NAME STREQUAL "iOS") + list(APPEND _APPLE_FRAMEWORKS "-framework MobileCoreServices") + endif() + target_link_libraries(ocos_operators PRIVATE ${_APPLE_FRAMEWORKS}) endif() endif() diff --git a/test/test_tools_add_pre_post_processing_to_model.py b/test/test_tools_add_pre_post_processing_to_model.py index ffc4bc69..90d4991d 100644 --- a/test/test_tools_add_pre_post_processing_to_model.py +++ b/test/test_tools_add_pre_post_processing_to_model.py @@ -1006,7 +1006,7 @@ def test_FastestDet(self): output_model = os.path.join(test_data_dir, "FastestDet.updated.onnx") input_image_path = os.path.join(test_data_dir, "wolves.jpg") - add_ppp.yolo_detection(Path(input_model), Path(output_model), output_format = 'png', input_shape=(352, 352)) + add_ppp.yolo_detection(Path(input_model), Path(output_model), output_format='png', input_shape=(352, 352)) so = ort.SessionOptions() so.register_custom_ops_library(get_library_path())