From 1cc211b9c82ca307a6252481dc98a4ef10aa42f5 Mon Sep 17 00:00:00 2001 From: Guan-schoolmate <643665808@qq.com> Date: Wed, 18 Oct 2023 13:43:09 +0800 Subject: [PATCH] Modify the logic for finding dip lib --- CMakeLists.txt | 7 +++++++ examples/DIPDialect/CMakeLists.txt | 2 -- tests/Interface/core/CMakeLists.txt | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0678c0f92a..6b2c980128 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,13 @@ include(AddLLVM) include(AddMLIR) include(HandleLLVMOptions) +#------------------------------------------------------------------------------- +# Dip lib configuration +#------------------------------------------------------------------------------- + +find_package(JPEG REQUIRED) +find_package(PNG REQUIRED) + #------------------------------------------------------------------------------- # Hardware detection #------------------------------------------------------------------------------- diff --git a/examples/DIPDialect/CMakeLists.txt b/examples/DIPDialect/CMakeLists.txt index 441652a63e..9b34013e92 100644 --- a/examples/DIPDialect/CMakeLists.txt +++ b/examples/DIPDialect/CMakeLists.txt @@ -3,8 +3,6 @@ if(BUDDY_ENABLE_OPENCV) include_directories(${OpenCV_INCLUDE_DIRS}) endif() -find_package(JPEG REQUIRED) -find_package(PNG REQUIRED) add_library(DIP_LIBS INTERFACE) target_link_libraries(DIP_LIBS INTERFACE ${JPEG_LIBRARY} ${PNG_LIBRARY} BuddyLibDIP) diff --git a/tests/Interface/core/CMakeLists.txt b/tests/Interface/core/CMakeLists.txt index 94fd8d18a8..cfd184b549 100644 --- a/tests/Interface/core/CMakeLists.txt +++ b/tests/Interface/core/CMakeLists.txt @@ -7,8 +7,6 @@ if(BUDDY_ENABLE_OPENCV) include_directories(${OpenCV_INCLUDE_DIRS}) endif() -find_package(JPEG REQUIRED) -find_package(PNG REQUIRED) add_library(DIP_LIB INTERFACE) target_link_libraries(DIP_LIB INTERFACE ${JPEG_LIBRARY} ${PNG_LIBRARY})